'Edit Voice data on onEditPlaybackVoiceDataEvent(teamspeak)

How can i access & modify the voice data at the "onEditPlaybackVoiceDataEvent" event, i want to add voice filters over the voice of other users.

TS Docs:

void onEditPlaybackVoiceDataEvent(serverConnectionHandlerID, clientID, samples, sampleCount, channels);
uint64 serverConnectionHandlerID;
anyID clientID;
short* samples;
int sampleCount;
int channels;


• serverConnectionHandlerID
ID of the server connection handler from which the voice data was sent.

• clientID
ID of the client whose voice data is received.

• samples
Pointer to the voice data (signed 16 bit @ 48KHz).

• sampleCount
Number of samples the "samples" variable points to.

• channels
Number of channels in the sound data.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source