The player control transparently supports the playback of several different file formats and compression formats. Formats supported for playback in this version:
asxFILE_FORMAT | _WAV | _RAW |
Filename Extension | .WAV | any |
_PCM8 or _PCM16 | supported | write only |
_PCM24 or _PCM32 | supported | write only |
_PCM32_FLOAT | supported | write only |
_MPEG_L2 | supported | supported |
_MPEG_L3 | supported | supported |
_MPEG_AACPLUS | not supported yet | not supported yet |
_DOLBY_AC2 | not supported yet | not supported yet |
Player State Diagram

Functions | |
| ASX32_API ASX_ERROR | ASX_Player_Open (ASX_HANDLE hPlayer, const char *pszFile) |
| Open a file for playback. | |
| ASX32_API ASX_ERROR | ASX_Player_Format_GetString (ASX_HANDLE hPlayer, char **pszFormat) |
| Get the format of the currently opened file as a string. | |
| ASX32_API ASX_ERROR | ASX_Player_Format_GetDetails (ASX_HANDLE hPlayer, enum asxAUDIO_FORMAT *peFormat, int *pnChannnels, int *pnSampleRate, int *pnBitRate) |
| Get the format of the currently opened file as individual variables. | |
| ASX32_API ASX_ERROR | ASX_Player_PreLoad (ASX_HANDLE hPlayer, const enum asxTIMESCALE nType, const unsigned long lPosition) |
| Preloads playback buffers from the given position, ready for playback. | |
| ASX32_API ASX_ERROR | ASX_Player_Start (ASX_HANDLE hPlayer) |
| Start playback of a previously opened (and optionally pre-loaded) file. | |
| ASX32_API ASX_ERROR | ASX_Player_Pause (ASX_HANDLE hPlayer) |
| Pause playback of the currently playing file. | |
| ASX32_API ASX_ERROR | ASX_Player_Stop (ASX_HANDLE hPlayer) |
| Stops playback of the currently playing file. | |
| ASX32_API ASX_ERROR | ASX_Player_Wait (ASX_HANDLE hPlayer) |
| Wait for the current file to finish. | |
| ASX32_API ASX_ERROR | ASX_Player_Close (ASX_HANDLE hPlayer) |
| Close the current playback file. | |
| ASX32_API ASX_ERROR | ASX_Player_GetPosition (ASX_HANDLE hPlayer, const enum asxTIMESCALE nType, unsigned long *plPosition) |
| Get the current playback position. | |
| ASX32_API ASX_ERROR | ASX_Player_GetState (ASX_HANDLE hPlayer, enum asxPLAYER_STATE *pnState) |
| Get the current playback state. | |
| ASX32_API ASX_ERROR | ASX_Player_SetTimeScale (ASX_HANDLE hPlayer, const float fTimeScale) |
| Set the playback timescale. | |
| ASX32_API ASX_ERROR | ASX_Player_GetTimeScale (ASX_HANDLE hPlayer, float *pfTimeScale) |
| Get the playback timescale. | |
| ASX32_API ASX_ERROR | ASX_Player_GetFilename (ASX_HANDLE hPlayer, char *pszFilename, const int nStringLength, int *pnRequiredLength) |
| Get the current filename, if any. | |
| ASX32_API ASX_ERROR | ASX_Player_SetLoopMode (ASX_HANDLE hPlayer, const int nLooping) |
| Set the player to loop or single play mode. | |
| ASX32_API ASX_ERROR | ASX_Player_GetLoopMode (ASX_HANDLE hPlayer, int *pnLooping) |
| Get the current player loop mode. | |
|
|
Close the current playback file.
|
|
||||||||||||||||||||||||
|
Get the format of the currently opened file as individual variables.
|
|
||||||||||||
|
Get the format of the currently opened file as a string.
|
|
||||||||||||||||||||
|
Get the current filename, if any.
|
|
||||||||||||
|
Get the current player loop mode.
|
|
||||||||||||||||
|
Get the current playback position. This function returns the relative playback position since the file start playing. The position is relative to the position at which playback was started.
|
|
||||||||||||
|
Get the current playback state.
|
|
||||||||||||
|
Get the playback timescale. This function allows the user read the time ratio. Time scale range is 0.8 - 1.2 (80% to o120%) of original file time.
|
|
||||||||||||
|
Open a file for playback.
w = waveform = SINE (default=SINE) Defaults can be used if the complete string is not specifed, ie "~" -> "~wSINE,c2,f1000,a0,m11,s48000,tFLOAT32" Any subset of the options may be specified, the remaining options will be set to the defaults. eg "~f500" -> 500Hz stereo sine wave at 0dBFS, 48kHz samplerate
|
|
|
Pause playback of the currently playing file. Use ASX_Player_Start to continue playing. To end a paused recording call ASX_Player_Stop.
|
|
||||||||||||||||
|
Preloads playback buffers from the given position, ready for playback. This function will seek to the specified file position and then load audio buffers from the file. This shortens the time between the time a ASX_Player_Start() is issued and the time for audio to be output.
|
|
||||||||||||
|
Set the player to loop or single play mode.
|
|
||||||||||||
|
Set the playback timescale. This function allows the user to adjust the time a file takes to playback without affecting the pitch. Time scale range is 0.8 - 1.2 (80% to o120%) of original file time.
|
|
|
Start playback of a previously opened (and optionally pre-loaded) file.
|
|
|
Stops playback of the currently playing file. This call resets the play position as well as stopping playback. Use ASX_Player_Pause() to retain the current position.
|
|
|
Wait for the current file to finish. This function does not return until the current file has finished playing.
|
1.4.6-NO