Fix playing mono audio sounds with panning

Tested on OpenAL and XAudio backkend on Windows.

#3206
This commit is contained in:
Wojtek Figat
2025-02-11 23:35:08 +01:00
parent dccb43702e
commit 84843f8cbb
2 changed files with 53 additions and 24 deletions

View File

@@ -161,7 +161,10 @@ public:
case 2:
default: // TODO: implement multi-channel support (eg. 5.1, 7.1)
outputMatrix[0] = channels[FrontLeft];
outputMatrix[sourceChannels + 1] = channels[FrontRight];
if (sourceChannels == 1)
outputMatrix[1] = channels[FrontRight];
else
outputMatrix[sourceChannels + 1] = channels[FrontRight];
break;
}
}