0
0

What is the method for getting seamless MP3 play? I now play a file with FSOUND_Stream_OpenFile and on the end_callback I do FSOUND_Stream_Close and start the next song. However, there is a small gap between mp3 files which is noticable on certain mix albums. Has anyone succeeded in removing such a gap or has does someone have a pointer to how to solve this? My first guess is pre-loading the next file on another stream just before the current song has ended and starting it as soon as the end_callback is triggered, but I’m not sure this method will be succesfull.

  • You must to post comments
0
0

Is it possible to get a short explanation of what SubStreamSentence means?

  • You must to post comments
0
0

Cool. Thanks. I had looked in the CHM docs, but did not think to look in the tutorials section. Force of habit to go straight to function declarations in the help file. :)

  • You must to post comments
0
0

Get stream length and count down.
Load next song in a new stream x seconds before the previous ends.
This doesn’t always work your reading from CD or network.
Especially when you’ve set MPEGACCURATE

  • You must to post comments
0
0

Is this worth to post this as a feature request? Or is it already taken care of in 4?

  • You must to post comments
0
0

If you override FMOD’s file reading functions by yours (using FSOUND_File_SetCallbacks), you might get around the problem. For instance, overriding the READCALLBACK, you might write a function that does this:

  1. copy to a temporary buffer the desired number of bytes from the currently opened file using fread
  2. detect whether you have reached the end of the file before getting enough bytes
  3. if no, copy the temporary buffer to the buffer specified in the parameters
  4. if yes, append the remaining number of bytes from another file, and then copy the temp buffer to the “real” one

This amounts to implementing a new layer of buffering by yourself, since all the contents of the files are actually copied to a (static) memory buffer that you manage, and [i:267f7ehf]that[/i:267f7ehf] buffer is what FMOD actually reads.

I’m not sure that this would work, I’d have to try it. For example, when FMOD encounters the MP3 header of a file stitched to the end of a previous one, would it try to “play” it or parse it as if it were a new file? And most of all, would that procedure be fast enough?

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.