I started to develop a new plugin to select another playback profile for a single user. Currently its just a non functional prototype. I am not a good c programmer, so I need some help to develop the necessary methods.
The first prototype is now working. However, implemented differently than planned:
/*TODO Device Switch
1. Check ClientID
2. Select Playback Device
*/
void ts3plugin_onEditPostProcessVoiceDataEvent(uint64 serverConnectionHandlerID, anyID clientID, short* samples, int sampleCount, int channels, const unsigned int* channelSpeakerArray, unsigned int* channelFillMask) {
if (clientID == copyrightClaimClients[0]) {
//Client is in copyright claim list. Redirect audio to selected playback profile.
//ts3Functions.logMessage("Teufelswerk PostProcessVoiceDataEvent", LogLevel_INFO, "ts-audio-device-switch", serverConnectionHandlerID);
//Reroute the sound
if (*channelFillMask != 0)
{
*channelFillMask = SPEAKER_FRONT_CENTER;
}
}
}
Explanation: The prototype does not really change the audio device but switches the Teamspeak sound of the selected user to the center box. This means that the sound is no longer sent to the stream. By upscaling and switching from surround to mono it is then possible that the streamer himself can still enjoy the sound.