Fix playing 6-channel audio with XAudio2 backend

This commit is contained in:
Wojtek Figat
2024-05-08 10:20:04 +02:00
parent a11fa46ee2
commit e51d2dda00
3 changed files with 7 additions and 17 deletions

View File

@@ -498,7 +498,7 @@ void AudioBackendOAL::Buffer_Write(uint32 bufferID, byte* samples, const AudioDa
}
else
{
LOG(Warning, "OpenAL doesn't support bit depth larger than 16. Your audio data will be truncated.");
LOG(Warning, "OpenAL doesn't support bit depth larger than 16. Audio data will be truncated.");
const uint32 bufferSize = info.NumSamples * 2;
byte* sampleBuffer16 = (byte*)Allocator::Allocate(bufferSize);
AudioTool::ConvertBitDepth(samples, info.BitDepth, sampleBuffer16, 16, info.NumSamples);