Macros | |
| #define | AUDIO_ATTACK_FAST 12 |
| #define | AUDIO_ATTACK_INSTANT 15 |
| ADSR attack rates (0=4.1s, 15=instant). | |
| #define | AUDIO_ATTACK_MEDIUM 8 |
| #define | AUDIO_ATTACK_SLOW 4 |
| #define | AUDIO_DECAY_FAST 7 |
| #define | AUDIO_DECAY_MEDIUM 4 |
| #define | AUDIO_DECAY_NONE 0 |
| ADSR decay rates. | |
| #define | AUDIO_DECAY_SLOW 1 |
| #define | AUDIO_ECHO_DELAY_MAX 7 |
| #define | AUDIO_ECHO_DELAY_MIN 1 |
| Echo delay (delay_ms = value * 16ms). | |
| #define | AUDIO_ERR_INVALID_ID 2 |
| #define | AUDIO_ERR_NO_MEMORY 1 |
| #define | AUDIO_ERR_NOT_LOADED 3 |
| #define | AUDIO_ERR_TIMEOUT 4 |
| #define | AUDIO_MAX_SAMPLES 64 |
| Maximum number of sample slots. | |
| #define | AUDIO_MAX_VOICES 8 |
| Maximum number of voices. | |
| #define | AUDIO_OK 0 |
| Error codes. | |
| #define | AUDIO_PAN_CENTER 8 |
| #define | AUDIO_PAN_LEFT 0 |
| Pan positions (0-15 scale; 8 is an exact centre, L = R = vol/2). | |
| #define | AUDIO_PAN_RIGHT 15 |
| #define | AUDIO_PITCH_C3 0x085F |
| Common pitch values. | |
| #define | AUDIO_PITCH_C4 0x10BE |
| #define | AUDIO_PITCH_C5 0x217C |
| #define | AUDIO_PITCH_DEFAULT 0x1000 |
| Default pitch (1.0x playback rate). | |
| #define | AUDIO_RELEASE_FAST 24 |
| #define | AUDIO_RELEASE_INSTANT 31 |
| ADSR sustain RATE (ADSR2 bits 0-4): how fast the envelope keeps falling from the sustain level while the key is held. 0 holds the level for ever, 31 falls fastest. The S-DSP has no programmable release: on key-off the level drops at a fixed rate (fullsnes "Rate=31, Step=-8"; snesdev-wiki Errata). These names kept the "release" word of the API; AUDIO_RELEASE_INSTANT makes a held note die away quickly, it does not cut it. (Until 2026-10-04 this comment called the field the release rate — library audit D1.). | |
| #define | AUDIO_RELEASE_MEDIUM 16 |
| #define | AUDIO_RELEASE_SLOW 8 |
| #define | AUDIO_SUSTAIN_FULL 7 |
| ADSR sustain levels (0=1/8, 7=full). | |
| #define | AUDIO_SUSTAIN_HALF 3 |
| #define | AUDIO_SUSTAIN_QUARTER 1 |
| #define | AUDIO_VOICE_AUTO 0xFF |
| Let audioPlaySampleOn() pick the voice (round-robin), as audioPlaySample() / audioPlaySampleEx() always do. | |
| #define | AUDIO_VOICE_NONE 0xFF |
| Returned by audioPlaySample() / audioPlaySampleEx() when nothing was played (driver not ready, unknown or unloaded sample, command timeout). Was a bare 0xFF in the code until 2026-09-21. | |
| #define | AUDIO_VOL_MAX 127 |
| Maximum volume value. | |
| #define | AUDIO_VOL_MIN 0 |
| #define AUDIO_ATTACK_FAST 12 |
| #define AUDIO_ATTACK_INSTANT 15 |
ADSR attack rates (0=4.1s, 15=instant).
| #define AUDIO_ATTACK_MEDIUM 8 |
| #define AUDIO_ATTACK_SLOW 4 |
| #define AUDIO_DECAY_FAST 7 |
| #define AUDIO_DECAY_MEDIUM 4 |
| #define AUDIO_DECAY_NONE 0 |
ADSR decay rates.
| #define AUDIO_DECAY_SLOW 1 |
| #define AUDIO_ECHO_DELAY_MAX 7 |
112 ms — audioSetEcho() clamps here: EDL 8-15 would run the echo ring into the IPL region. Was 15, a value the function never accepted
| #define AUDIO_ECHO_DELAY_MIN 1 |
Echo delay (delay_ms = value * 16ms).
16ms
| #define AUDIO_ERR_INVALID_ID 2 |
Invalid sample/voice ID
| #define AUDIO_ERR_NO_MEMORY 1 |
SPC RAM exhausted
| #define AUDIO_ERR_NOT_LOADED 3 |
Sample not loaded
| #define AUDIO_ERR_TIMEOUT 4 |
SPC communication timeout
| #define AUDIO_MAX_SAMPLES 64 |
Maximum number of sample slots.
| #define AUDIO_MAX_VOICES 8 |
Maximum number of voices.
| #define AUDIO_OK 0 |
Error codes.
Success
| #define AUDIO_PAN_CENTER 8 |
| #define AUDIO_PAN_LEFT 0 |
Pan positions (0-15 scale; 8 is an exact centre, L = R = vol/2).
| #define AUDIO_PAN_RIGHT 15 |
| #define AUDIO_PITCH_C3 0x085F |
Common pitch values.
C3 (~130.8 Hz with such a sample)
| #define AUDIO_PITCH_C4 0x10BE |
C4, middle C (~261.6 Hz)
| #define AUDIO_PITCH_C5 0x217C |
C5 (~523.3 Hz)
| #define AUDIO_PITCH_DEFAULT 0x1000 |
Default pitch (1.0x playback rate).
| #define AUDIO_RELEASE_FAST 24 |
| #define AUDIO_RELEASE_INSTANT 31 |
ADSR sustain RATE (ADSR2 bits 0-4): how fast the envelope keeps falling from the sustain level while the key is held. 0 holds the level for ever, 31 falls fastest. The S-DSP has no programmable release: on key-off the level drops at a fixed rate (fullsnes "Rate=31, Step=-8"; snesdev-wiki Errata). These names kept the "release" word of the API; AUDIO_RELEASE_INSTANT makes a held note die away quickly, it does not cut it. (Until 2026-10-04 this comment called the field the release rate — library audit D1.).
| #define AUDIO_RELEASE_MEDIUM 16 |
| #define AUDIO_RELEASE_SLOW 8 |
| #define AUDIO_SUSTAIN_FULL 7 |
ADSR sustain levels (0=1/8, 7=full).
| #define AUDIO_SUSTAIN_HALF 3 |
| #define AUDIO_SUSTAIN_QUARTER 1 |
| #define AUDIO_VOICE_AUTO 0xFF |
Let audioPlaySampleOn() pick the voice (round-robin), as audioPlaySample() / audioPlaySampleEx() always do.
| #define AUDIO_VOICE_NONE 0xFF |
Returned by audioPlaySample() / audioPlaySampleEx() when nothing was played (driver not ready, unknown or unloaded sample, command timeout). Was a bare 0xFF in the code until 2026-09-21.
| #define AUDIO_VOL_MAX 127 |
Maximum volume value.
| #define AUDIO_VOL_MIN 0 |