Xaudio Command Messages


Message Index


XA_MSG_COMMAND_EXIT

Tells the player to exit.
The player will close and release all instantiated input and output devices before exiting.
control_message_send(player, XA_MSG_COMMAND_EXIT);
XA_Player::Exit();
player.h

XA_MSG_COMMAND_PING

Sends a 'ping tag' to the player, which will trigger a 'pong tag' reply.
This is used to synchronize with the asynchronous player: it is guaranteed that all messages sent to the player before a 'ping tag' will have been processed before the player sends back a 'pong tag' notification with the tag that was passed with the message.
control_message_send(player, XA_MSG_COMMAND_PING, tag);
XA_Player::Ping(unsigned long tag);
tagunsigned long user-defined tag that will be passed back with the 'pong' notification.
player.h

XA_MSG_COMMAND_PLAY

Tells the player to start playing. Upon receipt of this message, the player will open its input if not already open, open its output if not already open, and start playing. While the decoder is playing it reads from its input module (possible passing through the input filter chain), decodes the data, and sends it to the output module (possibly passing through the output filter chain). Between each of the small chunks of data that are being processed, the player will check its message queue to be able to respond to other messages that might be sent during playback (stop, pause, seek, etc...).
When it starts playing, the player will notify its new state by sending back an XA_MSG_NOTIFY_PLAYER_STATE message with a state field of XA_PLAYER_STATE_PLAYING.
When it has decoded the entire input stream, the player will stop and notify its new state by sending back an XA_MSG_NOTIFY_PLAYER_STATE message with a state field of XA_PLAYER_STATE_EOF.
control_message_send(player, XA_MSG_COMMAND_PLAY);
XA_Player::Play();
player.h
XA_MSG_COMMAND_STOP, XA_MSG_COMMAND_PAUSE

XA_MSG_COMMAND_PAUSE

Tells the player to pause playing. The player will paused, and remember the current playback position, so that if it receives a subsequent XA_MSG_COMMAND_PLAY message, playback will resume from where it was paused.
When it is paused, the player will notify its new state by sending back an XA_MSG_NOTIFY_PLAYER_STATE message with a state field of XA_PLAYER_STATE_PAUSED.
control_message_send(player, XA_MSG_COMMAND_PAUSE);
XA_Player::Pause();
player.h
XA_MSG_COMMAND_PLAY, XA_MSG_COMMAND_STOP

XA_MSG_COMMAND_STOP

Tells the player to stop playing. The playback position will return to the start of the stream.
When it is paused, the player will notify its new state by sending back an XA_MSG_NOTIFY_PLAYER_STATE message with a state field of XA_PLAYER_STATE_STOPPED.
control_message_send(player, XA_MSG_COMMAND_STOP);
XA_Player::Stop();
player.h
XA_MSG_COMMAND_PLAY, XA_MSG_COMMAND_STOP

XA_MSG_COMMAND_SEEK

Tells the player to seek to a position within the input stream.
The position is identified by an offset and a range. The range gives the total number of 'steps' in the stream, and the offset gives the step to which to seek. This is typically related to a 'scroll bar' or similar slider control, where range would be the MAX value for the slider, and offset the current value.
For example, to seek to position 78 with a slider that goes from 0 to 100, the 'range' would be 100, and the 'offset' would be 78.
control_message_send(player, XA_MSG_COMMAND_SEEK, offset, range);
XA_Player::Seek(unsigned short offset, unsigned short range);
offsetunsigned short offset within the range.
rangeunsigned short range of positions.
player.h

XA_MSG_COMMAND_INPUT_OPEN

Tells the player to open the input stream. The parameter to this message is the name (text string) of the input to open. Unless the input module has been set to a specific value, (see XA_MSG_SET_INPUT_MODULE), the player will 'autoselect' the correct input module based on the input name.
Typically, the input name is the name of the file on the disk that contains the stream, or a URL for network streaming.
If the player can successfully open the input, it will notify of the new input state by sending back an XA_MSG_NOTIFY_INPUT_STATE message with a state field of XA_PLAYER_INPUT_STATE_OPEN.
control_message_send(player, XA_MSG_COMMAND_INPUT_OPEN, name);
XA_Player::InputOpen(const char *name);
nameconst char * name of the input to open.
player.h
XA_MSG_COMMAND_INPUT_CLOSE

XA_MSG_COMMAND_INPUT_CLOSE

