joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.65k stars 376 forks source link

Possible OPL3 and mixer enhancement: "Resound OPL3" emulation mode (4-channel surround mode) #552

Open joncampbell123 opened 6 years ago

joncampbell123 commented 6 years ago

Ref: LGR Resound OPL3 https://www.youtube.com/watch?v=61d9xFG5aSo

However to render 4-channel surround, the mixer code will need to be updated somehow to support 2-channel or 4-channel output. I know that SDL 1.x can be asked to output 4-channel surround sound at least (I've done it before).

This may require some changes to OPL emulation as well.

As a first step, all 4 channels could be downmixed to stereo, with an option to mix the back channels into a Dolby Surround type "90 degrees out of phase" type composition, or just mix the back & front L and R to just L and R.

I may not get to this soon, but this is a future enhancement idea to add eventually.

joncampbell123 commented 5 years ago

The card arrived in the mail, so DOSLIB development can start soon.

DOSBox-X is going to need work to make surround output possible because all mixer code is hard-coded around 16-bit stereo output.

joncampbell123 commented 5 years ago

An interim step could be to render the 3rd and 4th OPL3 channels as one surround channel, invert phase in one channel and mix into stereo (Dolby surround compatible), though I've heard real surround encoding uses some kind of convolution filter as well that I don't know how to implement.

Torinde commented 1 year ago

VirtualBox 6.0.0 has "support for surround speaker setups (as used by Windows 10 Build 1809)" - I assume in HDA, but maybe also in AC'97? Hardware HDA was supported by WinXP/2K and AC'97 also by Win9x.

May help also for #3597

Torinde commented 1 year ago

86box also has AC'97

Torinde commented 8 months ago

Possibly related - stereo-extension, 4-ch output support: