TeamTalk 4 .NET DLL  Version 4.5A
BearWare.AudioBlock Struct Reference

An audio block containing the raw audio from a user who was talking. More...

Public Attributes

int nSampleRate
 The sample rate of the raw audio. More...
 
int nChannels
 The number of channels used (1 for mono, 2 for stereo). More...
 
System.IntPtr lpRawAudio
 The raw audio in 16-bit integer format array. The size of the array in bytes is sizeof(short) * nSamples * nChannels. More...
 
int nSamples
 The number of samples in the raw audio array. More...
 
uint uSampleIndex
 The index of the first sample in lpRawAudio. Its value will be a multiple of nSamples. The sample index can be used to detect overflows of the internal buffer. When a user initially starts talking the nSampleIndex will be 0 and while the user is talking nSampleIndex will be greater than 0. When the user stops talking nSampleIndex will be reset to 0 again. More...
 

Detailed Description

An audio block containing the raw audio from a user who was talking.

To enable audio blocks first call TT_EnableAudioBlockEvent() then whenever new audio is played the event TeamTalk4.OnUserAudioBlock() is generated. Use TeamTalk4.AcquireUserAudioBlock() to retrieve the audio block.

Note that each user is limited to 128 kbytes of audio data.

See Also
TeamTalk4.EnableAudioBlockEvent()
TeamTalk4.AcquireUserAudioBlock()
TeamTalk4.ReleaseUserAudioBlock()

Member Data Documentation

int BearWare.AudioBlock.nSampleRate

The sample rate of the raw audio.

int BearWare.AudioBlock.nChannels

The number of channels used (1 for mono, 2 for stereo).

System.IntPtr BearWare.AudioBlock.lpRawAudio

The raw audio in 16-bit integer format array. The size of the array in bytes is sizeof(short) * nSamples * nChannels.

int BearWare.AudioBlock.nSamples

The number of samples in the raw audio array.

uint BearWare.AudioBlock.uSampleIndex

The index of the first sample in lpRawAudio. Its value will be a multiple of nSamples. The sample index can be used to detect overflows of the internal buffer. When a user initially starts talking the nSampleIndex will be 0 and while the user is talking nSampleIndex will be greater than 0. When the user stops talking nSampleIndex will be reset to 0 again.