Tells the player to close the input stream.
The player will notify of the new input state by sending back an XA_MSG_NOTIFY_INPUT_STATE message with a state field of XA_PLAYER_INPUT_STATE_CLOSED.
control_message_send(player, XA_MSG_COMMAND_INPUT_CLOSE);
XA_Player::InputClose();
player.h
XA_MSG_COMMAND_INPUT_OPEN

XA_MSG_COMMAND_INPUT_SEND_MESSAGE

Sends a private message to the input module. This is used to implement custom behavior for dynamically attached plugin input modules (most users will never need to use that message). A custom message sent to a module has a type (short integer) and a payload (a user-defined data buffer) identified by a pointer to a memory location and a size in bytes.
control_message_send(player, XA_MSG_COMMAND_INPUT_SEND_MESSAGE, type, data, size);
XA_Player::InputSendMessage(unsigned short type, void *data, unsigned int size);
typeunsigned short message type identifier (user-defined).
datavoid * pointer to the message data.
sizeunsigned int number of bytes of data.
player.h
XA_MSG_COMMAND_INPUT_SEND_MESSAGE

XA_MSG_COMMAND_INPUT_ADD_FILTER

Adds an input filter to the input filters chain.
The filter is identified by name, which could reference a statically linked filter, a dynamically linked filter or a built-in filter. For more details on the naming convention for modules, filters and other functional object, see the section on Symbols Naming.
The 'where' parameter identifies where the filter should be inserted. See the documentation of the related SYNC function decoder_input_add_filter for possible values of that parameter.
Once the filter is added to the filter chain, the player notifies of the filter's ID by sending back an XA_MSG_NOTIFY_INPUT_FILTER_INFO message.
control_message_send(player, XA_MSG_COMMAND_INPUT_ADD_FILTER, name, where);
XA_Player::InputAddFilter(const char *name, int where);
nameconst char * name of the filter to insert in the chain.
whereint identifier of the insert point for the filter.
player.h
XA_MSG_COMMAND_INPUT_REMOVE_FILTER, XA_MSG_COMMAND_INPUT_FILTERS_LIST

XA_MSG_COMMAND_INPUT_REMOVE_FILTER

Removes an input filter from the input filters chain.
The filter is identified by name, or by ID.
See the documentation of the related SYNC function decoder_input_remove_filter for possible values of the 'name' and 'id' parameters.
control_message_send(player, XA_MSG_COMMAND_INPUT_REMOVE_FILTER, name, id);
XA_Player::InputRemoveFilter(const char *name, int id);
nameconst char * name of the filter to remove from the chain or @@CODE(NULL).
idint identifier of the filter to remove.
player.h
XA_MSG_COMMAND_INPUT_ADD_FILTER, XA_MSG_COMMAND_INPUT_FILTERS_LIST

XA_MSG_COMMAND_INPUT_FILTERS_LIST

Tells the player to list the input filters currently in the chain.
For each of the filters in the chain, the decoder will send back an XA_MSG_NOTIFY_INPUT_FILTER_INFO message describing the filter and it's ID.
control_message_send(player, XA_MSG_COMMAND_INPUT_FILTERS_LIST);
XA_Player::InputFiltersList();
player.h
XA_MSG_COMMAND_INPUT_ADD_FILTER, XA_MSG_COMMAND_INPUT_REMOVE_FILTER

XA_MSG_COMMAND_INPUT_MODULE_REGISTER

Registers an input module.
The module is identified by name, which could reference a statically linked module, a dynamically linked module or a built-in module. For more details on the naming convention for modules, filters and other functional object, see the section on Symbols Naming.
control_message_send(player, XA_MSG_COMMAND_INPUT_MODULE_REGISTER, name);
XA_Player::InputModuleRegister(const char *name);
nameconst char * name of the input module to register.
player.h
XA_MSG_COMMAND_INPUT_MODULE_QUERY, XA_MSG_COMMAND_INPUT_MODULES_LIST

XA_MSG_COMMAND_INPUT_MODULE_QUERY

Retrieves information about a registered input module.
The module to query is identified by ID. If a module with the requested ID is found in the list of registered modules, the player will send back an XA_MSG_NOTIFY_INPUT_MODULE_INFO message describing the module.
control_message_send(player, XA_MSG_COMMAND_INPUT_MODULE_QUERY, id);
XA_Player::InputModuleQuery(int id);
idint ID of the module to query.
player.h
XA_MSG_COMMAND_INPUT_MODULE_REGISTER, XA_MSG_COMMAND_INPUT_MODULES_LIST

