Init Function

Dispatch-tables {{AFX_DISPATCH(CMp3PCtrl)

Protected afx_msg void Init(short , short , long )

Type Name Description
  short mode  
  short card  
  long ahWnd  
       
Return Description
  afx_msg void  


Priority Function

Sets the priority of the player

Protected afx_msg void Priority(short )

Type Name Description
  short priority the new priority value
       
  Return Description
  afx_msg void  


Play Function

Plays the opened file

Protected afx_msg void Play()

Return Description
  afx_msg void  


Pause Function

Pauses the file currently being played

Protected afx_msg void Pause()

Return Description
  afx_msg void  


Stop Function

Stops the current file.

Protected afx_msg void Stop()

Return Description
  afx_msg void  


Seek Function

Seeks to a specified offset in the file.

Offset and Range are used to dictate the percentage of the file that you want to seek past. For example: offset = 10, range = 100 would seek past the first 10% of the file.

Protected afx_msg void Seek(long , long )

Type Name Description
  long offset long indicating the beginning of the offset (the numerator of the percentage)
  long range long indicating the total range of the file (the denominator of the percentage)
       
  Return Description
  afx_msg void  


InputOpen Function

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

Protected afx_msg void InputOpen(LPCTSTR )

Type Name Description
  LPCTSTR name string containing the name
       
  Return Description
  afx_msg void  


InputClose Function

Closes the open file.

Protected afx_msg void InputClose()

Return Description
  afx_msg void  


OutputMute Function

Mutes the sound output.

Protected afx_msg void OutputMute()

Return Description
  afx_msg void  


OutputUnmute Function

Unmutes the sound.

Protected afx_msg void OutputUnmute()

Return Description
  afx_msg void  


PositionRange Function

Sets the range to use for the position. For example, a value of 10 would make the position go from 0-10 over the course of playing the file

Protected afx_msg void PositionRange(long )

Type Name Description
  long range long representing the new range value
       
  Return Description
  afx_msg void  


TimecodeGranularity Function

Sets the player's timecode granularity.
This is used by the player to know how frequently to send back INPUT_TIMECODE messages to notify of the current stream's timecode. The default is 100, which means that the player will send an 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.

Protected afx_msg void TimecodeGranularity(long )

Type Name Description
  long ticks number of 'ticks' (100 ticks per second) between each INPUT_POSITION notification message.
       
  Return Description
  afx_msg void  


Volume Function

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.

Protected afx_msg void Volume(short , short , short )

Type Name Description
  short balance short representing the balance of the volume (between 0 and 100)
  short pcm short representing the PCM level (between 0 and 100)
  short master short representing the master level (between 0 and 100)
       
  Return Description
  afx_msg void  


Channels Function

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

Protected afx_msg void Channels(short )

Type Name Description
  short channels one of the channel configurations
       
  Return Description
  afx_msg void  


Ports Function

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.

Protected afx_msg void Ports(short )

Type Name Description
  short ports OR'ed combination of the output port flags
       
  Return Description
  afx_msg void  


NotificationMask Function

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

Protected afx_msg void NotificationMask(long )

Type Name Description
  long mask OR'ed combination of message class flags
       
  Return Description
  afx_msg void  


DebugLevel Function

Sets the debug level

Protected afx_msg void DebugLevel(short )

Type Name Description
  short level short representing the debug level (possible debug levels: unknown)
       
  Return Description
  afx_msg void  


Mode Function

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.

Protected afx_msg void Mode(long )

Type Name Description
  long mode OR'ed combination of operating mode flags
       
  Return Description
  afx_msg void  


OutputOpen Function

Open the specified device for output

Protected afx_msg void OutputOpen(LPCTSTR )

Type Name Description
  LPCTSTR name string representing the name of the output device
       
  Return Description
  afx_msg void  


OutputClose Function

Closes the output device

Protected afx_msg void OutputClose()

Return Description
  afx_msg void  


Exit Function

Exits the control

Protected afx_msg void Exit()

Return Description
  afx_msg void  


Ping Function

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.

Protected afx_msg void Ping(long )

Type Name Description
  long tag the tag to send with the ping
       
  Return Description
  afx_msg void  


InputSendMessage Function

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.

Protected afx_msg void InputSendMessage(short , LPUNKNOWN , long )

Type Name Description
  short type message type identifier (user-defined)
  LPUNKNOWN data the message data
  long size number of bytes of data
       
  Return Description
  afx_msg void  


InputRemoveFilter Function

Removes a filter from the decoder's input filters chain. The filter to be removed can be identified by name or by ID.

Protected afx_msg void InputRemoveFilter(LPCTSTR , short )

Type Name Description
  LPCTSTR name Name of the filter to remove
  short id ID of the filter to remove
       
  Return Description
  afx_msg void  


InputFilterList Function

Tells the player to list the input filters currently in the chain.

Protected afx_msg void InputFilterList()

Return Description
  afx_msg void  


InputModuleRegister Function

Registers an input module in the list of attached input modules. The built-in input modules are: file input module, network stream input module, and memory input module.

Protected afx_msg void InputModuleRegister(LPCTSTR )

Type Name Description
  LPCTSTR name name of the input module
       
  Return Description
  afx_msg void  


InputModuleList Function

Retrieves a list of currently registered input modules. For each of the registered input module, the player will send back an INPUT_MODULE_INFO message describing the module.

Protected afx_msg void InputModuleList()

Return Description
  afx_msg void  


OutputReset Function

Resets the output. This will flush any sound that might be buffered by the output module.

Protected afx_msg void OutputReset()

Return Description
  afx_msg void  


OutputDrain Function

Tells the player to wait until the buffered samples in the output module have finished playing

Protected afx_msg void OutputDrain()

Return Description
  afx_msg void  


OutputSendMessage Function

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.

Protected afx_msg void OutputSendMessage(short , LPUNKNOWN , long )

Type Name Description
  short type message type identifier (user-defined)
  LPUNKNOWN data the message data
  long size number of bytes of data
       
  Return Description
  afx_msg void  


OutputRemoveFilter Function

Removes a filter from the decoder's output filter chain. The filter to be removed can be identified by name or by ID.

Protected afx_msg void OutputRemoveFilter(LPCTSTR , short )

Type Name Description
  LPCTSTR name Name of the filter to remove
  short id ID of the filter to remove
       
  Return Description
  afx_msg void  


OutputFilterList Function

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 OUTPUT_FILTER_INFO message describing the filter and it's ID.

Protected afx_msg void OutputFilterList()

Return Description
  afx_msg void  


OutputModuleRegister Function

Registers an output module in the list of attached output modules. The built-in output modules are Audio Sound Card Ouput Module and File Output Module.

Protected afx_msg void OutputModuleRegister(LPCTSTR )

Type Name Description
  LPCTSTR name name of the module to register
       
  Return Description
  afx_msg void  


OutputModuleList Function

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 OUTPUT_FILTER_INFO message describing the filter and it's ID.

Protected afx_msg void OutputModuleList()

Return Description
  afx_msg void  


SetPlayerEnvironmentInteger Function

Sets the value of a player's integer environment variable. The environment variable is specified by name.

Protected afx_msg void SetPlayerEnvironmentInteger(LPCTSTR , long )

Type Name Description
  LPCTSTR name name of the environment variable to set
  long value integer value to assign to the environment variable
       
  Return Description
  afx_msg void  


SetPlayerEnvironmentString Function

Sets the value of a player's string environment variable. The environment variable is specified by name.

Protected afx_msg void SetPlayerEnvironmentString(LPCTSTR , LPCTSTR )

Type Name Description
  LPCTSTR name name of the environment variable to set
  LPCTSTR value string value to assign to the environment variable
       
  Return Description
  afx_msg void  


UnsetPlayerEnvironment Function

Deletes on of the player's environment variables.

Protected afx_msg void UnsetPlayerEnvironment(LPCTSTR )

Type Name Description
  LPCTSTR name name of the environment variable to delete
       
  Return Description
  afx_msg void  


SetInputName Function

Sets the input name.
Functions similar to InputOpen

Protected afx_msg void SetInputName(LPCTSTR )

Type Name Description
  LPCTSTR name name of the input
       
  Return Description
  afx_msg void  


SetOutputName Function

Sets the player's default output name.

When the OutputOpen method is called with a name parameter that is NULL or an empty string (""), or when the Play method is called and the player 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 you wish to have a different default output device, you should set its name by calling this method.

Protected afx_msg void SetOutputName(LPCTSTR )

Type Name Description
  LPCTSTR name name of the default output device
       
  Return Description
  afx_msg void  


SetOutputFeedbackRate Function

Currently not implemented.

Protected afx_msg void SetOutputFeedbackRate(short )

Type Name Description
  short rate  
       
  Return Description
  afx_msg void  


SetCodecQuality Function

Sets the decoding quality of the codec (if the codec supports different decoding qualities).

Protected afx_msg void SetCodecQuality(short )

Type Name Description
  short quality Decoding quality
       
  Return Description
  afx_msg void  


InputAddFilter Function

Adds an input filter for the decoder. An input filter is a function table that will bridge calls between the decoder and the input module. Several input filters can be inserted between the decoder and the input module. Filters are chained, they are called in order from the first to the last. When inserting a new filter, an ID specifies at which point in the list of current input filters it should be added.

Protected afx_msg void InputAddFilter(LPCTSTR , short )

Type Name Description
  LPCTSTR name name of the filter
  short whr ID of the filter before which the new filter should be inserted
       
  Return Description
  afx_msg void  


OutputAddFilter Function

Adds an output filter for the decoder. An output filter is a function table that will bridge calls between the decoder and the output module. Several output filters can be inserted between the decoder and the output module. Output filters are chained, and called in order from the first to the last. When inserting a new filter, an ID specifies at which point in the list of current output filters it should be added.

Protected afx_msg void OutputAddFilter(LPCTSTR , short )

Type Name Description
  LPCTSTR name name of the output filter
  short whr ID of the filter before which the new filter should be inserted
       
  Return Description
  afx_msg void  


InputModuleQuery Function

Retrieves information about a registered input module.

Protected afx_msg void InputModuleQuery(short )

Type Name Description
  short modul ID of a registered input module.
       
  Return Description
  afx_msg void  


OutputModuleQuery Function

Retrieves information about a registered output module.

Protected afx_msg void OutputModuleQuery(short )

Type Name Description
  short modul ID of a registered output module.
       
  Return Description
  afx_msg void  


SetInputModule Function

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

Protected afx_msg void SetInputModule(short )

Type Name Description
  short modul ID of the registered input module to use
       
  Return Description
  afx_msg void  


SetOutputModule Function

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

Protected afx_msg void SetOutputModule(short )

Type Name Description
  short modul ID of the registered output module to use
       
  Return Description
  afx_msg void  


GetPlayerMode Function

Retrieves the current player mode.
Upon receipt of this message, the player sends back a PLAYER_MODE message with the player's current mode.

Protected afx_msg long GetPlayerMode()

  Return Description
  afx_msg long Returns the player mode



GetPlayerEnvironmentInteger Function

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 a PLAYER_ENVIRONMENT_INTEGER message with the variable's value.

Protected afx_msg long GetPlayerEnvironmentInteger(LPCTSTR )

Type Name Description
  LPCTSTR name name of the environment variable to get
       
  Return Description
  afx_msg long returns the value of the environment variable


GetPlayerEnvironmentString Function

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 a PLAYER_ENVIRONMENT_STRING message with the variable's value.

Protected afx_msg BSTR GetPlayerEnvironmentString(LPCTSTR )

Type Name Description
  LPCTSTR name name of the environment variable to get
       
  Return Description
  afx_msg BSTR returns the value of the environment variable


GetInputModuleName Function

Retrieves the ID of the current input module.
Upon receipt of this message, the player sends back an INPUT_MODULE message with the current input module's ID, or the special value XA_DECODER_INPUT_AUTOSELECT

Protected afx_msg BSTR GetInputModuleName()

  Return Description
  afx_msg BSTR returns a string containing the name of the input module



GetInputName Function

Retrieves the name of the current input

Protected afx_msg BSTR GetInputName()

  Return Description
  afx_msg BSTR returns a string containing the name of the current input



GetPositionRange Function

Gets the position range

Protected afx_msg long GetPositionRange()

  Return Description
  afx_msg long

Returns the position range



GetOutputName Function

Retrieves the name of the current output device.
Upon receipt of this message, the player sends back an OUTPUT_NAME message with the current output name.

Protected afx_msg BSTR GetOutputName()

  Return Description
  afx_msg BSTR

Returns the name



GetMasterVolume Function

Gets the master volume level

Protected afx_msg long GetMasterVolume()

  Return Description
  afx_msg long

Returns the master volume level



GetDebugLevel Function

Gets the current debug level

Protected afx_msg long GetDebugLevel()

  Return Description
  afx_msg long

Returns the current debug level



GetPositionPercentage Function

Gets the position (as a percentage of the range)

Protected afx_msg float GetPositionPercentage()

  Return Description
  afx_msg float

Returns the current position percentage



GetTimecodeGranularity Function

Retrieves the current value of the input timecode granularity.
Upon receipt of this message, the player sends back an INPUT_TIMECODE_GRANULARITY message with the current granularity value.

Protected afx_msg long GetTimecodeGranularity()

  Return Description
  afx_msg long

returns the current granularity value



GetPosition Function

Retrieves the current position

Protected afx_msg long GetPosition()

  Return Description
  afx_msg long

returns the current position



GetTime Function

Gets the current time The parameter specifies how the time should be returned:

0 - total seconds returned
1 - current hours
2 - current minutes
3 - current seconds returned
4 - current minutes/10
5 - current minutes mod 10
6 - current seconds/10
7 - current seconds mod 10
8 - total seconds

Returns the current time in the format specified

Protected afx_msg long GetTime(long )

Type Name Description
  long timeFormat The parameter specifies how the time should be returned:
0 - total seconds returned
1 - current hours
2 - current minutes
3 - current seconds returned
4 - current minutes/10
5 - current minutes mod 10
6 - current seconds/10
7 - current seconds mod 10
8 - total seconds
       
  Return Description
  afx_msg long Returns the current time in the format specified


GetTagStringInfo Function

Gets information from the file tag

Protected afx_msg BSTR GetTagStringInfo(long )

Type Name Description
  long tagInfo The parameter specifies which part of the tag should be returned:
0 - title
1 - artist
2 - album
3 - year
4 - genre
5 - comment
6 - bitrate
       
  Return Description
  afx_msg BSTR Returns the desired information as a string