Initializing devices

Before a device can be used for playback or capture, you have to initialize and open the device.

Note

Only one device can be active simultaneously per type.

You cannot have more than one playback device or more than one capture device open at any given time. You can have up to one playback and up to one capture device open simultaneously.

Likely errors are ERROR_sound_could_not_open_capture_device if the device fails to open or ERROR_sound_handler_has_device if there is already an open device on the connection.

Note

If you want to switch devices on a connection, close the current device first, then open the new one.

Playback

To initialize a playback device on a connection call

unsigned int ts3client_openPlaybackDevice(uint64 serverConnectionHandlerID, const char *modeID, const char *playbackDevice)

initializes a playback device for a connection handler

Call this function to start audio playback of TeamSpeak audio on a connection

Parameters:
Returns:

An Error code from the Ts3ErrorType enum indicating either success or the failure reason

Capture

To initialize a capture device on a connection call

unsigned int ts3client_openCaptureDevice(uint64 serverConnectionHandlerID, const char *modeID, const char *captureDevice)

initializes a capture device for a connection handler

Call this function to start consuming audio from the specified device and send it to the server

Parameters:
Returns:

An Error code from the Ts3ErrorType enum indicating either success or the failure reason