XA_MSG_COMMAND_INPUT_MODULES_LIST

Retrieves a list of currently registered input modules.
For each of the registered input module, the player will send back an XA_MSG_NOTIFY_INPUT_MODULE_INFO message describing the module.
control_message_send(player, XA_MSG_COMMAND_INPUT_MODULES_LIST);
XA_Player::InputModulesList();
player.h
XA_MSG_COMMAND_INPUT_MODULE_REGISTER, XA_MSG_COMMAND_INPUT_MODULE_QUERY

XA_MSG_COMMAND_OUTPUT_OPEN

Tells the player to open the output. The parameter to this message is the name (text string) of the output to open. Unless the output module has been set to a specific value, (see XA_MSG_SET_OUTPUT_MODULE), the player will 'autoselect' the correct output module based on the output name.
Typically, the output name used is NULL or "" to specify the default output module.
Also, since the player will automatically open the default output when playing, there is no need to use that message unless specific control over the output is required.If the player can successfully open the output, it will notify of the new output state by sending back an XA_MSG_NOTIFY_OUTPUT_STATE message with a state field of XA_PLAYER_OUTPUT_STATE_OPEN, and will send an XA_MSG_NOTIFY_OUTPUT_BALANCE message, an XA_MSG_NOTIFY_OUTPUT_PCM_LEVEL message and an XA_MSG_NOTIFY_OUTPUT_MASTER_LEVEL message to notify of the current output volume settings.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_OPEN, name);
XA_Player::OutputOpen(const char *name);
nameconst char * name of the output to open.
player.h
XA_MSG_COMMAND_OUTPUT_CLOSE

XA_MSG_COMMAND_OUTPUT_CLOSE

Tells the player to close the output.
The player will notify of the new output state by sending back an XA_MSG_NOTIFY_OUTPUT_STATE message with a state field of XA_PLAYER_OUTPUT_STATE_CLOSED.
Since the player can be instructed to automatically close the output when stopped and/or when paused (see XA_MSG_SET_PLAYER_MODE), it is usually not necessary to send this message directly.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_CLOSE);
XA_Player::OutputClose();
player.h
XA_MSG_COMMAND_OUTPUT_OPEN

XA_MSG_COMMAND_OUTPUT_SEND_MESSAGE

Sends a private message to the output module. This is used to implement custom behavior for dynamically attached plugin output modules (most users will never need to use that message). A custom message sent to a module has a type (short integer) and a payload (a user-defined data buffer) identified by a pointer to a memory location and a size in bytes.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_SEND_MESSAGE, type, data, size);
XA_Player::OutputSendMessage(unsigned short type, void *data, unsigned int size);
typeunsigned short message type identifier (user-defined).
datavoid * pointer to the message data.
sizeunsigned int number of bytes of data.
player.h
XA_MSG_COMMAND_OUTPUT_SEND_MESSAGE

XA_MSG_COMMAND_OUTPUT_MUTE

Mutes the output. This does not stop the player from decoding the stream. Normal decoding still occurs, but no sound is heard from the output.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_MUTE);
XA_Player::OutputMute();
player.h
XA_MSG_COMMAND_OUTPUT_UNMUTE

XA_MSG_COMMAND_OUTPUT_UNMUTE

Unmutes the output. If the player's output was made mute by an XA_MSG_COMMAND_OUTPUT_MUTE message, this restores the output to the normal mode, else it does nothing.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_UNMUTE);
XA_Player::OutputUnmute();
player.h
XA_MSG_COMMAND_OUTPUT_MUTE

XA_MSG_COMMAND_OUTPUT_RESET

Resets the output. This will flush any sound that might be buffered by the output module.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_RESET);
XA_Player::OutputReset();
player.h
XA_MSG_COMMAND_OUTPUT_DRAIN

XA_MSG_COMMAND_OUTPUT_DRAIN

Tells the player to wait until the buffered samples in the output module have finished playing.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_DRAIN);
XA_Player::OutputDrain();
player.h
XA_MSG_COMMAND_OUTPUT_RESET

XA_MSG_COMMAND_OUTPUT_ADD_FILTER

