Browse Source

search for MP3s as well

Cary Sandvig 25 years ago
parent
commit
bc362bc346
1 changed files with 3 additions and 0 deletions
  1. 3 0
      panda/src/audiotraits/audio_load_mp3.cxx

+ 3 - 0
panda/src/audiotraits/audio_load_mp3.cxx

@@ -7,6 +7,7 @@
 #include "audio_pool.h"
 #include "config_audio.h"
 #include "audio_trait.h"
+#include "config_util.h"
 
 Configure(audio_load_mp3);
 
@@ -445,6 +446,7 @@ AudioTraits::SoundClass* AudioLoadMp3(Filename) {
 EXPCL_MISC AudioTraits::SoundClass* AudioLoadMp3(Filename filename) {
   unsigned char* buf;
   unsigned long len;
+  filename.resolve_filename(get_sound_path());
   read_file(filename, &buf, len);
   if (buf != (unsigned char*)0L) {
     return WinSample::load_raw(buf, len);
@@ -459,6 +461,7 @@ EXPCL_MISC AudioTraits::SoundClass* AudioLoadMp3(Filename filename) {
 AudioTraits::SoundClass* AudioLoadMp3(Filename filename) {
   unsigned char* buf;
   unsigned long len;
+  filename.resolve_filename(get_sound_path());
   read_file(filename, &buf, len);
   if (buf != (unsigned char*)0L) {
     return LinuxSample::load_raw(buf, len);