Mercurial > SDL_sound_CoreAudio
diff decoders/timidity/timidity.h @ 455:cbc2a4ffeeec
* Added support for loading DLS format instruments:
Timidity_LoadDLS(), Timidity_FreeDLS(), Timidity_LoadDLSSong()
* Added Timidity_Init_NoConfig()
author | hercules |
---|---|
date | Fri, 26 Sep 2003 20:51:58 +0000 |
parents | 498240aa76f1 |
children | c66080364dff |
line wrap: on
line diff
--- a/decoders/timidity/timidity.h Sat Sep 13 20:46:09 2003 +0000 +++ b/decoders/timidity/timidity.h Fri Sep 26 20:51:58 2003 +0000 @@ -19,6 +19,12 @@ */ +#ifndef TIMIDITY_H +#define TIMIDITY_H +#ifdef __cplusplus +extern "C" { +#endif + typedef Sint16 sample_t; typedef Sint32 final_volume_t; @@ -30,7 +36,7 @@ typedef struct { Sint32 loop_start, loop_end, data_length, - sample_rate, low_freq, high_freq, root_freq; + sample_rate, low_vel, high_vel, low_freq, high_freq, root_freq; Sint32 envelope_rate[6], envelope_offset[6]; float @@ -107,6 +113,9 @@ void *next; } MidiEventList; +struct _DLS_Data; +typedef struct _DLS_Data DLS_Patches; + typedef struct { int playing; SDL_RWops *rw; @@ -114,6 +123,7 @@ Sint32 encoding; float master_volume; Sint32 amplification; + DLS_Patches *patches; ToneBank *tonebank[128]; ToneBank *drumset[128]; Instrument *default_instrument; @@ -148,10 +158,19 @@ /* Some of these are not defined in timidity.c but are here for convenience */ extern int Timidity_Init(void); +extern int Timidity_Init_NoConfig(void); extern void Timidity_SetVolume(MidiSong *song, int volume); extern int Timidity_PlaySome(MidiSong *song, void *stream, Sint32 len); +extern DLS_Patches *Timidity_LoadDLS(SDL_RWops *rw); +extern void Timidity_FreeDLS(DLS_Patches *patches); +extern MidiSong *Timidity_LoadDLSSong(SDL_RWops *rw, DLS_Patches *patches, SDL_AudioSpec *audio); extern MidiSong *Timidity_LoadSong(SDL_RWops *rw, SDL_AudioSpec *audio); extern void Timidity_Start(MidiSong *song); extern void Timidity_Seek(MidiSong *song, Uint32 ms); extern void Timidity_FreeSong(MidiSong *song); extern void Timidity_Exit(void); + +#ifdef __cplusplus +} +#endif +#endif /* TIMIDITY_H */