Merge pull request #578 from tildearrow/ngp

Add generic PCM DAC system
This commit is contained in:
tildearrow 2022-07-23 19:12:51 -05:00 committed by GitHub
commit 623c0efbba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;