Mercurial > SDL_sound_CoreAudio
comparison decoders/midi.c @ 221:c9772a9f5271
Initial implementation or stubs for rewind method. Other cleanups.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Thu, 17 Jan 2002 20:53:53 +0000 |
parents | f75ed2d72238 |
children | d3dc34315ac7 |
comparison
equal
deleted
inserted
replaced
220:ef72f3c490e7 | 221:c9772a9f5271 |
---|---|
50 static int MIDI_init(void); | 50 static int MIDI_init(void); |
51 static void MIDI_quit(void); | 51 static void MIDI_quit(void); |
52 static int MIDI_open(Sound_Sample *sample, const char *ext); | 52 static int MIDI_open(Sound_Sample *sample, const char *ext); |
53 static void MIDI_close(Sound_Sample *sample); | 53 static void MIDI_close(Sound_Sample *sample); |
54 static Uint32 MIDI_read(Sound_Sample *sample); | 54 static Uint32 MIDI_read(Sound_Sample *sample); |
55 static int MIDI_rewind(Sound_Sample *sample); | |
55 | 56 |
56 static const char *extensions_midi[] = { "MIDI", "MID", NULL }; | 57 static const char *extensions_midi[] = { "MIDI", "MID", NULL }; |
57 const Sound_DecoderFunctions __Sound_DecoderFunctions_MIDI = | 58 const Sound_DecoderFunctions __Sound_DecoderFunctions_MIDI = |
58 { | 59 { |
59 { | 60 { |
61 "MIDI decoder, using a subset of TiMidity", | 62 "MIDI decoder, using a subset of TiMidity", |
62 "Torbjörn Andersson <d91tan@Update.UU.SE>", | 63 "Torbjörn Andersson <d91tan@Update.UU.SE>", |
63 "http://www.icculus.org/SDL_sound/" | 64 "http://www.icculus.org/SDL_sound/" |
64 }, | 65 }, |
65 | 66 |
66 MIDI_init, /* init() method */ | 67 MIDI_init, /* init() method */ |
67 MIDI_quit, /* quit() method */ | 68 MIDI_quit, /* quit() method */ |
68 MIDI_open, /* open() method */ | 69 MIDI_open, /* open() method */ |
69 MIDI_close, /* close() method */ | 70 MIDI_close, /* close() method */ |
70 MIDI_read /* read() method */ | 71 MIDI_read, /* read() method */ |
72 MIDI_rewind /* rewind() method */ | |
71 }; | 73 }; |
72 | 74 |
73 | 75 |
74 static int MIDI_init(void) | 76 static int MIDI_init(void) |
75 { | 77 { |
143 sample->flags |= SOUND_SAMPLEFLAG_EAGAIN; | 145 sample->flags |= SOUND_SAMPLEFLAG_EAGAIN; |
144 | 146 |
145 return(retval); | 147 return(retval); |
146 } /* MIDI_read */ | 148 } /* MIDI_read */ |
147 | 149 |
150 | |
151 static int MIDI_rewind(Sound_Sample *sample) | |
152 { | |
153 /* !!! FIXME. */ | |
154 SNDDBG(("MIDI_rewind(): Write me!\n")); | |
155 assert(0); | |
156 return(0); | |
157 } /* MIDI_rewind */ | |
158 | |
159 | |
148 #endif /* SOUND_SUPPORTS_MIDI */ | 160 #endif /* SOUND_SUPPORTS_MIDI */ |
149 | 161 |
150 | 162 |
151 /* end of midi.c ... */ | 163 /* end of midi.c ... */ |
152 | 164 |