 | LibraryCreateCustomDevice Method |
Instead of opening existing sound devices that TeamSpeak has detected, you can also use our custom capture and playback mechanism to allow you to override the way in which TeamSpeak does capture and playback. When you have opened a custom capture and playback device you must regularly supply new "captured" sound data via
ProcessData(Int16, Int32) and retrieve data that should be "played back" via
AcquireData(Int16, Int32). Where exactly this captured sound data comes from and where the playback data goes to is up to you, which allows a lot of cool things to be done with this mechanism.
A custom device can be opened like any standard device with
OpenCapture(ISoundDevice) and
OpenPlayback(ISoundDevice).
Namespace:
TeamSpeak.Sdk.Client
Assembly:
TeamSpeak.Sdk (in TeamSpeak.Sdk.dll) Version: 0.1.6124.20226 (0.1.0.0)
Syntaxpublic static CustomDevice CreateCustomDevice(
string name,
SamplingRate captureRate = SamplingRate.Hz48000,
int captureChannels = 1,
SamplingRate playbackRate = SamplingRate.Hz48000,
int playbackChannels = 1
)
Public Shared Function CreateCustomDevice (
name As String,
Optional captureRate As SamplingRate = SamplingRate.Hz48000,
Optional captureChannels As Integer = 1,
Optional playbackRate As SamplingRate = SamplingRate.Hz48000,
Optional playbackChannels As Integer = 1
) As CustomDevice
public:
static CustomDevice^ CreateCustomDevice(
String^ name,
SamplingRate captureRate = SamplingRate::Hz48000,
int captureChannels = 1,
SamplingRate playbackRate = SamplingRate::Hz48000,
int playbackChannels = 1
)
static member CreateCustomDevice :
name : string *
?captureRate : SamplingRate *
?captureChannels : int *
?playbackRate : SamplingRate *
?playbackChannels : int
(* Defaults:
let _captureRate = defaultArg captureRate SamplingRate.Hz48000
let _captureChannels = defaultArg captureChannels 1
let _playbackRate = defaultArg playbackRate SamplingRate.Hz48000
let _playbackChannels = defaultArg playbackChannels 1
*)
-> CustomDevice
Parameters
- name
- Type: SystemString
Displayed name of the custom device. Freely choose a name which identifies your device. - captureRate (Optional)
- Type: TeamSpeak.SdkSamplingRate
Frequency of the capture device. - captureChannels (Optional)
- Type: SystemInt32
Number of channels of the capture device. This value depends on if the used codec is a mono or stereo codec. - playbackRate (Optional)
- Type: TeamSpeak.SdkSamplingRate
Frequency of the playback device. - playbackChannels (Optional)
- Type: SystemInt32
Number of channels of the playback device.
Return Value
Type:
CustomDevicea new
CustomDevice
Remarks Implementing own custom devices is for special use cases and entirely optional.
See Also