Browse Source

support miles with stubbed-out methods

David Rose 21 years ago
parent
commit
c0bc68b158

+ 10 - 0
panda/src/audio/audioSound.cxx

@@ -40,3 +40,13 @@ AudioSound() {
   // Intentionally blank.
 }
 
+
+void AudioSound::
+set_3d_attributes(float px, float py, float pz, float vx, float vy, float vz) {
+  // Intentionally blank.
+}
+
+void AudioSound::
+get_3d_attributes(float *px, float *py, float *pz, float *vx, float *vy, float *vz) {
+  // Intentionally blank.
+}

+ 4 - 6
panda/src/audio/audioSound.h

@@ -98,12 +98,10 @@ PUBLISHED:
   // Controls the position of this sound's emitter.
   // px, py and pz are the emitter's position.
   // vx, vy and vz are the emitter's velocity in UNITS PER SECOND (default: meters).
-  // You can pass 0.0 to either value for either function to ignore that value
-  // if you only want to set/get one of them for some reason.
-  virtual void set_3d_attributes(float px = 0.0f, float py = 0.0f, float pz = 0.0f,
-                                 float vx = 0.0f, float vy = 0.0f, float vz = 0.0f) = 0;
-  virtual void get_3d_attributes(float px = 0.0f, float py = 0.0f, float pz = 0.0f,
-                                 float vx = 0.0f, float vy = 0.0f, float vz = 0.0f) = 0;
+  virtual void set_3d_attributes(float px, float py, float pz,
+                                 float vx, float vy, float vz);
+  virtual void get_3d_attributes(float *px, float *py, float *pz,
+                                 float *vx, float *vy, float *vz);
 
   enum SoundStatus { BAD, READY, PLAYING };
   virtual SoundStatus status() const = 0;

+ 1 - 1
panda/src/audio/nullAudioSound.cxx

@@ -114,7 +114,7 @@ void NullAudioSound::set_3d_attributes(float px, float py, float pz, float vx, f
   // Intentionally blank.
 }
 
-void NullAudioSound::get_3d_attributes(float px, float py, float pz, float vx, float vy, float vz) {
+void NullAudioSound::get_3d_attributes(float *px, float *py, float *pz, float *vx, float *vy, float *vz) {
   // Intentionally blank.
 }
 

+ 1 - 1
panda/src/audio/nullAudioSound.h

@@ -63,7 +63,7 @@ public:
   float length() const;
 
   void set_3d_attributes(float px, float py, float pz, float vx, float vy, float vz);
-  void get_3d_attributes(float px, float py, float pz, float vx, float vy, float vz);
+  void get_3d_attributes(float *px, float *py, float *pz, float *vx, float *vy, float *vz);
   
   AudioSound::SoundStatus status() const;
 

+ 1 - 1
panda/src/audiotraits/milesAudioManager.cxx

@@ -272,7 +272,7 @@ load(Filename file_name) {
 //  Description:
 ////////////////////////////////////////////////////////////////////
 PT(AudioSound) MilesAudioManager::
-get_sound(const string& file_name) {
+get_sound(const string& file_name, bool) {
   audio_debug("MilesAudioManager::get_sound(file_name=\""<<file_name<<"\")");
 
   if(!is_valid()) {

+ 1 - 1
panda/src/audiotraits/milesAudioManager.h

@@ -40,7 +40,7 @@ public:
 
   bool is_valid();
   
-  PT(AudioSound) get_sound(const string& file_name);
+  virtual PT(AudioSound) get_sound(const string& file_name, bool positional = false);
   void uncache_sound(const string& file_name);
   void clear_cache();
   void set_cache_limit(unsigned int count);