#include <vct.h>
BOOL VCT_SendAudio( void* audio_data, u32 length );
audio_data | Audio data. |
length | Data size (in bytes). |
TRUE |
The audio data was queued to a transmitting buffer. |
FALSE |
The audio data was not queued to the transmitting buffer. VAD determined audio is muted, streaming has not started, or the Library has not been initialized. |
VCT_SendAudio queues audio data to a transmitting buffer. Audio data encoding and the packet transmission process are performed in the VCT_Main
function.
audio_data should be sampled using the 16-bit / 8KHz format and aligned at a 4-byte boundary. The audio data length must be 1088 (data for 68ms in 16-bit / 8KHz format). No other value is accepted.
This function can be called regardless of whether or not audio streaming has started. If audio streaming has not started, this function has nothing to execute.
VCT_SendAudio should be called at precise intervals of 68ms as often as possible. Interval variations cause transmission packet timestamp variations and increase errors in receiving machines. This function should be called from the callback interruption to the audio streaming playback.
VCT_SendAudio's return value shows if the audio data is queued. If VAD is enabled, the return value also shows if VAD detects the audio data. Utilizing this function enables various processes (such as BGM mute and volume control) to work while a player is talking. If VAD is disabled, VCT_SendAudio always returns TRUE regardless of VAD's decision unless any error occurs.
VCT_Init,
VCT_StartStreaming,
VCT_ReceiveAudio
2006/04/13 The transmitting interval was changed from 64ms to 68ms. The description of the return value is changed from "Transmission succeeded." to "The data was queued in the transmitting buffer."
2006/04/06 A description regarding the adjustment of the transmitting interval was modified.
2006/03/24 VAD description was added.
2006/01/25 First release