Browse Source

patch from forum user danlepage for new FMod API

David Rose 15 years ago
parent
commit
2ee7d0067b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      panda/src/audiotraits/fmodAudioManager.cxx

+ 4 - 0
panda/src/audiotraits/fmodAudioManager.cxx

@@ -143,7 +143,11 @@ FmodAudioManager() {
       result = _system->set3DSettings( _doppler_factor, _distance_factor, _drop_off_factor);
       result = _system->set3DSettings( _doppler_factor, _distance_factor, _drop_off_factor);
       fmod_audio_errcheck("_system->set3DSettings()", result);
       fmod_audio_errcheck("_system->set3DSettings()", result);
 
 
+#if (FMOD_VERSION >= 0x00043100) // FMod 4.31.00 changed this API
+      result = _system->setFileSystem(open_callback, close_callback, read_callback, seek_callback, 0, 0, -1);
+#else
       result = _system->setFileSystem(open_callback, close_callback, read_callback, seek_callback, -1);
       result = _system->setFileSystem(open_callback, close_callback, read_callback, seek_callback, -1);
+#endif
       fmod_audio_errcheck("_system->setFileSystem()", result);
       fmod_audio_errcheck("_system->setFileSystem()", result);
     }
     }
   }
   }