MSM5232: add detune option

This commit is contained in:
tildearrow 2022-10-01 03:27:57 -05:00
parent 5e18edb229
commit 81ac2ba3b1
3 changed files with 18 additions and 3 deletions

View file

@ -81,7 +81,7 @@ void DivPlatformMSM5232::tick(bool sysTick) {
chan[i].std.next();
if (chan[i].std.vol.had) {
chan[i].outVol=VOL_SCALE_LOG(chan[i].vol&31,MIN(31,chan[i].std.vol.val),31);
// TODO: volume write?
// MSM5232 doesn't even have volume control :<
}
if (chan[i].std.arp.had) {
if (!chan[i].inPorta) {
@ -300,7 +300,8 @@ void DivPlatformMSM5232::notifyInsDeletion(void* ins) {
void DivPlatformMSM5232::setFlags(const DivConfig& flags) {
chipClock=2119040;
msm->set_clock(chipClock);
detune=flags.getInt("detune",0);
msm->set_clock(chipClock+detune*1024);
rate=msm->get_rate();
for (int i=0; i<8; i++) {
oscBuf[i]->rate=rate;