Make a failed wav file a SG_POPUP message
This commit is contained in:
@@ -394,7 +394,7 @@ ALvoid* loadWAVFromFile(const SGPath& path, unsigned int& format, ALsizei& size,
|
|||||||
try {
|
try {
|
||||||
loadWavFile(fd, &b);
|
loadWavFile(fd, &b);
|
||||||
} catch (sg_exception& e) {
|
} 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;
|
ALvoid* data = b.data;
|
||||||
|
|||||||
@@ -556,8 +556,8 @@ unsigned int SGSoundMgr::request_buffer(SGSoundSample *sample)
|
|||||||
bool res = load(sample_name, &sample_data, &format, &size, &freq, &block);
|
bool res = load(sample_name, &sample_data, &format, &size, &freq, &block);
|
||||||
if (res == false) return NO_BUFFER;
|
if (res == false) return NO_BUFFER;
|
||||||
} catch (sg_exception& e) {
|
} catch (sg_exception& e) {
|
||||||
SG_LOG(SG_SOUND, SG_ALERT,
|
SG_LOG(SG_SOUND, SG_POPUP,
|
||||||
"failed to load sound buffer: " << e.getFormattedMessage());
|
"failed to load sound buffer:\n" << e.getFormattedMessage());
|
||||||
sample->set_buffer( SGSoundMgr::FAILED_BUFFER );
|
sample->set_buffer( SGSoundMgr::FAILED_BUFFER );
|
||||||
return FAILED_BUFFER;
|
return FAILED_BUFFER;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user