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:
parent
9875d74abf
commit
dbd42386da
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user