Encoder options

Speech quality and bandwidth usage depend on the used Speex encoder. As Speex is a lossy code, the quality value controls the balance between voice quality and network traffic. Valid quality values range from 0 to 10, default is 7. The encoding quality can be configured for each channel using the CHANNEL_CODEC_QUALITY property. The currently used channel codec, codec quality and estimated average used bitrate (without overhead) can be queried with ts3client_getEncodeConfigValue.


Encoder options are tied to a capture device, so querying the values only makes sense after a device has been opened.

All strings passed from the Client Lib are encoded in UTF-8 format.

unsigned int ts3client_getEncodeConfigValue(serverConnectionHandlerID,  
uint64 serverConnectionHandlerID;
const char* ident;
char** result;

Returns ERROR_ok on success, otherwise an error code as defined in public_errors.h. If an error has occured, the result string is uninitialized and must not be released.

To adjust the channel codec quality to a value of 5, you would call:

ts3client_setChannelVariableAsInt(scHandlerID, channelID, CHANNEL_CODEC_QUALITY, 5);

See the chapter about channel information for details about how to set channel variables.

To query information about the current channel quality, do:

char *name, *quality, *bitrate;
ts3client_getEncodeConfigValue(scHandlerID, "name", &name);
ts3client_getEncodeConfigValue(scHandlerID, "quality", &quality);
ts3client_getEncodeConfigValue(scHandlerID, "bitrate", &bitrate);

printf("Name = %s, quality = %s, bitrate = %s\n", name, quality, bitrate);