1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-23 05:11:33 +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

@ -119,13 +119,20 @@ namespace MWSound
float min, float max, float min, float max,
bool loop) bool loop)
{ {
SoundPtr snd = mgr->load(file); try
snd->setRepeat(loop); {
snd->setVolume(volume); SoundPtr snd = mgr->load(file);
snd->setPitch(pitch); snd->setRepeat(loop);
snd->setRange(min,max); snd->setVolume(volume);
setPos(snd, reference); snd->setPitch(pitch);
snd->play(); snd->setRange(min,max);
setPos(snd, reference);
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