Adds an output filter to the output filters chain.
The filter is identified by name, which could reference a statically linked filter, a dynamically linked filter or a built-in filter. For more details on the naming convention for modules, filters and other functional object, see the section on Symbols Naming.
The 'where' parameter identifies where the filter should be inserted. See the documentation of the related SYNC function decoder_output_add_filter for possible values of that parameter.
Once the filter is added to the filter chain, the player notifies of the filter's ID by sending back an XA_MSG_NOTIFY_OUTPUT_FILTER_INFO message.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_ADD_FILTER, name, where);
XA_Player::OutputAddFilter(const char *name, int where);
nameconst char * name of the filter to insert in the chain.
whereint identifier of the insert point for the filter.
player.h
XA_MSG_COMMAND_OUTPUT_REMOVE_FILTER, XA_MSG_COMMAND_OUTPUT_FILTERS_LIST

XA_MSG_COMMAND_OUTPUT_REMOVE_FILTER

Removes an output filter from the output filters chain.
The filter is identified by name, or by ID.
See the documentation of the related SYNC function decoder_output_remove_filter for possible values of the 'name' and 'id' parameters.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_REMOVE_FILTER, name, id);
XA_Player::OutputRemoveFilter(const char *name, int id);
nameconst char * name of the filter to remove from the chain or @@CODE(NULL).
idint identifier of the filter to remove.
player.h
XA_MSG_COMMAND_OUTPUT_ADD_FILTER, XA_MSG_COMMAND_OUTPUT_FILTERS_LIST

XA_MSG_COMMAND_OUTPUT_FILTERS_LIST

Tells the player to list the output filters currently in the chain.
For each of the filters in the chain, the decoder will send back an XA_MSG_NOTIFY_OUTPUT_FILTER_INFO message describing the filter and it's ID.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_FILTERS_LIST);
XA_Player::OutputFiltersList();
player.h
XA_MSG_COMMAND_OUTPUT_ADD_FILTER, XA_MSG_COMMAND_OUTPUT_REMOVE_FILTER

XA_MSG_COMMAND_OUTPUT_MODULE_REGISTER

Registers an output module.
The module is identified by name, which could reference a statically linked module, a dynamically linked module or a built-in module. For more details on the naming convention for modules, filters and other functional objects, see the section on Symbols Naming.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_MODULE_REGISTER, name);
XA_Player::OutputModuleRegister(const char *name);
nameconst char * name of the output module to register.
player.h
XA_MSG_COMMAND_OUTPUT_MODULE_QUERY, XA_MSG_COMMAND_OUTPUT_MODULES_LIST

XA_MSG_COMMAND_OUTPUT_MODULE_QUERY

Retrieves information about a registered output module.
The module to query is identified by ID. If a module with the requested ID is found in the list of registered modules, the player will send back an XA_MSG_NOTIFY_OUTPUT_MODULE_INFO message describing the module.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_MODULE_QUERY, id);
XA_Player::OutputModuleQuery(int id);
idint ID of the module to query.
player.h
XA_MSG_COMMAND_OUTPUT_MODULE_REGISTER, XA_MSG_COMMAND_OUTPUT_MODULES_LIST

XA_MSG_COMMAND_OUTPUT_MODULES_LIST

Retrieves a list of currently registered output modules.
For each of the registered output module, the player will send back an XA_MSG_NOTIFY_OUTPUT_MODULE_INFO message describing the module.
control_message_send(player, XA_MSG_COMMAND_OUTPUT_MODULES_LIST);
XA_Player::OutputModulesList();
player.h
XA_MSG_COMMAND_OUTPUT_MODULE_REGISTER, XA_MSG_COMMAND_OUTPUT_MODULE_QUERY

XA_MSG_SET_PLAYER_MODE

Sets flags that modify the player's behavior.
A mode is a combination of behavior flags that can individually be on or off.
Currently supported flags are:
XA_PLAYER_MODE_OUTPUT_AUTO_CLOSE_ON_STOP: if this flag is set, the player will close the output whenever it is stopped. This is convenient, since it will automatically release the audio driver on systems where the audio driver cannot be shared by several processes.
XA_PLAYER_MODE_OUTPUT_AUTO_CLOSE_ON_PAUSE: if this flag is set, the player will close the output when paused.
XA_PLAYER_MODE_OUTPUT_AUTO_CLOSE_ON_EOF: if this flag is set, the player will close the output when it reaches the end of the input stream.
control_message_send(player, XA_MSG_SET_PLAYER_MODE);
XA_Player::SetPlayerMode(unsigned long mode);
modeunsigned long OR'ed combination of operating mode flags.
player.h
XA_MSG_GET_PLAYER_MODE

