From a0db8ab49af873cd10a714e6032000d428cb25e0 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 2 May 2022 01:22:49 -0500 Subject: [PATCH] OPZ: possibly fix fixed freq emulation --- src/engine/platform/sound/ymfm/ymfm_opz.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/platform/sound/ymfm/ymfm_opz.cpp b/src/engine/platform/sound/ymfm/ymfm_opz.cpp index 62a3d4d9c..cc7a7c9d5 100644 --- a/src/engine/platform/sound/ymfm/ymfm_opz.cpp +++ b/src/engine/platform/sound/ymfm/ymfm_opz.cpp @@ -498,7 +498,7 @@ uint32_t opz_registers::compute_phase_step(uint32_t choffs, uint32_t opoffs, opd // additional 12 bits of resolution; this calculation gives us, for // example, a frequency of 8.0009Hz when 8Hz is requested uint32_t substep = m_phase_substep[opoffs]; - substep += 75 * freq; + substep += 75 * 1024 * freq; phase_step = substep >> 12; m_phase_substep[opoffs] = substep & 0xfff;