summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-06-26 22:35:29 -0400
committer AJR <ajrhacker@users.noreply.github.com>2017-06-26 22:35:29 -0400
commitb6e896dab9b3f37e21be88bfc1fccf796765296d (patch)
treedb5fb7b112030209a29776bfcf162feddf947ca8 /src/devices
parenteaa9601501572b78fc22080880f809a13edc295a (diff)
tms5110: Implement device_clock_changed (nw)
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/sound/tms5110.cpp6
-rw-r--r--src/devices/sound/tms5110.h3
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;