Go to the source code of this file.
Data Structures | |
struct | SsVag |
VAG file. More... | |
Macros | |
#define | SPU_DATA_BASE_ADDR 0x1010 |
Start address of sound data in Sound RAM. | |
#define | SPU_MAXVOL 0x3FFF |
Maximum volume. | |
Functions | |
void | SsVoiceVol (int voice, unsigned short left, unsigned short right) |
Set voice volume. | |
void | SsVoicePitch (int voice, unsigned short pitch) |
Set voice pitch. | |
void | SsVoiceStartAddr (int voice, unsigned int addr) |
Set start Sound RAM address for voice. | |
void | SsVoiceADSRRaw (int voice, unsigned short level, unsigned short rate) |
Set ADSR level for voice. | |
void | SsVoiceRepeatAddr (int voice, unsigned int addr) |
Set repeat address for voice. | |
void | SsKeyOn (int voice) |
Set a voice to 'on'. | |
void | SsKeyOff (int voice) |
Set a voice to 'off'. | |
void | SsKeyOnMask (int mask) |
Set the voices specified by the bitmask to 'on'. | |
void | SsKeyOffMask (int mask) |
Set the voices specified by the bitmask to 'off'. | |
void | SsWait (void) |
Wait for the SPU to be ready. | |
void | SsInit (void) |
Intialize the SPU. | |
void | SsUpload (void *addr, int size, int spu_addr) |
Uploads sound data in PSX ADPCM format to Sound RAM. | |
unsigned short | SsFreqToPitch (int hz) |
Converts a sampling rate in hertz to PlayStation pitch rate used by the SPU. | |
int | SsReadVag (SsVag *vag, void *data) |
Reads information from a buffer containg a VAG file and stores it inside a SsVag structure. | |
void | SsUploadVagEx (SsVag *vag, int spu_addr) |
Uploads the sound data specified by a SsVag structure to the specified address in Sound RAM. | |
void | SsUploadVag (SsVag *vag) |
Uploads the sound data specified by a SsVag structure to Sound RAM, beginning from the base of usable Sound RAM and continuing from there, in an automatic fashion. | |
void | SsPlayVag (SsVag *vag, unsigned char voice, unsigned short vl, unsigned short vr) |
Plays the sound specified by the SsVag structure at specified voice and volume. | |
void | SsStopVag (SsVag *vag) |
Stops the sound specified by the SsVag structure. | |
void | SsResetVagAddr (void) |
Tell SsUploadVag() to start uploading from the base of usable Sound RAM again. | |
void | SsEnableCd (void) |
Enable CD Audio. | |
void | SsEnableExt (void) |
Enable External audio. | |
void | SsCdVol (unsigned short left, unsigned short right) |
Set CD Audio volume. | |
#define SPU_DATA_BASE_ADDR 0x1010 |
Start address of sound data in Sound RAM.
#define SPU_MAXVOL 0x3FFF |
Maximum volume.
void SsCdVol | ( | unsigned short | left, |
unsigned short | right | ||
) |
Set CD Audio volume.
left | Left channel volume |
right | Right channel volume |
void SsEnableCd | ( | void | ) |
Enable CD Audio.
void SsEnableExt | ( | void | ) |
Enable External audio.
(???)
unsigned short SsFreqToPitch | ( | int | hz | ) |
Converts a sampling rate in hertz to PlayStation pitch rate used by the SPU.
hz | Sampling rate in hertz. |
void SsInit | ( | void | ) |
Intialize the SPU.
void SsKeyOff | ( | int | voice | ) |
Set a voice to 'off'.
This stops the sound specified for the voice.
voice | Voice |
void SsKeyOffMask | ( | int | mask | ) |
void SsKeyOn | ( | int | voice | ) |
Set a voice to 'on'.
This has the effect of playing the sound specified for the voice.
voice | Voice |
void SsKeyOnMask | ( | int | mask | ) |
void SsPlayVag | ( | SsVag * | vag, |
unsigned char | voice, | ||
unsigned short | vl, | ||
unsigned short | vr | ||
) |
int SsReadVag | ( | SsVag * | vag, |
void * | data | ||
) |
Reads information from a buffer containg a VAG file and stores it inside a SsVag structure.
vag | Pointer to structure in which to store information. |
data | Pointer to VAG file data |
void SsResetVagAddr | ( | void | ) |
Tell SsUploadVag() to start uploading from the base of usable Sound RAM again.
void SsStopVag | ( | SsVag * | vag | ) |
void SsUpload | ( | void * | addr, |
int | size, | ||
int | spu_addr | ||
) |
Uploads sound data in PSX ADPCM format to Sound RAM.
addr | Pointer to PSX ADPCM sound data in main RAM |
size | Sound data size |
spu_addr | Destination address in Sound RAM (multiplier of 8). |
void SsUploadVag | ( | SsVag * | vag | ) |
void SsUploadVagEx | ( | SsVag * | vag, |
int | spu_addr | ||
) |
Uploads the sound data specified by a SsVag structure to the specified address in Sound RAM.
The SsVag structure can then be used for playing with SsPlayVag()
vag | Pointer to SsVag structure |
spu_addr | Destination address in Sound RAM (multiplier of 8) |
void SsVoiceADSRRaw | ( | int | voice, |
unsigned short | level, | ||
unsigned short | rate | ||
) |
Set ADSR level for voice.
voice | Voice |
level | ADSR level |
rate | ADSR rate |
void SsVoicePitch | ( | int | voice, |
unsigned short | pitch | ||
) |
Set voice pitch.
voice | Voice |
pitch | Pitch. |
void SsVoiceRepeatAddr | ( | int | voice, |
unsigned int | addr | ||
) |
Set repeat address for voice.
voice | Voice |
addr | Address in Sound RAM (multiplier of 8) |
void SsVoiceStartAddr | ( | int | voice, |
unsigned int | addr | ||
) |
Set start Sound RAM address for voice.
voice | Voice |
addr | Start address in Sound RAM (multiplier of 8) |
void SsVoiceVol | ( | int | voice, |
unsigned short | left, | ||
unsigned short | right | ||
) |
Set voice volume.
voice | Voice number (0-23) |
left | Left channel volume |
right | Right channel volume |
void SsWait | ( | void | ) |
Wait for the SPU to be ready.