]> git.mxchange.org Git - simgear.git/commitdiff
Make a failed wav file a SG_POPUP message
authorErik Hofman <erik@ehofman.com>
Wed, 20 Jul 2016 13:02:24 +0000 (15:02 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
simgear/sound/readwav.cxx
simgear/sound/soundmgr_openal.cxx

index fa892d23e004c6c08d24a612783e633ce98e8961..16df381fb5577ab7d21269b85b3b3a6e0e7d1137 100644 (file)
@@ -394,7 +394,7 @@ ALvoid* loadWAVFromFile(const SGPath& path, unsigned int& format, ALsizei& size,
   try {
       loadWavFile(fd, &b);
   } catch (sg_exception& e) {
-      throw sg_io_exception(e.getFormattedMessage() + " for " + path.str());
+      throw sg_io_exception(e.getFormattedMessage() + "\nfor: " + path.str());
   }
 
   ALvoid* data = b.data;
index ec1646af9242452ab5ec39b8abf9a6020ef87a55..c0dc25f6f16190c11bc0e8b5123cf363ce671aba 100644 (file)
@@ -556,8 +556,8 @@ unsigned int SGSoundMgr::request_buffer(SGSoundSample *sample)
               bool res = load(sample_name, &sample_data, &format, &size, &freq, &block);
               if (res == false) return NO_BUFFER;
             } catch (sg_exception& e) {
-              SG_LOG(SG_SOUND, SG_ALERT,
-                    "failed to load sound buffer: " << e.getFormattedMessage());
+              SG_LOG(SG_SOUND, SG_POPUP,
+                    "failed to load sound buffer:\n" << e.getFormattedMessage());
               sample->set_buffer( SGSoundMgr::FAILED_BUFFER );
               return FAILED_BUFFER;
             }