Mercurial > SDL_sound_CoreAudio
diff 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 |
line wrap: on
line diff
--- a/decoders/midi.c Wed Apr 24 20:46:39 2002 +0000 +++ b/decoders/midi.c Wed Apr 24 20:47:21 2002 +0000 @@ -113,7 +113,7 @@ sample->actual.rate = 44100; sample->actual.format = AUDIO_S16SYS; - sample->flags = SOUND_SAMPLEFLAG_NONE; + sample->flags = SOUND_SAMPLEFLAG_CANSEEK; return(1); /* we'll handle this data. */ } /* MIDI_open */ @@ -162,7 +162,11 @@ static int MIDI_seek(Sound_Sample *sample, Uint32 ms) { - BAIL_MACRO("!!! FIXME: Not implemented", 0); + Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; + MidiSong *song = (MidiSong *) internal->decoder_private; + + Timidity_Seek(song, ms); + return(1); } /* MIDI_seek */ #endif /* SOUND_SUPPORTS_MIDI */