Fixed audio bug

This commit is contained in:
mathusummut
2019-03-19 23:46:37 +01:00
parent 911a1fc927
commit 456febce1c

View File

@@ -542,6 +542,7 @@ namespace Shared {
try {
StreamSoundSource* source = findStreamSoundSource();
if (source != NULL)
source->play(strSound, fadeOn);
} catch (std::exception& e) {
SystemFlags::OutputDebug(SystemFlags::debugError, "In [%s::%s Line: %d] Error [%s]\n", __FILE__, __FUNCTION__, __LINE__, e.what());
@@ -656,7 +657,8 @@ namespace Shared {
// create a new source
if (streamSources.size() >= params.strBufferCount) {
throw std::runtime_error("Too many stream sounds played at once");
//throw std::runtime_error("Too many stream sounds played at once");
return NULL;
}
if (SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound, "In [%s::%s Line: %d]\n", __FILE__, __FUNCTION__, __LINE__);