Sound negative setPlayRate

Hi,

I’m trying to playback a sound backwards. The manual says that if you were to put a negative number in mySound.setPlayRate(), it will play backwards. I managed to do this once somehow, but after a small change, I could never get it back to work, it will just not play!

self.sound= loader.loadSfx(“sound\sound.wav”)
self.sound.setPlayRate(-1)
self.sound.play()

This will not work!
I tried making a float of the negative number, no success. I tried several other things too, but nothing worked. Any ideas?

Wow - that really worked? I’m surprised, I think you must have gotten lucky.

It shouldn’t then? Since it clearly states in the Panda3d manual:

mySound.setPlayRate(N)

Where N is any float.

NOTE!!! Negative numbers will play a sound backwards. 0 is ‘Pause’ a sound.

And I get no errors when using a negative number :astonished:

Interesting.

I imagine that at some point in the past, the audio subsystem was more primitive - it probably read the whole audio file into memory at once. It doesn’t do that any more, now it streams the data from disk on demand, at least for audio files of any substantial size.

However, since you can’t stream a file backwards, I suspect that the ability to play a sound backwards was lost when the ability to stream audio was added.