Add generic PCM DAC system

For use with NGP DAC and some arcade system combos
This commit is contained in:
Natt Akuma 2022-07-03 01:42:47 +07:00
parent fac415c8e8
commit d3cd7bbb81
6 changed files with 481 additions and 4 deletions

View file

@ -609,16 +609,18 @@ void FurnaceGUI::drawSysConf(int chan, DivSystem type, unsigned int& flags, bool
break;
}
case DIV_SYSTEM_PCM_DAC: {
// default to 44100Hz 16-bit stereo
if (!flags) copyOfFlags=flags=0x1f0000|44099;
int sampRate=(flags&65535)+1;
int bitDepth=((flags>>16)&15)+1;
bool stereo=(flags>>20)&1;
ImGui::Text("Output rate:");
if (CWSliderInt("##SampRate",&sampRate,1,65536)) {
if (sampRate<1) sampRate=1;
if (CWSliderInt("##SampRate",&sampRate,1000,65536)) {
if (sampRate<1000) sampRate=1000;
if (sampRate>65536) sampRate=65536;
copyOfFlags=(flags&(~65535))|(sampRate-1);
} rightClickable
ImGui::Text("Output depth:");
ImGui::Text("Output bit depth:");
if (CWSliderInt("##BitDepth",&bitDepth,1,16)) {
if (bitDepth<1) bitDepth=1;
if (bitDepth>16) bitDepth=16;