XA_MSG_GET_PLAYER_MODE

Retrieves the current player mode. Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_PLAYER_MODE message with the player's current mode.
control_message_send(player, XA_MSG_GET_PLAYER_MODE, mode);
XA_Player::GetPlayerMode();
player.h
XA_MSG_SET_PLAYER_MODE

XA_MSG_SET_PLAYER_ENVIRONMENT_INTEGER

Sets the value of a player's integer environment variable.
The environment variable is specified by name.
control_message_send(player, XA_MSG_SET_PLAYER_ENVIRONMENT_INTEGER, name, value);
XA_Player::SetPlayerEnvironmentInteger(const char *name, unsigned long value);
nameconst char * name of the environment variable to set.
valueunsigned long integer value to assign to the environment variable.
player.h
XA_MSG_GET_PLAYER_ENVIRONMENT_INTEGER

XA_MSG_GET_PLAYER_ENVIRONMENT_INTEGER

Retrieves the value of a player's integer environment variable.
The environment variable is specified by name.
Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_PLAYER_ENVIRONMENT_INTEGER message with the variable's value.
control_message_send(player, XA_MSG_GET_PLAYER_ENVIRONMENT_INTEGER);
XA_Player::GetPlayerEnvironmentInteger(const char *name);
nameconst char * name of the environment variable to get.
player.h
XA_MSG_SET_PLAYER_ENVIRONMENT_INTEGER

XA_MSG_SET_PLAYER_ENVIRONMENT_STRING

Sets the value of a player's string environment variable.
The environment variable is specified by name.
control_message_send(player, XA_MSG_SET_PLAYER_ENVIRONMENT_STRING, name, value);
XA_Player::SetPlayerEnvironmentString(const char *name, const char *value);
nameconst char * name of the environment variable to set.
valueconst char * string value to assign to the environment variable.
player.h
XA_MSG_GET_PLAYER_ENVIRONMENT_STRING

XA_MSG_GET_PLAYER_ENVIRONMENT_STRING

Retrieves the value of a player's string environment variable.
The environment variable is specified by name.
Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_PLAYER_ENVIRONMENT_STRING message with the variable's value.
control_message_send(player, XA_MSG_GET_PLAYER_ENVIRONMENT_INTEGER, name);
XA_Player::GetPlayerEnvironmentString(const char *name);
nameconst char * name of the environment variable to get.
player.h
XA_MSG_SET_PLAYER_ENVIRONMENT_STRING

XA_MSG_UNSET_PLAYER_ENVIRONMENT

Deletes on of the player's environment variables.
control_message_send(player, XA_MSG_UNSET_PLAYER_ENVIRONMENT, name);
XA_Player::UnsetPlayerEnvironment(const char *name);
nameconst char * name of the environment variable to delete.
player.h
XA_MSG_SET_PLAYER_ENVIRONMENT_INTEGER, XA_MSG_SET_PLAYER_ENVIRONMENT_STRING

XA_MSG_SET_INPUT_MODULE

Sets the player's input module.
By default, the player automatically selects the input module based on the input name by probing all the registered input modules. However, if the client needs to constrain the player to always use a specific input module, it should do so by setting the input module to the ID of the registered input module that it wishes to use.
The special value XA_DECODER_INPUT_AUTOSELECT returns the player the mode of automatically selecting the input module base on the input name.
This will only take effect the next time the player needs to open the input stream. If the player has a currently open input stream, it will remain until it is explicitly closed, or a new input stream is opened.
control_message_send(player, XA_MSG_SET_INPUT_MODULE, id);
XA_Player::SetInputModule(int id);
idint ID of the registered input module to use, or the special value XA_DECODER_INPUT_AUTOSELECT.
player.h
XA_MSG_GET_INPUT_MODULE

XA_MSG_GET_INPUT_MODULE

Retrieves the ID of the current input module.
Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_INPUT_MODULE message with the current input module's ID, or the special value XA_DECODER_INPUT_AUTOSELECT.
control_message_send(player, XA_MSG_GET_INPUT_MODULE);
XA_Player::GetInputModule();
player.h
XA_MSG_SET_INPUT_MODULE

XA_MSG_SET_INPUT_POSITION_RANGE

