Browse Source

Fix bug with dynamic playrate changing

rdb 16 years ago
parent
commit
788631d454
1 changed files with 3 additions and 0 deletions
  1. 3 0
      panda/src/audiotraits/openalAudioSound.cxx

+ 3 - 0
panda/src/audiotraits/openalAudioSound.cxx

@@ -630,6 +630,9 @@ get_balance() const {
 void OpenALAudioSound::
 set_play_rate(float play_rate) {
   _play_rate = play_rate;
+  if (_source) {
+    alSourcef(_source, AL_PITCH, play_rate);
+  }
 }
 
 ////////////////////////////////////////////////////////////////////