[Image]  APEX AUDIO SYSTEM
Instruction Manual

intro | getting started | conv2aas | example | faq
api : index | general | sfx | mod | misc | mixer


:: AAS_MOD_Play
PROTOTYPE int AAS_MOD_Play( int song_num );
FUNCTION Starts playing the specified MOD file.
PARAMETERS
Name Valid values Meaning
song_num AAS_DATA_MOD_???, where ??? is the name of the MOD you wish to play (see your project's AAS_Data.h file for a complete list of all available MODs) Specifies the MOD you want to start playing
RETURNS
AAS_OK : The function executed correctly.
AAS_ERROR_MOD_DOES_NOT_EXIST : The MOD you requested does not exist.
AAS_ERROR_CALL_SET_CONFIG_FIRST : AAS_SetConfig has not been successfully called yet. It must be successfully called at least once before calling this function.
AAS_ERROR_NOT_ENOUGH_CHANNELS : The MOD you requested needs more channels than you have available.
NOTES

If an existing MOD file is already playing it will be replaced by the new selection. AAS_SetConfig must be called at least once before calling this function. Any sound effects that are playing in the MOD channels will be stopped.


:: AAS_MOD_SetLoop
PROTOTYPE int AAS_MOD_SetLoop( AAS_BOOL loop );
FUNCTION Specifies whether the current MOD will loop. All MODs loop by default.
PARAMETERS
Name Valid values Meaning
loop AAS_TRUE or AAS_FALSE Specifies whether the current MOD will loop
RETURNS
AAS_OK : The MOD has been set to loop as requested.
AAS_ERROR_NO_MOD_PLAYING : The command failed because no MOD is currently playing.
AAS_ERROR_CALL_SET_CONFIG_FIRST : AAS_SetConfig has not been successfully called yet. It must be successfully called at least once before calling this function.
NOTES All MODs loop by default. This means that if you want your MODs not to loop, you must call "AAS_MOD_SetLoop( AAS_FALSE );" immediately after the AAS_MOD_Play command.

:: AAS_MOD_Stop
PROTOTYPE void AAS_MOD_Stop();
FUNCTION Stops playing current MOD.
PARAMETERS None
RETURNS Nothing
NOTES

If a MOD is currently playing it will be stopped. Any sound effects that are playing in the MOD channels will be stopped - see AAS_SetConfig.


:: AAS_MOD_Pause
PROTOTYPE void AAS_MOD_Pause();
FUNCTION Pauses the current MOD. It can be continued later using AAS_MOD_Resume.
PARAMETERS None
RETURNS Nothing
NOTES

Unlike AAS_MOD_Stop, the channels used by the MOD player are not returned for use as SFX channels when AAS_MOD_Pause is called.


:: AAS_MOD_Resume
PROTOTYPE void AAS_MOD_Resume();
FUNCTION Resumes a MOD that was previously paused using AAS_MOD_Pause.
PARAMETERS None
RETURNS Nothing
NOTES

Calling AAS_MOD_Resume without pausing a MOD beforehand using AAS_MOD_Pause will have no effect. Resuming a MOD that is already playing also has no effect.


:: AAS_MOD_IsPlaying
PROTOTYPE AAS_BOOL AAS_MOD_IsPlaying();
FUNCTION Checks whether a MOD is currently playing.
PARAMETERS None
RETURNS
AAS_FALSE : No MOD is currently playing.
AAS_TRUE : A MOD is currently playing.
NOTES None

:: AAS_MOD_HasLooped
PROTOTYPE AAS_BOOL AAS_MOD_HasLooped();
FUNCTION Checks whether or not the current MOD has looped.
PARAMETERS None
RETURNS
AAS_FALSE : The MOD has not yet looped.
AAS_TRUE : The MOD has looped.
NOTES Always returns AAS_FALSE if no MOD is playing or if AAS has not yet been initialised.

:: AAS_MOD_GetVolume
PROTOTYPE int AAS_MOD_GetVolume();
FUNCTION Returns the current volume for MOD tunes. 0 = silent, 256 = max.
PARAMETERS None
RETURNS
0-256 : The current MOD volume. 0 = silent, 256 = max.
NOTES None

:: AAS_MOD_SetVolume
PROTOTYPE int AAS_MOD_SetVolume( int vol );
FUNCTION Sets the current volume for MOD tunes. 0 = silent, 256 = max.
PARAMETERS
Name Valid values Meaning
vol 0-256 Specifies the new volume you want MODs to be played at
RETURNS
AAS_OK : The volume was successfully changed as requested.
AAS_ERROR_VOLUME_OUT_OF_RANGE : The volume was not in the range 0-256. The MOD volume has not been adjusted.
NOTES None

:: AAS_MOD_GetSongPos
PROTOTYPE int AAS_MOD_GetSongPos();
FUNCTION Returns the current song position of the playing MOD.
PARAMETERS None
RETURNS
0-127 : The current song position.
AAS_ERROR_NO_MOD_PLAYING : There is no MOD currently playing.
NOTES None

:: AAS_MOD_SetSongPos
PROTOTYPE int AAS_MOD_SetSongPos( int song_pos );
FUNCTION Immediately jumps to the specified song position.
PARAMETERS
Name Valid values Meaning
song_pos 0-127 Specifies the new song position
RETURNS
AAS_OK : The function executed correctly.
AAS_ERROR_INVALID_SONG_POS : The specified song position does not exist.
AAS_ERROR_NO_MOD_PLAYING : There is no MOD currently playing.
NOTES None

:: AAS_MOD_QueueSongPos
PROTOTYPE int AAS_MOD_QueueSongPos( int song_pos );
FUNCTION Jumps to the specified song position when the current pattern finishes.
PARAMETERS
Name Valid values Meaning
song_pos 0-127 Specifies the new song position
RETURNS
AAS_OK : The function executed correctly.
AAS_ERROR_INVALID_SONG_POS : The specified song position does not exist.
AAS_ERROR_NO_MOD_PLAYING : There is no MOD currently playing.
NOTES None

:: AAS_MOD_GetLineNum
PROTOTYPE int AAS_MOD_GetLineNum();
FUNCTION Returns the current line number of the playing MOD.
PARAMETERS None
RETURNS
0-63 : The current line number.
AAS_ERROR_NO_MOD_PLAYING : There is no MOD currently playing.
NOTES None

:: AAS_MOD_GetLastFilterValue
PROTOTYPE int AAS_MOD_GetLastFilterValue();
FUNCTION Returns the value specified by the most recent "E0: Set Filter" effect. Can be used to sychronise code with the music.
PARAMETERS None
RETURNS
0-15 : The most recent value specified by an "E0: Set Filter" effect.
NOTES Will return 0 if no "E0: Set Filter" effect has yet been found, if no MOD is playing or if AAS has not been initialised. The "E0: Set Filter" effect makes no difference to the sound output of AAS as the GBA has no hardware filter so it is safe to change whilst a piece of music is playing.

:: AAS_MOD_GetNumChannels
PROTOTYPE int AAS_MOD_GetNumChannels();
FUNCTION Returns the number of channels that are currently being reserved by the MOD.
PARAMETERS None
RETURNS
0-16 : The number of channels that are currently being reserved by the MOD.
NOTES

None