From b6e896dab9b3f37e21be88bfc1fccf796765296d Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 26 Jun 2017 22:35:29 -0400 Subject: tms5110: Implement device_clock_changed (nw) --- src/devices/sound/tms5110.cpp | 6 ++---- src/devices/sound/tms5110.h | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/devices/sound/tms5110.cpp b/src/devices/sound/tms5110.cpp index 09334d0f4bd..5f7ee0bddb0 100644 --- a/src/devices/sound/tms5110.cpp +++ b/src/devices/sound/tms5110.cpp @@ -1249,14 +1249,12 @@ void tms5110_device::sound_stream_update(sound_stream &stream, stream_sample_t * /****************************************************************************** tms5110_set_frequency -- adjusts the playback frequency - TODO: kill this function; we should be adjusting the tms51xx device clock itself, - not setting it here! ******************************************************************************/ -void tms5110_device::set_frequency(int frequency) +void tms5110_device::device_clock_changed() { - m_stream->set_sample_rate(frequency / 80); + m_stream->set_sample_rate(clock() / 80); } diff --git a/src/devices/sound/tms5110.h b/src/devices/sound/tms5110.h index 76f5c38ed51..89daa0637a7 100644 --- a/src/devices/sound/tms5110.h +++ b/src/devices/sound/tms5110.h @@ -65,14 +65,13 @@ public: // it is not related at all to the speech generation and conflicts with the new ROM controller interface. DECLARE_READ_LINE_MEMBER( romclk_hack_r ); - void set_frequency(int frequency); - protected: tms5110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant); // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_clock_changed() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; -- cgit v1.2.3