Walter-Correa/SampVoice-Plus
A ground-up C++20 re-architecture of the SampVoice voice chat ecosystem engineered for high-throughput SA-MP and Open.MP.
Install with sampctl
sampctl package install Walter-Correa/SampVoice-Plus
Run this in your project folder. sampctl downloads the package and what it depends on.
Adds its include files, with the libraries it depends on, to the Pawn compiler in your browser, ready to include in a script.
Depends on 1 package
- sampctl/samp-stdlibnot in this directory
README.md
SampVoice Plus
SampVoice Plus is a ground-up C++20 re-architecture of the SampVoice voice chat ecosystem engineered for high-throughput San Andreas Multiplayer (SA-MP) and open.mp 32-bit x86 servers alongside a single-file standalone Windows client (sampvoice.asi) and an optional 15-language Windows installer (SampVoice-Plus-Setup.exe).
It empowers server owners and Pawn developers to deploy real-time Global Channels, 3D Proximity Spatial Voice, Vehicle & Player-Attached Megaphones, Per-Stream Custom HUD Icons, Per-Player Global Listener Control, Smooth Parameter Sliding, and 9 DX8 DSP Audio Effects—with non-blocking UDP I/O, lock-free queues, $O(1)$ spatial grid indexing, opaque 32-bit generational handles, universal 0.3.7-R1 through 0.3.DL-R1 / open.mp client support in a single .asi file, and full backward compatibility with legacy CyberMor v3.x and AmyrAhmady (v11) clients and servers.
[!NOTE] Inspired by the original sampvoice by @CyberMor and its open.mp adaptation by @AmyrAhmady, SampVoice Plus is rebuilt from the ground up in C++20 to leave
samp.dllmachine code completely unpatched, eliminate externalbass_fx.dlland loose asset packs, isolate audio/capture/UDP processing onto a dedicated audio thread, and harden both client and server stability.
Comparison: SampVoice Implementations
| Feature | CyberMor 3.x | CyberMor 4.x | AmyrAhmady | SampVoice Plus |
|---|---|---|---|---|
| CyberMor 4.x clients | ❌ v11 only¹ | ✅ v4 only¹ | ❌ v11 only¹ | ❌ v11 and v12¹ |
| Legacy v11 clients | ✅ Same protocol | ❌ Incompatible | ✅ Same protocol | ✅ Simultaneous¹ |
| Server platforms | ⚠️ 0.3.7-R2 only | ⚠️ R2 and voice² | ⚠️ open.mp only | ✅ open.mp, R2/R3, DL |
| PC client versions | ⚠️ R1, R3 only | ⚠️ R1, R3 only | ⚠️ R1, R3 only | ✅ R1–R5, DL, omp³ |
| Voice relay architecture | Integrated | Separate process⁴ | Integrated | Integrated |
| Client deployment | ⚠️ Extra DLL + files⁵ | ⚠️ Extra DLL + files⁵ | ⚠️ Manual DLL + files⁵ | ✅ Single file⁵ |
| Backup & restore setup | ❌ Overwrites files | ❌ Overwrites files | ❌ No installer | ✅ SHA-256 backup⁶ |
| Unpatched client & AC | ❌ Patches samp.dll | ❌ Patches samp.dll | ❌ Patches samp.dll | ✅ Zero patches⁷ |
| Pawn.RakNet coexistence | ❌ Permanent hook⁸ | ⚠️ Permanent hook⁸ | N/A (component) | ✅ One-shot hook⁸ |
| Fixed port & bind IP | ❌ Ephemeral port⁹ | ✅ Port and host⁹ | ⚠️ Fixed port only⁹ | ✅ Port and bind IP⁹ |
| UDP flood protection | ❌ None | ❌ None | ❌ None | ✅ Token bucket¹⁰ |
| GMX & filterscript safety | ❌ Raw pointers | ⚠️ Pool IDs only¹¹ | ❌ Raw pointers | ✅ HandlePool cleanup¹¹ |
| YSI y_hooks support | ❌ Broken¹² | ⚠️ Tag issue¹² | ⚠️ Tag issue¹² | ✅ Compatible¹² |
| Stream icons | ❌ Fixed icon | ✅ Custom PNGs¹³ | ❌ Fixed icon | ✅ 7 built-in¹³ |
| Listener & speaker control | ⚠️ Mic mute only¹⁴ | ✅ Full control¹⁴ | ⚠️ Mic mute only¹⁴ | ✅ Full control¹⁴ |
| Interior, VW & spectate | ❌ Distance only | ❌ Distance only | ⚠️ No spectate¹⁵ | ✅ Full filtering¹⁵ |
| Stuck speaker guard | ❌ Stale entries¹⁶ | ✅ Clears on stop¹⁶ | ❌ Inherited¹⁶ | ✅ 400 ms timeout¹⁶ |
| PlayAudioStream stereo | ❌ Mutates globals¹⁷ | ❌ Mutates globals¹⁷ | ❌ Mutates globals¹⁷ | ✅ Preserves BASS¹⁷ |
| In-game menu languages | 1 (Russian) | 5 languages¹⁸ | 1 (Russian) | ✅ 15 built-in¹⁸ |
| DX8 audio effects | ✅ 9 filters | ✅ 9 filters | ✅ 9 filters | ✅ 9 filters¹⁹ |
| Diagnostics & talk modes | ❌ PTT only | ⚠️ Lang, PTT only | ❌ PTT only | ✅ Full suite²⁰ |
| Jitter, FEC & PLC | ⚠️ FEC only²¹ | ⚠️ Ring + PLC²¹ | ⚠️ FEC only²¹ | ✅ 35 ms + FEC/PLC²¹ |
| License | MIT | MIT | MIT | MPL-2.0 |
Notes
- Protocol & 4.x compatibility: CyberMor 4.x clients send the
0xDEADC0DEmagic (v4only) and are incompatible withv11; SampVoice Plus servers accept bothv11(CyberMor 3.x, AmyrAhmady, Android launchers) andv12(SVP1extension) simultaneously while rejectingv4(0xDEADC0DE). - Server targets: SampVoice Plus ships both an open.mp native component and a SA-MP plugin for
0.3.7-R2,0.3.7-R3, and0.3.DL-R1(32-bit Windows & Linux). - PC client coverage: Strictly matches PE
TimeDateStamp+AddressOfEntryPointacross0.3.7-R1,R2,R3/R3-1,R4,R4-2,R5-1(R5-2-MP),0.3.DL-R1(DL-R1-2-MP), and the open.mp launcher in a single.asi. - External relay process: CyberMor 4.x requires running a separate
voiceprocess alongside the SA-MP server; the other implementations integrate the UDP voice relay inside the plugin/component. - Client dependencies: CyberMor 3.x/4.x and AmyrAhmady require external
bass_fx.dlland loose font/asset files; SampVoice Plus bundles everything into a singlesampvoice.asiand a single server binary (sampvoice.dll/.so). - Installer: Guided 15-language Inno Setup installer with SHA-256 backup and restore manifest.
- Anti-cheat safety: Leaves
samp.dllmachine code completely unpatched (Present/ResetDirect3D 9 hooks only). Pawn.RakNet/YSFcoexistence: Upstream 3.x keeps a permanentGetRakServerInterfacehook (#43, #54, #71, #72, #117, #118, #133, #171); CyberMor 4.x also keeps a permanent hook (with no conflict reports found); open.mp components do not use that hook; SampVoice Plus removes its one-shot hook immediately after binding.- Network configuration: CyberMor 3.x uses an ephemeral OS port on
INADDR_ANY(sv_voice_portwas added to source in 2022, never released in 3.x); CyberMor 4.x supportsvoice_port&voice_host; AmyrAhmady exposessampvoice.portwithout bind IP; SampVoice Plus configures bothsampvoice.portandsampvoice.bind(failing loudly on invalid bind/port). - Flood defense: Per-player UDP token bucket (30 pkt/s sustained, burst 10).
- Lifecycle safety: Legacy 3.x and AmyrAhmady use raw pointers that leak on GMX; CyberMor 4.x uses pool IDs without per-AMX tracking; SampVoice Plus pairs 32-bit generational
HandlePoolhandles with automatic per-AMX unload cleanup. y_hooksinteroperability: Legacy 3.x cachesAmxLoadindices only andSV_VOID: void:breaksy_hooks; CyberMor 4.x removes key callbacks cleanly but keepsSV_VOID: void:insampvoice.inc; AmyrAhmady uses runtimeamx_FindPublicbut retainsvoid:-tagged forwards; SampVoice Plus uses emptySV_VOID:+ runtimeamx_FindPublic.- Stream icons:
SvSetIconin CyberMor 4.x accepts custom PNGs;SvStreamSetIconin SampVoice Plus (v12) selects from 7 built-in SVG/PNG icons (speaker,global,radio,phone,megaphone,admin,police). - Mute & listener controls: 3.x and AmyrAhmady only provide mic muting (
SvMutePlayer*); CyberMor 4.x providesSvEnableListener+SvEnableSpeaker; SampVoice Plus providesSvEnableListener/Disable/Check+SvMutePlayer*. - World filtering: CyberMor 3.x and 4.x check streamed-in & distance only; AmyrAhmady checks interior & virtual world without spectate tracking; SampVoice Plus filters interior, virtual world, and active spectate target.
- Stuck speaker name (#44): Legacy 3.x/AmyrAhmady have known stale entries; CyberMor 4.x clears via
OnStopStreamon stop/release; SampVoice Plus enforces a 400 ms per-channel timeout plus disconnect detach. PlayAudioStreamstereo (#136): Legacy 3.x and AmyrAhmady alter globalGVOL_STREAM,BUFFER, andUPDATEPERIOD(and 4.x also altersUPDATETHREADS,DEV_PERIOD/DEV_BUFFER, andBASS_DEVICE_MONO); SampVoice Plus leavesBASS_InitandGVOL_STREAMuntouched.- UI translations: CyberMor 3.x and AmyrAhmady are Russian-only; CyberMor 4.x supports 5 languages (
en+ 4.txtfiles); SampVoice Plus includes 15 built-in languages with real-time switching. - DSP effects: All 9 DX8 audio filters via
SvEffectCreate*. - Client UX: Configurable menu hotkey (no longer fixed to
F11), 9-state F11 diagnostics + RTT, 2s microphone hot-plug detection, and both Push-to-Talk and Toggle talk modes. - Recovery pipeline: 3.x/AmyrAhmady decode FEC only and drop late frames; CyberMor 4.x has a ring buffer + FEC + PLC (with encoder FEC off); SampVoice Plus combines a 35 ms
SpeakerJitterBuffer, Opus in-band FEC, 4800-sample PLC, and an adaptive1..4-frame prebuffer cushion.
When Another Option May Fit
- Choose CyberMor 4.x if your community already deploys
CyberMor 4.xclient installers (0xDEADC0DE) or specifically requires splitting the voice relay into a separate externalvoiceprocess. - Choose AmyrAhmady if you only target open.mp with vanilla
0.3.7-R1/R3clients and prefer a minimal MIT-licensed fork matching upstream 3.x. - Choose SampVoice Plus if you want universal
0.3.7-R1–0.3.DL-R1/ open.mp support in a single drop-insampvoice.asi, compatibility with existingv11PC and Android clients, unpatchedsamp.dll, fixed port/IP control, and 15-language UI.
Supported Platforms
| Category | Supported Targets & Notes |
|---|---|
| Server Binaries | open.mp native component, SA-MP 0.3.7-R2 (R2-1, R2-2-1) & 0.3.7-R3 (Win/Linux x86), SA-MP 0.3.DL-R1 (Win/Linux x86). |
| PC Clients | SA-MP 0.3.7-R1, R2, R3/R3-1, R4, R4-2, R5-1 (R5-2-MP), 0.3.DL-R1 (DL-R1-2-MP), and open.mp launcher (strict PE timestamp + entry match). |
| Operating Systems | Client: Windows 7 SP1 or newer (Win32 x86 game). Server: Windows x86 or 32-bit x86 Linux (glibc 2.31+). |
| Android Launchers | ✅ Android launchers embedding SampVoice 3.x (v11) work with SampVoice Plus servers. (No SampVoice Plus Android client exists.) |
| Legacy Compatibility | CyberMor 3.x and AmyrAhmady (v11) clients interoperate seamlessly. CyberMor 4.x clients cannot connect and must use SampVoice Plus. |
| Languages (15) | Indonesian (id), German (de), English (en), Spanish (es), French (fr), Italian (it), Hungarian (hu), Polish (pl), Portuguese (pt), Romanian (ro), Vietnamese (vi), Turkish (tr), Bulgarian (bg), Russian (ru), Ukrainian (uk). |
Documentation Hub
| Guide | Description |
|---|---|
| 📖 Getting Started | Client (SampVoice-Plus-Setup.exe & manual sampvoice.asi) + server setup, configuration, and drop-in migration. |
| 🎧 Universal Client & In-Game UI | Single-file architecture, runtime R1–R5/0.3.DL PE bridge, F11 configurable hotkey, 15 live languages, and sampvoice.ini. |
| ⚙️ Architecture & Wire Protocol | Dual v11/v12 protocol, kClientBuild bit layout, CRC32C UDP validation, generational handles, and $O(1)$ spatial grid. |
| 🔊 Audio Streams & DX8 Effects | Global, static local, and dynamic local streams (GStream, SLStream, DLStream), SvStreamSetIcon, parameter sliding, and 9 DX8 effects. |
| 📚 Complete API Reference | Exhaustive reference for every native function, callback, parameter enum, handle tag, and constant in sampvoice.inc. |
| 🛠️ Troubleshooting Guide | F11 9-state diagnostics, UDP firewall/bind config, microphone recovery, talk modes, hotkey conflicts, and plugin coexistence. |
| 🔄 Migrating from Legacy SampVoice | Upgrading players (sampvoice.asi backup/scoped [blacklist]) and servers (CyberMor 3.x/4.x & AmyrAhmady, legacy_color_format). |
| 🔍 Zero-Install Feasibility Analysis | Technical analysis of zero-install vs single-file sampvoice.asi tradeoffs on vanilla SA-MP / open.mp. |
Client & Installation
Prerequisites & Installation Methods
Like any .asi plugin for GTA San Andreas, sampvoice.asi requires an ASI Loader and an existing SA-MP client (samp.dll + bass.dll) or open.mp launcher (official SA-MP builds are also available at sa-mp.mp/downloads).
Which download should I choose?
- Players: Download
SampVoice-Plus-Client-Installer.zip(contains bothInstaller/SampVoice-Plus-Setup.exeandManual Install/sampvoice.asi). - Server owners: Download
SampVoice-Plus-Server-Windows.zip(Windows) orSampVoice-Plus-Server-Linux.zip(Linux).
Inside SampVoice-Plus-Client-Installer.zip, pick either installation method:
| Method | Best For | How It Works |
|---|---|---|
Automatic Installer (Installer/SampVoice-Plus-Setup.exe) | Players without an ASI Loader or upgrading from legacy SampVoice | Guided 15-language Inno Setup installer: auto-detects GTA San Andreas, checks samp.dll/bass.dll, installs sampvoice.asi, bundles Ultimate ASI Loader (dinput8.dll, MIT) if no ASI loader exists, lets you back up or permanently uninstall legacy SampVoice (preserving SA-MP's bass.dll and vorbis*.dll), stores restore data and THIRD-PARTY-NOTICES.txt in sampvoice-plus\, and places Uninstall SampVoice Plus.lnk in the GTA root folder. Reinstalling or updating SA-MP later keeps voice working intact. |
Manual Install (Manual Install/sampvoice.asi) | Modded GTA setups that already have an ASI Loader (dinput8.dll, Silent's ASI Loader, or CLEO) | Copy sampvoice.asi directly into your GTA San Andreas root folder (where gta_sa.exe lives — not scripts\). Nothing else needed. |
Press F11 in-game to open the settings menu, rebind the hotkey, choose your microphone, tune noise/DSP filters, mute players locally, or switch among 15 languages in real time.
Configuration and player mutes (sampvoice.ini, including [blacklist] entries with server name, IP:port, and server/all scope) alongside session logs (sampvoice_plus_v<version>_log.txt) are stored automatically inside Documents\GTA San Andreas User Files\SAMP\sampvoice\ (only after SA-MP is detected; see Migrating from Legacy SampVoice). Line 1 of every client session log records the SHA-256 hash of the loaded sampvoice.asi for integrity inspection (certutil -hashfile sampvoice.asi SHA256).
Release Archives & Server Placement
Each release provides three dedicated archives (SampVoice-Plus-Setup.exe is bundled inside SampVoice-Plus-Client-Installer.zip under Installer/), with LICENSE and THIRD-PARTY-NOTICES.txt placed cleanly at the root of each archive:
SampVoice-Plus-Client-Installer.zip <-- For Windows players
├── Installer/
│ ├── SampVoice-Plus-Setup.exe
│ └── Instructions/
│ ├── bg - Bulgarian.txt
│ ├── de - German.txt
│ ├── en - English.txt
│ ├── ... (15 languages)
│ └── vi - Vietnamese.txt
├── Manual Install/
│ ├── sampvoice.asi
│ └── Instructions/
│ ├── bg - Bulgarian.txt
│ ├── de - German.txt
│ ├── en - English.txt
│ ├── ... (15 languages)
│ └── vi - Vietnamese.txt
├── LICENSE
└── THIRD-PARTY-NOTICES.txt
SampVoice-Plus-Server-Windows.zip <-- For Windows servers (open.mp / SA-MP x86)
├── components/
│ └── sampvoice.dll
├── plugins/
│ └── sampvoice.dll
├── include/
│ └── sampvoice.inc
├── Example.pwn
├── LICENSE
└── THIRD-PARTY-NOTICES.txt
SampVoice-Plus-Server-Linux.zip <-- For Linux servers (open.mp / SA-MP x86)
├── components/
│ └── sampvoice.so
├── plugins/
│ └── sampvoice.so
├── include/
│ └── sampvoice.inc
├── Example.pwn
├── LICENSE
└── THIRD-PARTY-NOTICES.txt
[!WARNING] Do not load both
components/sampvoice.dllandplugins/sampvoice.dllat the same time on open.mp. SA-MP server mode supports SA-MP0.3.7-R2(R2-1, R2-2-1),0.3.7-R3, and0.3.DL-R1on both Windows & Linux (x86). See Troubleshooting for firewall &sampvoice.binddetails.
- open.mp (
config.json): Placesampvoice.dll(orsampvoice.so) insidecomponents/. Optional tuning:
Note:{ "sampvoice": { "port": 7778, "bind": "0.0.0.0", "threads": 4, "updaterate": 30, "legacy_color_format": false, "voice_status": true, "nearby_list": true, "allow_toggle_mode": true, "voice_occlusion": true } }"port": 0selects an automatic ephemeral port that changes on every restart and logs a[sv+:WRN]warning. - SA-MP
0.3.7-R2 / R3 / 0.3.DL-R1(server.cfg): Placesampvoice.dll(orsampvoice.so) insideplugins/and add:plugins sampvoice.dll # (or sampvoice.so on Linux) # Optional tuning keys: sampvoice.port 7778 # 0 = automatic ephemeral port (logs a [sv+:WRN] warning) sampvoice.bind 0.0.0.0 sampvoice.threads 4 sampvoice.updaterate 30 sampvoice.legacy_color_format 0 sampvoice.voice_status 1 sampvoice.nearby_list 1 sampvoice.allow_toggle_mode 1 sampvoice.voice_occlusion 1
Basic Pawn Example
#include <open.mp> // Or <a_samp>
#include <sampvoice>
#define KEY_TALK (0x42) // 'B'
new SV_DLSTREAM:g_LocalStream[MAX_PLAYERS] = { SV_NULL, ... };
public OnGameModeInit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
if (SvGetVersion(playerid) != SV_NULL && SvHasMicro(playerid))
{
SvAddKey(playerid, KEY_TALK);
}
g_LocalStream[playerid] = SvCreateDLStreamAtPlayer(35.0, 24, playerid, 0xFFFFFFFF, "Local");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if (g_LocalStream[playerid] != SV_NULL)
{
SvDeleteStream(g_LocalStream[playerid]);
g_LocalStream[playerid] = SV_NULL;
}
return 1;
}
public SV_VOID:OnPlayerActivationKeyPress(SV_UINT:playerid, SV_UINT:keyid)
{
if (keyid == KEY_TALK && g_LocalStream[playerid] != SV_NULL)
{
SvAttachSpeakerToStream(g_LocalStream[playerid], playerid);
}
}
public SV_VOID:OnPlayerActivationKeyRelease(SV_UINT:playerid, SV_UINT:keyid)
{
if (keyid == KEY_TALK && g_LocalStream[playerid] != SV_NULL)
{
SvDetachSpeakerFromStream(g_LocalStream[playerid], playerid);
}
}
[!TIP] Check
Example.pwnfor a full demonstration including Global radio channels,SvStreamSetIcon,SvGetClientProtocolchecks, DX8 walkie-talkie filters (SvEffectCreateParameq+SvEffectCreateEcho), volume sliding, and static loudspeaker streams.
Complete API Reference (Summary) — 72 Natives & 8 Callbacks
Full signatures, enums, and callback notes live in docs/api-reference.md and sampvoice.inc:
audioopen-mpopenmppawnproximity-chatsa-mpsampsamp-pluginsamp-voipsampvoicevoice-chatvoip
This page is built from what GitHub publishes about the repository. samp.directory does not host the code. Report a problem with this listing