Sets the player's position range. This is used by the player to know how frequently to send back XA_MSG_NOTIFY_INPUT_POSITION message to notify of the current stream's position. The default is 400, which means that the input stream has 400 discrete positions that can be notified.
Example: if the client wishes to display the current position in a display that is 200 pixels wide, it should set the position range to 200, so that it will not receive unnecessary notifications.
control_message_send(player, XA_MSG_SET_INPUT_POSITION_RANGE, unsigned int range);
XA_Player::SetInputPositionRange(unsigned int range);
rangeunsigned int number of discrete positions for which the player can send XA_MSG_NOTIFY_INPUT_POSITION notification messages.
player.h
XA_MSG_GET_INPUT_POSTITION_RANGE

XA_MSG_GET_INPUT_POSITION_RANGE

Retrieves the current value of the input position range.
Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_INPUT_POSITION_RANGE message with the current range value.
control_message_send(player, XA_MSG_GET_INPUT_POSITION_RANGE);
XA_Player::GetInputPositionRange();
player.h
XA_MSG_SET_INPUT_POSTITION_RANGE

XA_MSG_SET_INPUT_TIMECODE_GRANULARITY

Sets the player's timecode granularity. This is used by the player to know how frequently to send back XA_MSG_NOTIFY_INPUT_TIMECODE message to notify of the current stream's timecode. The default is 100, which means that the player will send a XA_MSG_NOTIFY_INPUT_TIMECODE message every 100 'ticks' (there are 100 'ticks' per second, so this will trigger a message every second).
The client should increase or decrease this value depending on how often it wishes to receive timecode notifications.
control_message_send(player, XA_MSG_SET_INPUT_TIMECODE_GRANULARITY, unsigned int granularity);
XA_Player::SetInputTimecodeGranularity(unsigned int granularity);
rangeunsigned int number of 'ticks' (100 ticks per second) between each XA_MSG_NOTIFY_INPUT_POSITION notification message.
player.h
XA_MSG_GET_INPUT_TIMECODE_GRANULARITY

XA_MSG_GET_INPUT_TIMECODE_GRANULARITY

Retrieves the current value of the input timecode granularity.
Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_INPUT_TIMECODE_GRANULARITY message with the current granularity value.
control_message_send(player, XA_MSG_GET_INPUT_TIMECODE_GRANULARITY);
XA_Player::GetInputTimecodeGranularity();
player.h
XA_MSG_GET_INPUT_TIMECODE_GRANULARITY

XA_MSG_SET_OUTPUT_MODULE

Sets the player's output module.
By default, the player automatically selects the output module based on the output name by probing all the registered output modules. However, if the client needs to constrain the player to always use a specific output module, it should do so by setting the output module to the ID of the registered output module that it wishes to use.
The special value XA_DECODER_OUTPUT_AUTOSELECT returns the player the mode of automatically selecting the output module base on the output name.
This will only take effect the next time the player needs to open the output device. If the player has a currently open output device, it will remain until it is explicitly closed, or a new output device is opened.
control_message_send(player, XA_MSG_SET_OUTPUT_MODULE, id);
XA_Player::SetOutputModule(int id);
idint ID of the registered output module to use, or the special value XA_DECODER_OUTPUT_AUTOSELECT.
player.h
XA_MSG_GET_OUTPUT_MODULE

XA_MSG_GET_OUTPUT_MODULE

Retrieves the ID of the current output module.
Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_OUTPUT_MODULE message with the current output module's ID, or the special value XA_DECODER_OUTPUT_AUTOSELECT.
control_message_send(player, XA_MSG_GET_OUTPUT_MODULE);
XA_Player::GetOutputModule();
player.h
XA_MSG_SET_OUTPUT_MODULE

XA_MSG_SET_OUTPUT_NAME

Sets the player's default output name.
When the client sends an XA_MSG_COMMAND_OUTPUT_OPEN message with a name parameter that is NULL or an empty string (""), or when the player receives an XA_MSG_COMMAND_PLAY message and needs to automatically open the output device, the player will use the default output device. Normally, the default output has NULL name value, which will open the default audio driver. If the client wishes to have a different default output device, it should set its name by sending this message.
control_message_send(player, XA_MSG_SET_OUTPUT_NAME, name);
XA_Player::SetOutputName(const char *name);
nameconst char * name of the default output device.
player.h
XA_MSG_SET_OUTPUT_NAME

