Open Azimer opened 4 years ago
FreeSurround demuxes an encoded surround signal into multiple channels. You need to forward the decoded channels to the AudioMixer (or the equivalent in AziAudio), then have the corresponding channel layout in your backend.
Backend calls AudioMixer https://github.com/dolphin-emu/dolphin/blob/19ed64122c11f7cd36ff92b61e7af7bb772c01a8/Source/Core/AudioCommon/CubebStream.cpp#L25
AudioMixer processes decoded channels by FreeSurround (m_surround_decoder) https://github.com/dolphin-emu/dolphin/blob/19ed64122c11f7cd36ff92b61e7af7bb772c01a8/Source/Core/AudioCommon/Mixer.cpp#L164-L186
Set the channel layout in cubeB backend https://github.com/dolphin-emu/dolphin/blob/19ed64122c11f7cd36ff92b61e7af7bb772c01a8/Source/Core/AudioCommon/CubebStream.cpp#L42-L55
Hey, are you still working on this? I noticed surround sound is working flawless on dolphin, even when you play n64 games on it (be it virtualware or collections). There is a checkbox in audio options for Dolby Pro Logic II Dekoder, maybe you can look at their implementation?
Some examples are Dolphin's implementation using FreeSurround. Kodi adsp also uses a modified version of this https://github.com/kodi-adsp/adsp.freesurround. Will need to investigate more. Perhaps for v0.90?