summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2018-07-28 09:19:24 +0100
committer smf- <smf-@users.noreply.github.com>2018-07-28 09:20:09 +0100
commit7ecf21cbdd603fbe3f308461ed0c8d25f1497b67 (patch)
tree6553ed6020d03ac5c5ab7aa099f39c69fe48775e
parent98100466500e2a794679f14b7817779318b7376f (diff)
added device_clock_changed (nw)
-rw-r--r--src/devices/sound/sn76496.cpp5
-rw-r--r--src/devices/sound/sn76496.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/devices/sound/sn76496.cpp b/src/devices/sound/sn76496.cpp
index 0c08ca0cb2e..87f1a95486e 100644
--- a/src/devices/sound/sn76496.cpp
+++ b/src/devices/sound/sn76496.cpp
@@ -267,6 +267,11 @@ void sn76496_base_device::device_start()
register_for_save_states();
}
+void sn76496_base_device::device_clock_changed()
+{
+ m_sound->set_sample_rate(clock()/2);
+}
+
WRITE8_MEMBER( sn76496_base_device::stereo_w )
{
m_sound->update();
diff --git a/src/devices/sound/sn76496.h b/src/devices/sound/sn76496.h
index 0a129260e4d..b3d330e0c2c 100644
--- a/src/devices/sound/sn76496.h
+++ b/src/devices/sound/sn76496.h
@@ -48,6 +48,7 @@ protected:
uint32_t clock);
virtual void device_start() override;
+ virtual void device_clock_changed() override;
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
private: