Sound codecs

## Sound codecs

TeamSpeak 3 supports three different sound sampling rates:

- Speex Narrowband (8 kHz)

- Speex Wideband (16 kHz)

- Speex Ultra-Wideband (32 kHz)

Bandwidth usage generally depends on the encoders quality setting.

Quality | Narrowband bitrate (bps) | Wideband bitrate (bps) | Ultra-Wideband bitrate (bps)
--- | --- | --- | ---
0 | 2,150 | 3,950 | 5,750
1 | 3,950 | 5,750 | 7,550
2 | 5,950 | 7,750 | 9,550
3 | 8,000 | 9,800 | 11,600
4 | 8,000 | 12,800 | 14,600
5 | 11,000 | 16,800 | 18,600
6 | 11,000 | 20,600 | 22,400
7 | 15,000 | 23,800 | 25,600
8 | 15,000 | 27,800 | 29,600
9 | 18,200 | 34,400 | 36,200
10 | 24,600 | 42,400 | 44,200

The availability of the 8 kHz narrowband codec should cater for the needs of low-bandwidth users at the cost of overall sound quality.

Users need to use the same codec when talking to each others. The smallest unit of participants using the same codec is a channel. Different channels on the same TeamSpeak 3 server can use different codecs. The channel codec should be customizable by the users to allow for flexibility concerning bandwidth vs. quality concerns.

The codec can be set or changed for a given channel using the function `ts3client_setChannelVariableAsInt` by passing `CHANNEL_CODEC` for the properties flag:

    ts3client_setChannelVariableAsInt(scHandlerID, channelID, CHANNEL_CODEC, codec);

For the argument `codec` pass a value of 0 for Narrowband (8 kHz), 1 for Wideband (16 kHz) and 2 for Ultra-Wideband (32 kHz).

For details on using the function `ts3client_setChannelVariableAsInt` see the appropriate section on changing channel data.

Custom FMOD objects |  | Encoder options