1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +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 min, float max,
bool loop)
{
try
{
SoundPtr snd = mgr->load(file);
snd->setRepeat(loop);
@ -127,6 +129,11 @@ namespace MWSound
setPos(snd, reference);
snd->play();
}
catch(...)
{
cout << "Error loading " << file << ", skipping.\n";
}
}
// Stop a sound and remove it from the list. If id="" then
// remove the entire object and stop all its sounds.