1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-23 00:09:42 +00:00

Lookup sound when need to stop

Instead of loading.
This commit is contained in:
elsid 2020-06-28 22:16:45 +02:00
parent d18f1f8956
commit 0ff5e9bfb9
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -772,7 +772,7 @@ namespace MWSound
if(!mOutput->isInitialized()) if(!mOutput->isInitialized())
return; return;
Sound_Buffer *sfx = loadSound(Misc::StringUtils::lowerCase(soundId)); Sound_Buffer *sfx = lookupSound(Misc::StringUtils::lowerCase(soundId));
if (!sfx) return; if (!sfx) return;
stopSound(sfx, MWWorld::ConstPtr()); stopSound(sfx, MWWorld::ConstPtr());
@ -783,7 +783,7 @@ namespace MWSound
if(!mOutput->isInitialized()) if(!mOutput->isInitialized())
return; return;
Sound_Buffer *sfx = loadSound(Misc::StringUtils::lowerCase(soundId)); Sound_Buffer *sfx = lookupSound(Misc::StringUtils::lowerCase(soundId));
if (!sfx) return; if (!sfx) return;
stopSound(sfx, ptr); stopSound(sfx, ptr);