the new seek method

Keith Swyer ksswyer at adventus.com
Thu Jul 18 11:26:08 EDT 2002


ryan, i noticed your post to SDL about the change in the seek method for
files read from a zip....relating specifically to the SDL_SoundRewind
question i posted there a while back. anyway, thanks for looking into that
and finding that error. However, i am still not able to get the file to
rewind correctly. in the rean_more_data function in the SDL_Sound example,
Sound_Rewind appears to return without an error, but only seems to play the
last bit of decoded data the number of repeat times, and not decode the
entire song again.

I haven't changed either the read_more_data or audiocallback functions found
in the examples, except for the loop variable in the read_more_data to allow
a specific number of loops.

  if (looping == 0)  /// don't repeat
        return(0);
    else if (looping == -1){}  //keep repeating
    else
     looping--;    //repeat a number of times

The sample is opened using

 _sample = Sound_NewSampleFromFile(_filename,
&sound_desired,decode_buffersize);

which gets the mp3 file from a zip archive.

Is there perhaps something that i am still doing wrong?

I appreciate any and all the help.

--Keith





More information about the physfs mailing list