1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 23:04:36 +01:00

Fix #7196: Crowd Noises Absent

Sounds loaded into memory that matched the target audio format were returning a failed result.
This commit is contained in:
Ted John
2018-02-25 02:40:36 +00:00
parent 5abae656a9
commit 0ee3c45d37

View File

@@ -206,7 +206,7 @@ namespace OpenRCT2 { namespace Audio
auto source = new MemoryAudioSource();
if (source->LoadCSS1(path.c_str(), index))
{
if (targetFormat != nullptr)
if (targetFormat != nullptr && source->GetFormat() != *targetFormat)
{
if (!source->Convert(targetFormat))
{
@@ -228,7 +228,7 @@ namespace OpenRCT2 { namespace Audio
auto source = new MemoryAudioSource();
if (source->LoadWAV(path.c_str()))
{
if (targetFormat != nullptr)
if (targetFormat != nullptr && source->GetFormat() != *targetFormat)
{
if (!source->Convert(targetFormat))
{