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...

Typedefs

typedef enum TransmitType TransmitType
 Enum specifying data transmission types.
typedef UINT32 TransmitTypes
 A mask of data transmissions based on TransmitType.

Enumerations

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

Enum specifying data transmission types.

More...

Functions

TEAMTALKDLL_API BOOL TT_EnableVoiceActivation (IN TTInstance *lpTTInstance, IN BOOL bEnable)
 Enable voice activation.
TEAMTALKDLL_API BOOL TT_SetVoiceActivationLevel (IN TTInstance *lpTTInstance, IN INT32 nLevel)
 Set voice activation level.
TEAMTALKDLL_API INT32 TT_GetVoiceActivationLevel (IN TTInstance *lpTTInstance)
 Get voice activation level.
TEAMTALKDLL_API BOOL TT_SetVoiceActivationStopDelay (IN TTInstance *lpTTInstance, IN INT32 nDelayMSec)
 Set the delay of when voice activation should be stopped.
TEAMTALKDLL_API INT32 TT_GetVoiceActivationStopDelay (IN TTInstance *lpTTInstance)
 Get the delay of when voice active state should be disabled.
TEAMTALKDLL_API BOOL TT_StartRecordingMuxedAudioFile (IN TTInstance *lpTTInstance, IN const AudioCodec *lpAudioCodec, IN const TTCHAR *szAudioFileName, IN AudioFileFormat uAFF)
 Store audio conversations to a single file.
TEAMTALKDLL_API BOOL TT_StopRecordingMuxedAudioFile (IN TTInstance *lpTTInstance)
 Stop an active muxed audio recording.
TEAMTALKDLL_API BOOL TT_EnableTransmission (IN TTInstance *lpTTInstance, IN TransmitTypes uTxType, IN BOOL bEnable)
 Start/stop transmitting audio or video data.
TEAMTALKDLL_API BOOL TT_IsTransmitting (IN TTInstance *lpTTInstance, IN TransmitTypes uTxType)
 Check if the client instance is currently transmitting.
TEAMTALKDLL_API BOOL TT_StartStreamingAudioFileToUser (IN TTInstance *lpTTInstance, IN INT32 nUserID, IN const TTCHAR *szAudioFilePath)
 Stream a wave-file to a user in another channel. Only an administrators can use this function.
TEAMTALKDLL_API BOOL TT_StopStreamingAudioFileToUser (IN TTInstance *lpTTInstance, IN INT32 nUserID)
 Stop transmitting audio file.
TEAMTALKDLL_API BOOL TT_StartStreamingAudioFileToChannel (IN TTInstance *lpTTInstance, IN INT32 nChannelID, IN const TTCHAR *szAudioFilePath)
 Stream audio file to current channel.
