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:
parent
9875d74abf
commit
dbd42386da
1 changed files with 14 additions and 7 deletions
|
@ -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…
Reference in a new issue