Browse
 
Tools
Rss Categories

LVSpeechPort::LoadVoiceChannel

Reference Number: AA-00802 Views: 11818 0 Rating/ Voters

Loads audio data into a specified voice channel. Used prior to Decode (which decodes the audio data).

Functions

  • int LoadVoiceChannel(int VoiceChannel, void* M, int Length, SOUND_FORMAT Format)

Parameters

VoiceChannel

Accepted values 0 through 63.

M

Pointer to audio data.

Length

Memory size in bytes of the audio data.

Format

The audio data sound format. SOUND_FORMAT is an enumerated type that has the following values:

UNK_FORMAT = 0

ULAW_8KHZ = 1

PCM_8KHZ = 2

PCM_16KHZ = 3

ALAW_8KHZ = 4

Return Values

LV_SUCCESS

No errors; the voice channel audio successfully loaded.

LV_INVALID_HPORT

The port is not valid (either CreateClient has not been called or DestroyClient has been called prior to this call).

LV_SOUND_CHANNEL_OUT_OF_RANGE

The specified voice channel is out of range (0-63).

LV_INVALID_SOUND_FORMAT

The specified sound format is invalid.

LV_FAILURE

This voice channel could not be loaded since the port was shutting down.

LV_TIME_OUT

Indicates that the load voice channel operation timed out.

LV_EXCEPTION

An exception occurred while processing the request.

Remarks

Each LV_SpeechPort supports 64 separate voice channels.  Each channel has its own separate storage for decode data, so once the call is made, the client application can release its own copy.  LoadVoiceChannel will accept the audio data and prepare it for decoding.

See Also