Mercurial > SDL_sound_CoreAudio
comparison decoders/midi.c @ 312:498240aa76f1
Seek implementations.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 24 Apr 2002 20:47:21 +0000 |
parents | c97be6e1bd27 |
children | cbb15ecf423a |
comparison
equal
deleted
inserted
replaced
311:d62c05322a3e | 312:498240aa76f1 |
---|---|
111 | 111 |
112 sample->actual.channels = 2; | 112 sample->actual.channels = 2; |
113 sample->actual.rate = 44100; | 113 sample->actual.rate = 44100; |
114 sample->actual.format = AUDIO_S16SYS; | 114 sample->actual.format = AUDIO_S16SYS; |
115 | 115 |
116 sample->flags = SOUND_SAMPLEFLAG_NONE; | 116 sample->flags = SOUND_SAMPLEFLAG_CANSEEK; |
117 return(1); /* we'll handle this data. */ | 117 return(1); /* we'll handle this data. */ |
118 } /* MIDI_open */ | 118 } /* MIDI_open */ |
119 | 119 |
120 | 120 |
121 static void MIDI_close(Sound_Sample *sample) | 121 static void MIDI_close(Sound_Sample *sample) |
160 } /* MIDI_rewind */ | 160 } /* MIDI_rewind */ |
161 | 161 |
162 | 162 |
163 static int MIDI_seek(Sound_Sample *sample, Uint32 ms) | 163 static int MIDI_seek(Sound_Sample *sample, Uint32 ms) |
164 { | 164 { |
165 BAIL_MACRO("!!! FIXME: Not implemented", 0); | 165 Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; |
166 MidiSong *song = (MidiSong *) internal->decoder_private; | |
167 | |
168 Timidity_Seek(song, ms); | |
169 return(1); | |
166 } /* MIDI_seek */ | 170 } /* MIDI_seek */ |
167 | 171 |
168 #endif /* SOUND_SUPPORTS_MIDI */ | 172 #endif /* SOUND_SUPPORTS_MIDI */ |
169 | 173 |
170 | 174 |