From 96ed3869ff8461670a940a0ef4cc3e0274938a29 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Sun, 11 Jun 2017 22:29:36 -0400 Subject: [PATCH] ay8910.cpp: Fixed device_clock_changed to respect the YM2149_PIN26_LOW flag. Fixes MameTesters #06614 [Lord Nightmare] --- src/devices/sound/ay8910.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/devices/sound/ay8910.cpp b/src/devices/sound/ay8910.cpp index b7be0cbf46e..9eab30544e8 100644 --- a/src/devices/sound/ay8910.cpp +++ b/src/devices/sound/ay8910.cpp @@ -1200,12 +1200,6 @@ void ay8910_device::device_start() m_streams = 1; } - // FIXME: this doesn't belong here, it should be an input pin exposed via devcb - if (type() == YM2149 && (m_flags & YM2149_PIN26_LOW)) - { - master_clock /= 2; - } - build_mixer_table(); /* The envelope is pacing twice as fast for the YM2149 as for the AY-3-8910, */ @@ -1267,6 +1261,11 @@ void ay8910_device::set_volume(int channel,int volume) void ay8910_device::ay_set_clock(int clock) { + // FIXME: this doesn't belong here, it should be an input pin exposed via devcb + if (type() == YM2149 && (m_flags & YM2149_PIN26_LOW)) + { + clock /= 2; + } m_channel->set_sample_rate( clock / 8 ); }