summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2022-07-01 22:51:00 +0200
committer hap <happppp@users.noreply.github.com>2022-07-01 22:51:13 +0200
commit2eb6b3556fc09b7a20cf79628a83aa9dd3243c4e (patch)
tree90a6ecd0820be5c80f39f1d1231fadf3ac50b8d8 /src/devices/sound
parent6176c84768ad7ee0c9240c2df90eb2461bfa2a9f (diff)
asterix,parodius,rollerg,vendetta: update sound nmi implementation
asterix: remove dead code
Diffstat (limited to 'src/devices/sound')
-rw-r--r--src/devices/sound/k053260.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/devices/sound/k053260.cpp b/src/devices/sound/k053260.cpp
index 9a85fa97811..ccb7142d945 100644
--- a/src/devices/sound/k053260.cpp
+++ b/src/devices/sound/k053260.cpp
@@ -100,6 +100,7 @@ k053260_device::k053260_device(const machine_config &mconfig, const char *tag, d
, m_timer(nullptr)
, m_keyon(0)
, m_mode(0)
+ , m_timer_state(0)
, m_voice{ { *this }, { *this }, { *this }, { *this } }
{
std::fill(std::begin(m_portdata), std::end(m_portdata), 0);
@@ -115,7 +116,7 @@ void k053260_device::device_start()
m_sh1_cb.resolve_safe();
m_sh2_cb.resolve_safe();
- m_stream = stream_alloc( 0, 2, clock() / CLOCKS_PER_SAMPLE );
+ m_stream = stream_alloc(0, 2, clock() / CLOCKS_PER_SAMPLE);
/* register with the save state system */
save_item(NAME(m_portdata));
@@ -137,7 +138,8 @@ void k053260_device::device_start()
void k053260_device::device_clock_changed()
{
m_stream->set_sample_rate(clock() / CLOCKS_PER_SAMPLE);
- m_timer->adjust(attotime::from_ticks(16, clock()), 0, attotime::from_ticks(16, clock()));
+ attotime period = attotime::from_ticks(16, clock());
+ m_timer->adjust(period, 0, period);
}
@@ -147,7 +149,8 @@ void k053260_device::device_clock_changed()
void k053260_device::device_reset()
{
- m_timer->adjust(attotime::from_ticks(16, clock()), 0, attotime::from_ticks(16, clock()));
+ attotime period = attotime::from_ticks(16, clock());
+ m_timer->adjust(period, 0, period);
for (auto & elem : m_voice)
elem.voice_reset();