TEAMTALKDLL_API BOOL TT_StopStreamingAudioFileToChannel (IN TTInstance *lpTTInstance, IN INT32 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 CLIENT_SNDINPUT_READY enabled which is done in the function TT_InitSoundInputDevice. To transmit video requires the flag CLIENT_VIDEO_READY which is enabled by the function TT_InitVideoCaptureDevice. To hear what others users are saying a sound output device must have been configured using TT_InitSoundOutputDevice and thereby have enabled the flag CLIENT_SNDOUTPUT_READY.

Calling TT_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 TT_EnableVoiceActivation and setting a voice activation level using TT_SetVoiceActivationLevel.


Typedef Documentation

typedef enum TransmitType TransmitType

Enum specifying data transmission types.

See also:
TT_EnableTransmission
TT_IsTransmitting
typedef UINT32 TransmitTypes

A mask of data transmissions based on TransmitType.

See also:
TT_EnableTransmission

Enumeration Type Documentation

Enum specifying data transmission types.

See also:
TT_EnableTransmission
TT_IsTransmitting
Enumerator:
TRANSMIT_NONE 

Transmitting nothing.

TRANSMIT_AUDIO 

Transmit audio.

TRANSMIT_VIDEO 

Transmit video.


Function Documentation

TEAMTALKDLL_API BOOL TT_EnableVoiceActivation ( IN TTInstance lpTTInstance,
IN BOOL  bEnable 
)

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 TT_SetVoiceActivationLevel. Once the voice activation level is reached the event WM_TEAMTALK_VOICE_ACTIVATION is posted.

The current volume level can be queried calling TT_GetSoundInputLevel.

Parameters:
lpTTInstance Pointer to client instance created by TT_InitTeamTalk.
bEnable TRUE to enable, otherwise FALSE.
See also:
CLIENT_SNDINPUT_VOICEACTIVATION
TT_SetVoiceActivationStopDelay
TEAMTALKDLL_API BOOL TT_SetVoiceActivationLevel ( IN TTInstance lpTTInstance,
IN INT32  nLevel 
)

Set voice activation level.

The current volume level can be queried calling TT_GetSoundInputLevel.

Parameters:
lpTTInstance Pointer to client instance created by TT_InitTeamTalk.
nLevel Must be between SOUND_VU_MIN and SOUND_VU_MAX
See also:
TT_EnableVoiceActivation
TT_GetVoiceActivationLevel
TT_SetVoiceActivationStopDelay
TEAMTALKDLL_API INT32 TT_GetVoiceActivationLevel ( IN TTInstance lpTTInstance  ) 

Get voice activation level.

Parameters:
lpTTInstance Pointer to client instance created by TT_InitTeamTalk.
Returns:
Returns A value between SOUND_VU_MIN and SOUND_VU_MAX
See also:
TT_EnableVoiceActivation
TT_SetVoiceActivationLevel
TEAMTALKDLL_API BOOL TT_SetVoiceActivationStopDelay ( IN TTInstance lpTTInstance,
IN INT32  nDelayMSec 
)

Set the delay of when voice activation should be stopped.

When TT_GetSoundInputLevel() becomes higher than the specified voice activation level the client instance will start transmitting until TT_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 TT_SetVoiceActivationStopDelay().

See also:
TT_EnableVoiceActivation
TT_SetVoiceActivationLevel
TEAMTALKDLL_API INT32 TT_GetVoiceActivationStopDelay ( IN TTInstance lpTTInstance  ) 

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:
TT_SetVoiceActivationStopDelay
TT_EnableVoiceActivation
TT_SetVoiceActivationLevel
TEAMTALKDLL_API BOOL TT_StartRecordingMuxedAudioFile ( IN TTInstance lpTTInstance,
IN const AudioCodec lpAudioCodec,
IN const TTCHAR szAudioFileName,
IN AudioFileFormat  uAFF 
)

Store audio conversations to a single file.

Unlike TT_SetUserAudioFolder(), which stores users' audio streams in separate files, TT_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 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 TT_StartRecordingMuxedAudioFile() will enable the CLIENT_MUX_AUDIOFILE flag from TT_GetFlags().

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

Parameters:
lpTTInstance Pointer to client instance created by TT_InitTeamTalk.
lpAudioCodec The audio codec which should be used as reference for muxing users' audio streams. In most situations this is the AudioCodec of the current channel, i.e. TT_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:
TT_SetUserAudioFolder()
TT_StopRecordingMuxedAudioFile()
TEAMTALKDLL_API BOOL TT_StopRecordingMuxedAudioFile ( IN TTInstance lpTTInstance  ) 

Stop an active muxed audio recording.

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

Calling TT_StopRecordingMuxedAudioFile() will clear the CLIENT_MUX_AUDIOFILE flag from TT_GetFlags().

Parameters:
lpTTInstance Pointer to client instance created by TT_InitTeamTalk.
See also:
TT_StartRecordingMuxedAudioFile()
TEAMTALKDLL_API BOOL TT_EnableTransmission ( IN TTInstance lpTTInstance,
IN TransmitTypes  uTxType,
IN BOOL  bEnable 
)

Start/stop transmitting audio or video data.

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

Parameters:
lpTTInstance Pointer to client instance created by TT_InitTeamTalk.
uTxType A bitmask of the data types to enable/disable transmission of.
bEnable Enable/disable transmission of bits in mask.
TEAMTALKDLL_API BOOL TT_IsTransmitting ( IN TTInstance lpTTInstance,
IN TransmitTypes  uTxType 
)

Check if the client instance is currently transmitting.

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

Parameters:
lpTTInstance Pointer to client instance created by TT_InitTeamTalk.
uTxType A mask specifying whether the client instance is currently transmitting the given TransmitType.
See also:
TT_EnableTransmission
TT_EnableVoiceActivation
TEAMTALKDLL_API BOOL TT_StartStreamingAudioFileToUser ( IN TTInstance lpTTInstance,
IN INT32  nUserID,
IN const TTCHAR szAudioFilePath 
)

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

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

Parameters:
lpTTInstance Pointer to client instance created by TT_InitTeamTalk.
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:
TT_StopStreamingAudioFileToUser
TEAMTALKDLL_API BOOL TT_StopStreamingAudioFileToUser ( IN TTInstance lpTTInstance,
IN INT32  nUserID 
)

Stop transmitting audio file.

Parameters:
lpTTInstance Pointer to client instance created by TT_InitTeamTalk.
nUserID The ID of the user being transmitted to.
See also:
TT_StartStreamingAudioFileToUser
TEAMTALKDLL_API BOOL TT_StartStreamingAudioFileToChannel ( IN TTInstance lpTTInstance,
IN INT32  nChannelID,
IN const TTCHAR szAudioFilePath 
)

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 WM_TEAMTALK_STREAM_AUDIOFILE_CHANNEL is posted when audio file is being processed.

Parameters:
lpTTInstance Pointer to client instance created by TT_InitTeamTalk.
nChannelID Pass TT_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:
TT_StartStreamingAudioFileToUser
TT_StopStreamingAudioFileToChannel
TEAMTALKDLL_API BOOL TT_StopStreamingAudioFileToChannel ( IN TTInstance lpTTInstance,
IN INT32  nChannelID 
)

Stop streaming audio file to current channel.

Parameters:
lpTTInstance Pointer to client instance created by TT_InitTeamTalk.
nChannelID Pass TT_GetMyChannelID.
Generated on Sun Mar 18 17:18:33 2012 for TeamTalk 4 C-API DLL by  doxygen 1.6.3