Audio and Video Transmission

Once the client instance has joined a channel it can transmit audio and video to other users in the channel. When transmitting audio and video it is important to be aware of how the client is configured to do this. Sections Forward Through Server Transmission Mode and Peer to Peer Transmission Mode explains the two supported data transmission modes. More...

Enumerations

enum  BearWare.TransmitType { BearWare.TRANSMIT_NONE = 0x0, BearWare.TRANSMIT_AUDIO = 0x1, BearWare.TRANSMIT_VIDEO = 0x2 }
 

Enum specifying data transmission types.

More...

Functions

bool BearWare::TeamTalk4.EnableVoiceActivation (bool bEnable)
 Enable voice activation.
bool BearWare::TeamTalk4.SetVoiceActivationLevel (int nLevel)
 Set voice activation level.
int BearWare::TeamTalk4.GetVoiceActivationLevel ()
 Get voice activation level.
bool BearWare::TeamTalk4.SetVoiceActivationStopDelay (int nDelayMSec)
 Set the delay of when voice activation should be stopped.
int BearWare::TeamTalk4.GetVoiceActivationStopDelay ()
 Get the delay of when voice active state should be disabled.
bool BearWare::TeamTalk4.StartRecordingMuxedAudioFile (AudioCodec lpAudioCodec, string szAudioFileName, AudioFileFormat uAFF)
 Store audio conversations to a single file.
bool BearWare::TeamTalk4.StopRecordingMuxedAudioFile ()
 Stop an active muxed audio recording.
bool BearWare::TeamTalk4.EnableTransmission (TransmitType uTxType, bool bEnable)
 Start/stop transmitting audio or video data.
bool BearWare::TeamTalk4.IsTransmitting (TransmitType uTxType)
 Check if the client instance is currently transmitting.
bool BearWare::TeamTalk4.StartStreamingAudioFileToUser (int nUserID, string szAudioFilePath)
 Stream a wave-file to a user in another channel. Only an administrators can use this function.
bool BearWare::TeamTalk4.StopStreamingAudioFileToUser (int nUserID)
 Stop transmitting audio file.
bool BearWare::TeamTalk4.StartStreamingAudioFileToChannel (int nChannelID, string szAudioFilePath)
 Stream audio file to current channel.
bool BearWare::TeamTalk4.StopStreamingAudioFileToChannel (int nChannelID)
 Stop streaming audio file to current channel.

Detailed Description

Once the client instance has joined a channel it can transmit audio and video to other users in the channel. When transmitting audio and video it is important to be aware of how the client is configured to do this. Sections Forward Through Server Transmission Mode and Peer to Peer Transmission Mode explains the two supported data transmission modes.

To transmit audio the client must have the flag ClientFlag.CLIENT_SNDINPUT_READY enabled which is done in the function TeamTalk4.InitSoundInputDevice(). To transmit video requires the flag ClientFlag.CLIENT_VIDEO_READY which is enabled by the function TeamTalk4.InitVideoCaptureDevice(). To hear what others users are saying a sound output device must have been configured using TeamTalk4.InitSoundOutputDevice() and thereby have enabled the flag ClientFlag.CLIENT_SNDOUTPUT_READY.

Calling TeamTalk4.EnableTransmission() will make the client instance start transmitting either audio or video data. Note that audio transmission can also be activated automatically using voice activation. This is done by called TeamTalk4.EnableVoiceActivation() and setting a voice activation level using TeamTalk4.SetVoiceActivationLevel().


Enumeration Type Documentation

Enum specifying data transmission types.

See also:
TeamTalk4.EnableTransmission
TeamTalk4.IsTransmitting
Enumerator:
TRANSMIT_NONE 

Transmitting nothing.

TRANSMIT_AUDIO 

Transmit audio.

TRANSMIT_VIDEO 

Transmit video.


Function Documentation

bool BearWare.TeamTalk4.EnableVoiceActivation ( bool  bEnable  )  [inherited]

Enable voice activation.

The client instance will start transmitting audio if the recorded audio level is above or equal to the voice activation level set by SetVoiceActivationLevel. Once the voice activation level is reached the event OnVoiceActivation is posted.

The current volume level can be queried calling GetSoundInputLevel.

Parameters:
bEnable TRUE to enable, otherwise FALSE.
See also:
ClientFlag.CLIENT_SNDINPUT_VOICEACTIVATION
bool BearWare.TeamTalk4.SetVoiceActivationLevel ( int  nLevel  )  [inherited]

Set voice activation level.

The current volume level can be queried calling GetSoundInputLevel().

Parameters:
nLevel Must be between BearWare.SoundLevel.SOUND_VU_MIN and BearWare.SoundLevel.SOUND_VU_MAX
See also:
TeamTalk4.EnableVoiceActivation
TeamTalk4.GetVoiceActivationLevel
int BearWare.TeamTalk4.GetVoiceActivationLevel (  )  [inherited]
bool BearWare.TeamTalk4.SetVoiceActivationStopDelay ( int  nDelayMSec  )  [inherited]

Set the delay of when voice activation should be stopped.

When TeamTalk4.GetSoundInputLevel() becomes higher than the specified voice activation level the client instance will start transmitting until TeamTalk4.GetSoundInputLevel() becomes lower than the voice activation level, plus a delay. This delay is by default set to 1500 msec but this value can be changed by calling TeamTalk4.SetVoiceActivationStopDelay().

