Browse Source

Added play_rate stuff to fmod

Josh Yelon 20 năm trước cách đây
mục cha
commit
ac1f10ffbe

+ 18 - 0
panda/src/audiotraits/fmodAudioSound.cxx

@@ -355,6 +355,24 @@ float FmodAudioSound::get_balance() const {
   return _balance;
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: FmodAudioSound::set_play_rate
+//       Access: public
+//  Description: NOT IMPLEMENTED! DO NOT USE!
+////////////////////////////////////////////////////////////////////
+void FmodAudioSound::set_play_rate(float rate) {
+  audio_error("set_play_rate not implemented under fmod");
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: FmodAudioSound::get_play_rate
+//       Access: public
+//  Description: NOT IMPLEMENTED! DO NOT USE!
+////////////////////////////////////////////////////////////////////
+float FmodAudioSound::get_play_rate() const {
+  return 1.0;
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: FmodAudioSound::set_active
 //       Access: public

+ 5 - 0
panda/src/audiotraits/fmodAudioSound.h

@@ -66,6 +66,11 @@ public:
   void set_balance(float balance_right=0.0);
   float get_balance() const;
 
+  // play_rate is any positive float value.
+  // inits to 1.0.
+  void set_play_rate(float play_rate=1.0f);
+  float get_play_rate() const;
+
   // inits to manager's state.
   void set_active(bool active=true);
   bool get_active() const;