comparison decoders/midi.c @ 306:c97be6e1bd27

Added framework for Sound_Seek() support.
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 21 Apr 2002 18:39:47 +0000
parents d3dc34315ac7
children 498240aa76f1
comparison
equal deleted inserted replaced
305:c345a40a8a99 306:c97be6e1bd27
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 static int MIDI_rewind(Sound_Sample *sample);
56 static int MIDI_seek(Sound_Sample *sample, Uint32 ms);
56 57
57 static const char *extensions_midi[] = { "MIDI", "MID", NULL }; 58 static const char *extensions_midi[] = { "MIDI", "MID", NULL };
58 const Sound_DecoderFunctions __Sound_DecoderFunctions_MIDI = 59 const Sound_DecoderFunctions __Sound_DecoderFunctions_MIDI =
59 { 60 {
60 { 61 {
67 MIDI_init, /* init() method */ 68 MIDI_init, /* init() method */
68 MIDI_quit, /* quit() method */ 69 MIDI_quit, /* quit() method */
69 MIDI_open, /* open() method */ 70 MIDI_open, /* open() method */
70 MIDI_close, /* close() method */ 71 MIDI_close, /* close() method */
71 MIDI_read, /* read() method */ 72 MIDI_read, /* read() method */
72 MIDI_rewind /* rewind() method */ 73 MIDI_rewind, /* rewind() method */
74 MIDI_seek /* seek() method */
73 }; 75 };
74 76
75 77
76 static int MIDI_init(void) 78 static int MIDI_init(void)
77 { 79 {
155 157
156 Timidity_Start(song); 158 Timidity_Start(song);
157 return(1); 159 return(1);
158 } /* MIDI_rewind */ 160 } /* MIDI_rewind */
159 161
162
163 static int MIDI_seek(Sound_Sample *sample, Uint32 ms)
164 {
165 BAIL_MACRO("!!! FIXME: Not implemented", 0);
166 } /* MIDI_seek */
167
160 #endif /* SOUND_SUPPORTS_MIDI */ 168 #endif /* SOUND_SUPPORTS_MIDI */
161 169
162 170
163 /* end of midi.c ... */ 171 /* end of midi.c ... */
164 172