1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-23 18:11:34 +00:00

temporary try/catch around sound loading

This commit is contained in:
Nicolay Korslund 2010-08-14 21:43:25 +02:00
parent 9875d74abf
commit dbd42386da

View file

@ -118,6 +118,8 @@ namespace MWSound
float volume, float pitch, float volume, float pitch,
float min, float max, float min, float max,
bool loop) bool loop)
{
try
{ {
SoundPtr snd = mgr->load(file); SoundPtr snd = mgr->load(file);
snd->setRepeat(loop); snd->setRepeat(loop);
@ -127,6 +129,11 @@ namespace MWSound
setPos(snd, reference); setPos(snd, reference);
snd->play(); snd->play();
} }
catch(...)
{
cout << "Error loading " << file << ", skipping.\n";
}
}
// Stop a sound and remove it from the list. If id="" then // Stop a sound and remove it from the list. If id="" then
// remove the entire object and stop all its sounds. // remove the entire object and stop all its sounds.