This is the single-bank version of the player, it does not do any 
bank-switching.

This batch file builds a 32KiB ROM (player.gb) where the last 16KB contains 
the player, music and sound effect data.
This bank can be extracted and linked to other projects built with other 
Gameboy assemblers / C compilers.

If the resulting ROM is larger than 32KB this wont work: This means the 
music/sfx data is too large for a single bank.

If you are using RGBDS it might be more convenient to use the full featured 
multi-bank player for your projects as there is no single-bank limit.
You will need to use the provided system (base.asm, mbc5.inc, etc. or modify 
the player to use your own bank switching code)

The player's rom bank must be selected before calling the audio functions. 
You can change the GBC internal ram bank but it must be changed
back to the audio system's ram bank before calling any audio functions.

The player uses memory DF80-DFFF inclusive

First call Audio_Init, if you have more than one bank of the audio system 
you'll need to call this every time you change to another audio system bank 
(call the Audio_Init of the new audio system, not the one in the previous 
bank).

Call Audio_FrameProcess at a rate of 60hz (after every vblank is a good 
idea) you dont need to disable interrupts and the audio system doesnt disable 
them either. You can call it at a different rate but sound effects will speed
up or slow down as well as music.

To start playing a song call Audio_Music_Play with the song number, you dont 
need to call Audio_Music_Stop before, Audio_Music_Play does it internally.

When you need to (like when pausing the game) call Audio_Music_Stop to stop 
(pause) music. It stops all channels currently used by music and pause music 
processing (but not sound effects), music can then be resumed with a call to 
Audio_Music_Resume.

To play a sound effect you can call Audio_SFX_Play directly from the routine 
that triggers a sound effect (such as the routine to fire a weapon, initiate 
a jump or detect an explosion) with the sound effect number.
Some sound effects need a note, some don't and completely ignore the note if 
one is specified.

Audio_SFX_Stop stop all sound effects and turn off all channels currently 
used by sound effects. you DONT need to call it before calling Audio_SFX_Play.
one of its purpose is to stop all sound effects when pausing the game along 
with a call to Audio_Music_Stop, right before triggering the sound effect 
for 'Pause' so nothing else than the pause sound effect will be heard.


Advanced features:

Audio_SFX_LockChnl3 and Audio_SFX_UnlockChnl3 are designed to allow external 
routines to play digital audio. 

First call Audio_SFX_LockChnl3 which prevent the audio system from using 
channel 3 (note that channel 3 is left in the state it was at the time of the 
call). 

Then play the digital sample using your routine with the method and audio 
format your project need.

And last, turn off channel 3 and call Audio_SFX_UnlockChnl3 so the player
resume its use of channel 3.