XA_MSG_GET_OUTPUT_NAME

Retrieves the name of the current output device.
Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_OUTPUT_NAME message with the current output name.
control_message_send(player, XA_MSG_GET_OUTPUT_NAME);
XA_Player::GetOutputName();
player.h
XA_MSG_SET_OUTPUT_NAME

XA_MSG_SET_OUTPUT_VOLUME

Sets the player's output volume parameters.
The output volume is specified as a set or 3 values (master level, pcm level, and balance).
The master level refers to the general sound volume of the soundcard (affects all of the soundcards inputs, like CD, Microphone, WAV, MIDI, etc...). The master level value is an integer between 0 (silent) and 100 (maximum loudness).The PCM level refers to the sound volume of the PCM (also called WAVE on some mixers) input to the mixer (does not affect other soundcard inputs). The PCM level value is an integer between 0 (silent) and 100 (maximum loudness).
The balance is used to give a higher sound level to the left or right speaker. The balance setting is a value between 0 (sound totally on the left side) and 100 (sound totally on the right side), so a sound evenly distributed between left and right sides would be a balance setting of 50.
When the player is created it uses the current setting of the soundcard.
For each of these 3 values, the special value XA_OUTPUT_VOLUME_IGNORE_FIELD can be used to tell the player NOT TO CHANGE the corresponding setting (example: to set the master level to 80%, the PCM level to 70% and not change the balance, the client would call control_message_send(player.
control_message_send(player, XA_MSG_SET_OUTPUT_VOLUME, balance, pcm_level, master_level);
XA_Player::SetOutputVolume(int balance, int pcm_level, int master_level);
nameconst char * name of the default output device.
balanceintbalance value (between 0 and 100).
pcm_levelint value of the PCM sound level (between 0 and 100).
master_levelint value of the master sound level (between 0 and 100).
player.h
XA_MSG_GET_OUTPUT_VOLUME

XA_MSG_GET_OUTPUT_VOLUME

Retrieves the current output volume settings.
Upon receipt of this message, the player sends back 3 messages. An XA_MSG_NOTIFY_OUTPUT_BALANCE for the current balance setting, an XA_MSG_NOTIFY_OUTPUT_PCM_LEVEL message with the current PCM level setting, and an XA_MSG_NOTIFY_OUTPUT_MASTER_LEVEL message with the current master setting.
control_message_send(player, XA_MSG_GET_OUTPUT_VOLUME);
XA_Player::GetOutputVolume();
player.h
XA_MSG_SET_OUTPUT_VOLUME

XA_MSG_SET_OUTPUT_CHANNELS

Sets the player's output channels settings.
There are 4 different channels settings possible:
XA_OUTPUT_STEREO: decode and output both channels if the stream is stereo.
XA_OUTPUT_MONO_LEFT: decode and output the left channel only channels if the stream is stereo.
XA_OUTPUT_MONO_RIGHT: decode and output the right channel only if the stream is stereo.
XA_OUTPUT_MONO_MIX: decode both channels and output one channel that is a mix of both decoded channels (this uses less CPU than XA_OUTPUT_STEREO).
control_message_send(player, XA_MSG_SET_OUTPUT_CHANNELS, channels);
XA_Player::SetOutputChannels(int channels);
channelsint one of 4 channel configurations.
player.h
XA_MSG_GET_OUTPUT_CHANNELS

XA_MSG_GET_OUTPUT_CHANNELS

Retrieves the current output channels configuration.
Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_OUTPUT_CHANNELS message with the current channel configuration.
control_message_send(player, XA_MSG_GET_OUTPUT_CHANNELS);
XA_Player::GetOutputChannels();
player.h
XA_MSG_SET_OUTPUT_CHANNELS

XA_MSG_SET_OUTPUT_PORTS

Sets the player's output ports settings.
An output ports configuration is a combination of flags that indicate which of the different ports of the soundcard is enabled.
There are 3 flags defined:
XA_DECODER_CONTROL_OUTPUT_LINE: the 'line out' output of the soundcard.
XA_DECODER_CONTROL_OUTPUT_SPEAKER: the 'speaker out' output of the soundcard.
XA_DECODER_CONTROL_OUTPUT_HEADPHONE: the 'headphone out' output of the soundcard.
Note that not all soundcards support multiple output ports.
control_message_send(player, XA_MSG_SET_OUTPUT_PORTS, ports);
XA_Player::SetOutputPorts(unsigned char ports);
portsunsigned char OR'ed combination of the output port flags.
player.h
XA_MSG_GET_OUTPUT_PORTS

XA_MSG_GET_OUTPUT_PORTS

Retrieves the current output ports configuration.
Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_OUTPUT_PORTS message with the current ports configuration.
control_message_send(player, XA_MSG_GET_OUTPUT_PORTS);
XA_Player::GetOutputPorts();
player.h
XA_MSG_SET_OUTPUT_PORTS

XA_MSG_SET_CODEC_EQUALIZER

Sets the codec's frequency band equalizer's values.
The euqalizer values consist of 2 sets of 32 values (one set for the left channel, one set for the right channel), each value being a signed integer between -128 and +127. See section on Codec Equalizer for more details on equalizer values.
Note that this routine will make copies of the values within the equalizer structure passed, so the client can discard that structure when this call returns, or it can pass a structure that was allocated on the stack.
If the equalizer pointer passed as an argument is

CODE(NULL), this will have the effect of disabling the equalizer (disabling the equalizer reduces the CPU usage of the player).
control_message_send(player, XA_MSG_SET_CODEC_EQUALIZER, equalizer);
XA_Player::SetCodecEqualizer(XA_EqualizerInfo *equalizer);
equalizerXA_EqualizerInfo *equalizer pointer to a structure that contains equalizer values for the left and right channels.
player.h
XA_MSG_GET_OUTPUT_PORTS

XA_MSG_GET_CODEC_EQUALIZER

Retrieves the current equalizer settings.
Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_CODEC_EQUALIZER message with the current equalizer settings.
control_message_send(player, XA_MSG_GET_CODEC_EQUALZIER);
XA_Player::GetCodecEqualizer();
player.h
XA_MSG_SET_CODEC_EQUALIZER

XA_MSG_SET_NOTIFICATION_MASK

Sets the player's notification mask. This mask is used to block or unblock certain types of notification messages. If the client wished not to receive certain notification messages, it can set the notification mask with those messages' flag turned off.
The default for the notification mask is to send back all notification messages.
Valid notification mask flags are:
XA_NOTIFY_MASK_ERROR
XA_NOTIFY_MASK_DEBUG
XA_NOTIFY_MASK_PROGRESS
XA_NOTIFY_MASK_ACK
XA_NOTIFY_MASK_NACK
XA_NOTIFY_MASK_PLAYER_STATE
XA_NOTIFY_MASK_INPUT_STATE
XA_NOTIFY_MASK_INPUT_CAPS
XA_NOTIFY_MASK_INPUT_NAME
XA_NOTIFY_MASK_INPUT_DURATION
XA_NOTIFY_MASK_INPUT_POSITION_RANGE
XA_NOTIFY_MASK_INPUT_POSITION
XA_NOTIFY_MASK_INPUT_TIMECODE_GRANULARITY
XA_NOTIFY_MASK_INPUT_TIMECODE
XA_NOTIFY_MASK_INPUT_STREAM_INFO
XA_NOTIFY_MASK_OUTPUT_STATE
XA_NOTIFY_MASK_OUTPUT_NAME
XA_NOTIFY_MASK_OUTPUT_VOLUME
XA_NOTIFY_MASK_OUTPUT_BALANCE
XA_NOTIFY_MASK_OUTPUT_PCM_LEVEL
XA_NOTIFY_MASK_OUTPUT_MASTER_LEVEL
XA_NOTIFY_MASK_OUTPUT_PORTS
XA_NOTIFY_MASK_OUTPUT_CAPS
XA_NOTIFY_MASK_CODEC_EQUALIZER
XA_NOTIFY_MASK_FEEDBACK_EVENT
control_message_send(player, XA_MSG_SET_NOTIFICATION_MASK, mask);
XA_Player::SetNotificationMask(unsigned long mask);
maskunsigned long OR'ed combination of message class flags.
player.h
XA_MSG_GET_NOTIFICATION_MASK

XA_MSG_GET_NOTIFICATION_MASK

Retrieves the current value of the notification mask.
Upon receipt of this message, the player sends back an XA_MSG_NOTIFY_NOTIFICATION_MASK message with the current mask value.
control_message_send(player, XA_MSG_GET_NOTIFICTION_MASK);
XA_Player::GetNotificationMask();
player.h
XA_MSG_SET_NOTIFICATION_MASK