41#ifndef SNES_SOUND_INCLUDE
42#define SNES_SOUND_INCLUDE
73#define REG_APU00 (*(vuint8 *)0x2140)
74#define REG_APU01 (*(vuint8 *)0x2141)
75#define REG_APU02 (*(vuint8 *)0x2142)
76#define REG_APU03 (*(vuint8 *)0x2143)
77#define REG_APU0001 (*(vuint16 *)0x2140)
78#define REG_APU0203 (*(vuint16 *)0x2142)
Custom types used by libsnes.
void spcAllocateSoundRegion(u8 size)
Set the size of the sound region.
void spcLoad(u16 musIndex)
load module into sm-spc. this function may take some time to execute
void spcFlush(void)
Flush message queue (force sync)
void spcResumeMusic(void)
Resume playing of current module at music position.
void spcSetSoundEntry(u8 vol, u8 panning, u8 pitch, u16 length, u8 *sampleaddr, brrsamples *ptr)
set the values and address of the SOUND TABLE for a sound entry
void spcFadeModuleVolume(u16 vol, u16 fadespeed)
fade the module volume towards the target
void spcLoadEffect(u16 sfxIndex)
load sound effect into sm-spc. this function may take some time to execute
void spcPlaySoundV(u8 sndIndex, u16 volume)
Play sound from memory (using default arguments)
void spcSetSoundDataEntry(u8 vol, u8 panning, u8 pitch, u16 length, u8 *sampleaddr, brrsamples *ptr)
set the values of a sound entry
void spcPlaySound(u8 sndIndex)
Play sound from memory (using default arguments)
void spcEffect(u16 pitch, u16 sfxIndex, u8 volpan)
Play sound effect (load with spcLoadEffect)
void spcSetBank(u8 *bank)
set soundbank origin. soundbank must have dedicated bank(s)
void spcProcess(void)
Process messages This function will try to give messages to the spc until a few scanlines pass.
void spcSetSoundTable(u16 sndTableAddr, u8 sndTableBank)
set the address of the SOUND TABLE
void spcBoot(void)
boots the spc700 with sm-spc. call once at startup disable time consuing interrupts during this funct...
void spcPauseMusic(void)
pause playing the current module and save the music position.
void spcSetModuleVolume(u8 vol)
set the module playback volume
void spcPlay(u8 startPos)
play module. note: this simply queues a message, use spcFlush if you want to wait until the message i...
void spcStop(void)
stop playing the current module.
brr sample sound header(8 bytes)
Definition sound.h:51
u8 pitch
Definition sound.h:52
u8 volume
Definition sound.h:54
u8 length2
Definition sound.h:56
u8 addr2
Definition sound.h:58
u8 addr1
Definition sound.h:57
u8 length1
Definition sound.h:55
u8 panning
Definition sound.h:53
u8 bank
Definition sound.h:59