diff 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
line wrap: on
line diff
--- a/decoders/modplug.c	Wed Apr 24 20:46:39 2002 +0000
+++ b/decoders/modplug.c	Wed Apr 24 20:47:21 2002 +0000
@@ -208,7 +208,7 @@
     sample->actual.format = AUDIO_S16SYS;
 
     internal->decoder_private = (void *) module;
-    sample->flags = SOUND_SAMPLEFLAG_NONE;
+    sample->flags = SOUND_SAMPLEFLAG_CANSEEK;
 
     SNDDBG(("MODPLUG: Accepting data stream\n"));
     return(1); /* we'll handle this data. */
@@ -249,7 +249,12 @@
 
 static int MODPLUG_seek(Sound_Sample *sample, Uint32 ms)
 {
-    BAIL_MACRO("!!! FIXME: Not implemented", 0);
+    Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque;
+    ModPlugFile *module = (ModPlugFile *) internal->decoder_private;
+
+        /* Assume that this will work. */
+    ModPlug_Seek(module, ms);
+    return(1);
 } /* MODPLUG_seek */
 
 #endif /* SOUND_SUPPORTS_MODPLUG */