2
0
Эх сурвалжийг харах

hack to protect FMOD from gs_instruments.dls

David Rose 19 жил өмнө
parent
commit
8b1cdc6ece

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

@@ -157,6 +157,15 @@ FmodAudioManager() {
   _midi_info.cbsize = sizeof(_midi_info);
 
   Filename dls_pathname = get_dls_pathname();
+
+#ifdef IS_OSX
+  // Here's a big kludge.  Don't ever let FMOD try to load this
+  // OSX-provided file; it crashes messily if you do.
+  if (dls_pathname == "/System/Library/Components/CoreAudio.component/Contents/Resources/gs_instruments.dls") {
+    dls_pathname = "";
+  }
+#endif  // IS_OSX
+
   if (!dls_pathname.empty()) {
     _dlsname = dls_pathname.to_os_specific();
     _midi_info.dlsname = _dlsname.c_str();