TS3INIT packet structure

Najsr

Moderator
TeamSpeak Developer
Apr 23, 2016
483
249
167
Another question from me :D
Do you know the size of a voice frame? Or can I just send for example full song via SendAudio method?
 

Splamy

TeamSpeak Developer
Apr 26, 2016
72
101
71
Yes all packets in ts3 must be under 500 bytes and you have to encode the audio before. Also the server buffers only around 3-10 seconds so you will have to manually manage your send buffer.
For a reference usage you can look here.
Ignore the entire `read==0` block and the `isStall` block. All you will need aditionally is the `PreciseAudioTimer` and the `AudioEncoder` class which are used in the method. And instead of `ffmpegProcess...` you can use any pcm 16bit LE 48khz (=WAV) audio stream. If your input steam does not have this format you will have to use a library (like ffmpeg) to convert it.
The AudioSend Method needs to be called periodically in like 5-20ms intervals.
 
Top