Browse Source

use fmod interface 3.73

David Rose 21 years ago
parent
commit
41a18738a4

+ 3 - 3
panda/src/audiotraits/fmodAudioManager.cxx

@@ -238,10 +238,10 @@ get_sound(const string &file_name, bool positional) {
   string suffix = downcase(path.get_extension());
   
   if (suffix == "mid" || suffix == "rmi" || suffix == "midi") {
-    stream = FSOUND_Stream_OpenFile(os_path.c_str(), 0, 0);
+    stream = FSOUND_Stream_Open(os_path.c_str(), 0, 0, 0);
   } else {
-    stream = FSOUND_Stream_OpenFile((const char*)(entry->data),
-                                    flags, entry->size);
+    stream = FSOUND_Stream_Open((const char*)(entry->data),
+                                flags, 0, entry->size);
   }
   if (stream == NULL) {
     audio_error("FmodAudioManager::get_sound failed.");

+ 2 - 2
panda/src/audiotraits/fmodAudioSound.cxx

@@ -41,7 +41,7 @@
 //               of a loop, but really ends).
 ////////////////////////////////////////////////////////////////////
 signed char
-pandaFmodFinishedCallback_Stream( FSOUND_STREAM *audio, void *buff, int len, int p_sound ) {
+pandaFmodFinishedCallback_Stream( FSOUND_STREAM *audio, void *buff, int len, void *p_sound ) {
     FmodAudioSound* sound = (FmodAudioSound*)p_sound;
     assert(sound); //sanity test
     sound->finished();
@@ -62,7 +62,7 @@ panda_Fmod_finished_callback( FSOUND_STREAM *audio, FmodAudioSound* sound ) {
         <<", sound="<<((void*)sound)<<")");
     FSOUND_STREAMCALLBACK callback = pandaFmodFinishedCallback_Stream;
                                 //actual stream, callback func, pointer to FmodAudioSound
-    FSOUND_Stream_SetEndCallback( audio, callback, (int)sound );
+    FSOUND_Stream_SetEndCallback( audio, callback, sound );
 }
 
 ////////////////////////////////////////////////////////////////////