mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-18 13:12:50 +00:00
temporary try/catch around sound loading
This commit is contained in:
parent
9875d74abf
commit
dbd42386da
@ -119,13 +119,20 @@ namespace MWSound
|
||||
float min, float max,
|
||||
bool loop)
|
||||
{
|
||||
SoundPtr snd = mgr->load(file);
|
||||
snd->setRepeat(loop);
|
||||
snd->setVolume(volume);
|
||||
snd->setPitch(pitch);
|
||||
snd->setRange(min,max);
|
||||
setPos(snd, reference);
|
||||
snd->play();
|
||||
try
|
||||
{
|
||||
SoundPtr snd = mgr->load(file);
|
||||
snd->setRepeat(loop);
|
||||
snd->setVolume(volume);
|
||||
snd->setPitch(pitch);
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user