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:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user