Platform SDK: Agent

IAgentAudioOutputPropertiesEx::GetStatus

HRESULT GetStatus(
   long * plStatus,  // address of audio channel status
);

Retrieves the status of the audio channel.

plStatus
Status of the audio output channel, which may be one of the following values:
Value Description
const unsigned short
AUDIO_STATUS_AVAILABLE = 0;
The audio output channel is available (not busy).
const unsigned short
AUDIO_STATUS_NOAUDIO = 1;
There is no support for audio output; for example, because there is no sound card.
const unsigned short
AUDIO_STATUS_CANTOPENAUDIO = 2;
The audio output channel can't be opened (is busy); for example, because another application is playing audio.
const unsigned short
AUDIO_STATUS_USERSPEAKING = 3;
The audio output channel is busy because the server is processing user speech input
const unsigned short
AUDIO_STATUS_CHARACTERSPEAKING = 4;
The audio output channel is busy because a character is currently speaking.
const unsigned short
AUDIO_STATUS_SROVERRIDEABLE = 5;
The audio output channel is not busy, but it is waiting for user speech input.
const unsigned short
AUDIO_STATUS_ERROR = 6;
There was some other (unknown) problem in attempting to access the audio output channel.

This setting enables your client application to query the state of the audio output channel. You can use this to determine whether to have your character speak or to try to turn on Listening mode (using IAgentCharacterEx::Listen).