Loading...
Searching...
No Matches
snesmod.h
Go to the documentation of this file.
1
65#ifndef OPENSNES_SNESMOD_H
66#define OPENSNES_SNESMOD_H
67
68#include <snes/types.h>
69
70/*============================================================================
71 * Initialization
72 *============================================================================*/
73
88void snesmodInit(void);
89
104
107/*============================================================================
108 * Module Playback
109 *============================================================================*/
110
128void snesmodLoadModule(u16 moduleId);
129
137void snesmodPlay(u8 startPosition);
138
144void snesmodStop(void);
145
151void snesmodPause(void);
152
158void snesmodResume(void);
159
169
172/*============================================================================
173 * Sound Effects
174 *============================================================================*/
175
190
211u8 snesmodPlayEffect(u16 effectId, u8 volume, u8 pan, u16 pitch);
212
215/*============================================================================
216 * Volume Control
217 *============================================================================*/
218
232
246void snesmodFadeVolume(u8 targetVolume, u8 speed);
247
250/*============================================================================
251 * Processing
252 *============================================================================*/
253
279void snesmodProcess(void);
280
287void snesmodFlush(void);
288
291/*============================================================================
292 * Streaming Audio
293 *============================================================================*/
294
307void snesmodSetSoundTable(const u8 *table);
308
317
320/*============================================================================
321 * Pitch Constants
322 *============================================================================*/
323
330#define SNESMOD_PITCH_LOW 4
331#define SNESMOD_PITCH_NORMAL 8
332#define SNESMOD_PITCH_HIGH 12
336#endif /* OPENSNES_SNESMOD_H */
void snesmodSetSoundbank(u8 bank)
Set the soundbank bank number.
void snesmodInit(void)
Initialize SNESMOD audio engine.
void snesmodStop(void)
Stop module playback.
void snesmodPlay(u8 startPosition)
Start module playback.
void snesmodPause(void)
Pause module playback.
u8 snesmodGetPosition(void)
Get current module position.
void snesmodLoadModule(u16 moduleId)
Load a module from the soundbank.
void snesmodResume(void)
Resume module playback.
void snesmodProcess(void)
Process audio commands.
void snesmodFlush(void)
Wait for command queue to empty.
u8 snesmodLoadEffect(u16 sfxIndex)
Load a sound effect from the soundbank.
u8 snesmodPlayEffect(u16 effectId, u8 volume, u8 pan, u16 pitch)
Play a sound effect.
void snesmodAllocateSoundRegion(u8 size)
Allocate SPC RAM for streaming buffer.
void snesmodSetSoundTable(const u8 *table)
Set the streaming sound table.
void snesmodSetModuleVolume(u8 volume)
Set module volume.
void snesmodFadeVolume(u8 targetVolume, u8 speed)
Fade module volume.
unsigned short u16
16-bit unsigned integer (0 to 65535)
Definition types.h:52
unsigned char u8
8-bit unsigned integer (0 to 255)
Definition types.h:46
OpenSNES Standard Types.