mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-10 15:45:37 +00:00
Stop trying to play non-existent music files started by scripts
This commit is contained in:
parent
ec6451e93a
commit
4a6464ea67
@ -224,7 +224,16 @@ namespace MWSound
|
|||||||
stopMusic();
|
stopMusic();
|
||||||
|
|
||||||
DecoderPtr decoder = getDecoder();
|
DecoderPtr decoder = getDecoder();
|
||||||
decoder->open(filename);
|
try
|
||||||
|
{
|
||||||
|
decoder->open(filename);
|
||||||
|
}
|
||||||
|
catch(std::exception &e)
|
||||||
|
{
|
||||||
|
Log(Debug::Error) << "Failed to load audio from " << filename << ": " << e.what();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
mMusic = getStreamRef();
|
mMusic = getStreamRef();
|
||||||
mMusic->init([&] {
|
mMusic->init([&] {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user