See also:
EnableVoiceActivation
SetVoiceActivationLevel
int BearWare.TeamTalk4.GetVoiceActivationStopDelay (  )  [inherited]

Get the delay of when voice active state should be disabled.

Returns:
The number of miliseconds before voice activated state should be turned back to inactive.
See also:
SetVoiceActivationStopDelay
EnableVoiceActivation
SetVoiceActivationLevel
bool BearWare.TeamTalk4.StartRecordingMuxedAudioFile ( AudioCodec  lpAudioCodec,
string  szAudioFileName,
AudioFileFormat  uAFF 
) [inherited]

Store audio conversations to a single file.

Unlike TeamTalk4.SetUserAudioFolder(), which stores users' audio streams in separate files, TeamTalk4.StartRecordingMuxedAudioFile() muxes the audio streams into a single file.

The audio streams, which should be muxed together, are required to use the same audio codec. In most cases this is the audio codec of the channel where the user is currently participating (i.e. codec member of BearWare.Channel).

If the user changes to a channel which uses a different audio codec then the recording will continue but simply be silent until the user again joins a channel with the same audio codec as was used for initializing muxed audio recording.

Calling TeamTalk4.StartRecordingMuxedAudioFile() will enable the ClientFlag.CLIENT_MUX_AUDIOFILE flag from TeamTalk4.GetFlags().

Call TeamTalk4.StopRecordingMuxedAudioFile() to stop recording. Note that only one muxed audio recording can be active at the same time.

Parameters:
lpAudioCodec The audio codec which should be used as reference for muxing users' audio streams. In most situations this is the BearWare.AudioCodec of the current channel, i.e. TeamTalk4.GetMyChannelID().
szAudioFileName The file to store audio to, e.g. C:\MyFiles\Conf.mp3.
uAFF The audio format which should be used in the recorded file. The muxer will convert to this format.
See also:
SetUserAudioFolder()
StopRecordingMuxedAudioFile()
bool BearWare.TeamTalk4.StopRecordingMuxedAudioFile (  )  [inherited]

Stop an active muxed audio recording.

A muxed audio recording started with TeamTalk4.StartRecordingMuxedAudioFile() can be stopped using this function.

Calling TeamTalk4.StopRecordingMuxedAudioFile() will clear the ClientFlag.CLIENT_MUX_AUDIOFILE flag from TeamTalk4.GetFlags().

See also:
StartRecordingMuxedAudioFile()
bool BearWare.TeamTalk4.EnableTransmission ( TransmitType  uTxType,
bool  bEnable 
) [inherited]

Start/stop transmitting audio or video data.

To check if transmission of either audio or video is enabled call GetFlags and check bits ClientFlag.CLIENT_TX_AUDIO and ClientFlag.CLIENT_TX_VIDEO.

Parameters:
uTxType A bitmask of the data types to enable/disable transmission of.
bEnable Enable/disable transmission of bits in mask.
bool BearWare.TeamTalk4.IsTransmitting ( TransmitType  uTxType  )  [inherited]

Check if the client instance is currently transmitting.

This call also checks if transmission is ongoing due to voice activation.

Parameters:
uTxType A bitmask specifying whether the client instance is currently transmitting the given TransmitType.
See also:
TeamTalk4.EnableTransmission
TeamTalk4.EnableVoiceActivation
bool BearWare.TeamTalk4.StartStreamingAudioFileToUser ( int  nUserID,
string  szAudioFilePath 
) [inherited]

Stream a wave-file to a user in another channel. Only an administrators can use this function.

The event OnStreamAudioFileUser is called when audio file is started and stopped.

Parameters:
nUserID The ID of the user to transmit to. The user cannot be in the same channel as the local client instance.
szAudioFilePath Path to .wav file. The format of the .wav file must be 16-bit PCM uncompressed. Use Audacity to convert to proper file format.
See also:
TeamTalk4.StopStreamingAudioFileToUser
bool BearWare.TeamTalk4.StopStreamingAudioFileToUser ( int  nUserID  )  [inherited]

Stop transmitting audio file.

Parameters:
nUserID The ID of the user being transmitted to.
See also:
TeamTalk4.StartStreamingAudioFileToUser
bool BearWare.TeamTalk4.StartStreamingAudioFileToChannel ( int  nChannelID,
string  szAudioFilePath 
) [inherited]

Stream audio file to current channel.

Currently it is only possible to stream to the channel which the local client instance is participating in.

When streaming to the current channel it basically replaces the microphone input with a .wav file. Note that it is not possible to stream a .wav file to a single user in the current channel.

The event OnStreamAudioFileChannel is posted when audio file is being processed.

Parameters:
nChannelID Pass GetMyChannelID(). Transmitting to other channels is currently not supported. Instead use
szAudioFilePath Path to .wav file. The format of the .wav file must be 16-bit PCM uncompressed. Use Audacity to convert to proper file format.
See also:
StartStreamingAudioFileToUser
StopStreamingAudioFileToChannel
bool BearWare.TeamTalk4.StopStreamingAudioFileToChannel ( int  nChannelID  )  [inherited]

Stop streaming audio file to current channel.

Parameters:
nChannelID Pass GetMyChannelID().
Generated on Sun Mar 18 17:16:14 2012 for TeamTalk 4 .NET DLL by  doxygen 1.6.3