maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches
RetroSound API

Abstraction layer header for sound on retro systems. More...

Collaboration diagram for RetroSound API:

Topics

 RetroSound State Flags
 Flags indicating global state for the RETROSND_STATE::flags field.
 

Files

file  retrosnd.h
 Abstraction layer header for sound on retro systems.
 

Macros

#define RETROSND_TRACE_LVL   0
 
#define RETROSND_REG_TRACE_LVL   0
 
#define RETROSND_VOICE_BREATH   122
 
#define RETROSND_VOICE_SEASHORE   123
 
#define RETROSND_VOICE_BIRD_TWEET   124
 
#define RETROSND_VOICE_PHONE_RING   125
 
#define RETROSND_VOICE_HELICOPTER   126
 
#define RETROSND_VOICE_APPLAUSE   127
 
#define RETROSND_VOICE_GUNSHOT   128
 Parameter for retrosnd_midi_set_voice() indicating a gunshot sound effect.
 
#define RETROSND_CHANNEL_CT   8
 

Functions

MERROR_RETVAL retrosnd_init (struct RETROFLAT_ARGS *args)
 Initialize retrosnd engine.
 
void retrosnd_set_sf_bank (const char *filename_in)
 Set the name of the voice bank filename to use.
 
void retrosnd_midi_set_voice (uint8_t channel, uint8_t voice)
 
void retrosnd_midi_set_control (uint8_t channel, uint8_t key, uint8_t val)
 
void retrosnd_midi_note_on (uint8_t channel, uint8_t pitch, uint8_t vel)
 
void retrosnd_midi_note_off (uint8_t channel, uint8_t pitch, uint8_t vel)
 
MERROR_RETVAL retrosnd_midi_play_smf (const char *filename)
 
uint8_t retrosnd_midi_is_playing_smf ()
 
void retrosnd_shutdown ()
 

Detailed Description

Abstraction layer header for sound on retro systems.

Function Documentation

◆ retrosnd_init()

MERROR_RETVAL retrosnd_init ( struct RETROFLAT_ARGS * args)

Initialize retrosnd engine.

Parameters
argsA pointer to the RETROSND_ARGS struct initialized by the calling program.

The RETROSND_ARGS::snd_io_base field must be initialized with the address or other platform-specific indicator of the MIDI device to use.