comparison decoders/modplug.c @ 312:498240aa76f1

Seek implementations.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 24 Apr 2002 20:47:21 +0000
parents c97be6e1bd27
children f72fd79d6e76
comparison
equal deleted inserted replaced
311:d62c05322a3e 312:498240aa76f1
206 sample->actual.channels = 2; 206 sample->actual.channels = 2;
207 sample->actual.rate = 44100; 207 sample->actual.rate = 44100;
208 sample->actual.format = AUDIO_S16SYS; 208 sample->actual.format = AUDIO_S16SYS;
209 209
210 internal->decoder_private = (void *) module; 210 internal->decoder_private = (void *) module;
211 sample->flags = SOUND_SAMPLEFLAG_NONE; 211 sample->flags = SOUND_SAMPLEFLAG_CANSEEK;
212 212
213 SNDDBG(("MODPLUG: Accepting data stream\n")); 213 SNDDBG(("MODPLUG: Accepting data stream\n"));
214 return(1); /* we'll handle this data. */ 214 return(1); /* we'll handle this data. */
215 } /* MODPLUG_open */ 215 } /* MODPLUG_open */
216 216
247 } /* MODPLUG_rewind */ 247 } /* MODPLUG_rewind */
248 248
249 249
250 static int MODPLUG_seek(Sound_Sample *sample, Uint32 ms) 250 static int MODPLUG_seek(Sound_Sample *sample, Uint32 ms)
251 { 251 {
252 BAIL_MACRO("!!! FIXME: Not implemented", 0); 252 Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque;
253 ModPlugFile *module = (ModPlugFile *) internal->decoder_private;
254
255 /* Assume that this will work. */
256 ModPlug_Seek(module, ms);
257 return(1);
253 } /* MODPLUG_seek */ 258 } /* MODPLUG_seek */
254 259
255 #endif /* SOUND_SUPPORTS_MODPLUG */ 260 #endif /* SOUND_SUPPORTS_MODPLUG */
256 261
257 262