AudioCommon/Mixer: Fix integrated GBA sample rate calculation and inverted stereo channels.

Give MixerFifo a variable sample rate dividend.
Handle byte-swapping and stereo channel construction outside of MixerFifo to better handle the custom layouts of each stream.
This commit is contained in:
Jordan Woyak committed 2026-03-30 08:37:37 -05:00
1 parent 6ba804416a
commit e7e6c0990d
3 files changed
+87 -73

No files matched your search

+1 -2
View File
@@ -435,8 +435,7 @@ void Core::SetAVStream()
m_stream.audioRateChanged = [](mAVStream* stream, unsigned rate) {
auto* core = static_cast<AVStream*>(stream)->core;
auto* const sound_stream = core->m_system.GetSoundStream();
sound_stream->GetMixer()->SetGBAInputSampleRateDivisors(
core->m_device_number, Mixer::FIXED_SAMPLE_RATE_DIVIDEND / rate);
sound_stream->GetMixer()->SetGBAInputSampleRate(core->m_device_number, rate);
};
m_stream.postAudioBuffer = [](mAVStream* stream, mAudioBuffer* audio_buffer) {
size_t sample_count = mAudioBufferAvailable(audio_buffer);