mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-23 10:11:33 +00:00
temporary try/catch around sound loading
This commit is contained in:
parent
9875d74abf
commit
dbd42386da
1 changed files with 14 additions and 7 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue