From d902fffa46f00d2fd10693a113116fc32c398c64 Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Wed, 20 Jul 2016 15:02:24 +0200 Subject: [PATCH] Make a failed wav file a SG_POPUP message --- simgear/sound/readwav.cxx | 2 +- simgear/sound/soundmgr_openal.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/simgear/sound/readwav.cxx b/simgear/sound/readwav.cxx index fa892d23..16df381f 100644 --- a/simgear/sound/readwav.cxx +++ b/simgear/sound/readwav.cxx @@ -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; diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index ec1646af..c0dc25f6 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -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; }