summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/upd7759.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/upd7759.cpp')
-rw-r--r--src/devices/sound/upd7759.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/devices/sound/upd7759.cpp b/src/devices/sound/upd7759.cpp
index 5c20e7c13da..8788abe78d8 100644
--- a/src/devices/sound/upd7759.cpp
+++ b/src/devices/sound/upd7759.cpp
@@ -221,7 +221,7 @@ void upd775x_device::device_start()
m_step = 4 * FRAC_ONE;
// compute the clock period
- m_clock_period = attotime::from_hz(clock());
+ m_clock_period = clock() ? attotime::from_hz(clock()) : attotime::zero;
// set the intial state
m_state = STATE_IDLE;
@@ -275,6 +275,13 @@ void upd775x_device::device_start()
save_item(NAME(m_romoffset));
}
+void upd775x_device::device_clock_changed()
+{
+ m_clock_period = clock() ? attotime::from_hz(clock()) : attotime::zero;
+
+ m_channel->set_sample_rate(clock() / 4);
+}
+
void upd7759_device::device_start()
{
upd775x_device::device_start();