Hi there, wonder if anyone else is getting this possible bug? I am trying to stream a 0.75 second long 32bit 44100hz mono wav file with the following code.
The code above set things up so that I have the option of turning looping on and off after creating the Stream. When I turn the looping off as in above there is sort of an echo, or an extra bit of sound at the end of the sound effect. When I put looping back on all seems to work. If I create the stream without FMOD_LOOP_NORMAL then I am unable to make the Stream Loop. I get the same results when I use FMOD_System_CreateStream and omit FMOD_CREATESTREAM from the creation parameters.
I am using MINGW the libFmod.a library (encountered this problem with 1.08.04 and 1.09.04)
Hi,
setLoopCount is a bit different to other functions in that it doesn’t cause a re-flush of the stream buffer. Streams are typically large files, so it buffers the sound data in advance, and if your file fits inside the stream buffer multiple times (as you told it to load as looping during creation), it will be too late to re-read and you might hear it multiple times.
Try turning looping on and off in conjunction with your loop count, with Sound::setMode (or just use this function exclusively) or Channel::setMode and it should work.