diff decoders/ogg.c @ 231:d3dc34315ac7

Rewind method implemented by Torbj�rn.
author Ryan C. Gordon <icculus@icculus.org>
date Sat, 19 Jan 2002 16:58:34 +0000
parents c9772a9f5271
children c97be6e1bd27
line wrap: on
line diff
--- a/decoders/ogg.c	Sat Jan 19 03:11:26 2002 +0000
+++ b/decoders/ogg.c	Sat Jan 19 16:58:34 2002 +0000
@@ -268,10 +268,11 @@
 
 static int OGG_rewind(Sound_Sample *sample)
 {
-    /* !!! FIXME. */
-    SNDDBG(("OGG_rewind(): Write me!\n"));
-    assert(0);
-    return(0);
+    Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque;
+    OggVorbis_File *vf = (OggVorbis_File *) internal->decoder_private;
+
+    BAIL_IF_MACRO(ov_raw_seek(vf, 0) < 0, ERR_IO_ERROR, 0);
+    return(1);
 } /* OGG_rewind */
 
 #endif /* SOUND_SUPPORTS_OGG */