summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/ics2115.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/ics2115.cpp')
-rw-r--r--src/devices/sound/ics2115.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/devices/sound/ics2115.cpp b/src/devices/sound/ics2115.cpp
index af3557c28c3..f42d1ee52e2 100644
--- a/src/devices/sound/ics2115.cpp
+++ b/src/devices/sound/ics2115.cpp
@@ -1,4 +1,4 @@
-// license:???
+// license:BSD-3-Clause
// copyright-holders:Alex Marshall,nimitz,austere
//ICS2115 by Raiden II team (c) 2010
//members: austere, nimitz, Alex Marshal
@@ -19,9 +19,9 @@ const device_type ICS2115 = &device_creator<ics2115_device>;
ics2115_device::ics2115_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ICS2115, "ICS2115", tag, owner, clock, "ics2115", __FILE__),
- device_sound_interface(mconfig, *this),
+ device_sound_interface(mconfig, *this), m_stream(nullptr),
m_rom(*this, DEVICE_SELF),
- m_irq_cb(*this)
+ m_irq_cb(*this), m_active_osc(0), m_osc_select(0), m_reg_select(0), m_irq_enabled(0), m_irq_pending(0), m_irq_on(false), m_vmode(0)
{
}
@@ -108,29 +108,29 @@ void ics2115_device::device_reset()
m_vmode = 0;
m_irq_on = false;
memset(m_voice, 0, sizeof(m_voice));
- for(int i = 0; i < 2; ++i)
+ for(auto & elem : m_timer)
{
- m_timer[i].timer->adjust(attotime::never);
- m_timer[i].period = 0;
- m_timer[i].scale = 0;
- m_timer[i].preset = 0;
+ elem.timer->adjust(attotime::never);
+ elem.period = 0;
+ elem.scale = 0;
+ elem.preset = 0;
}
- for(int i = 0; i < 32; i++) {
- m_voice[i].osc_conf.value = 2;
- m_voice[i].osc.fc = 0;
- m_voice[i].osc.acc = 0;
- m_voice[i].osc.start = 0;
- m_voice[i].osc.end = 0;
- m_voice[i].osc.ctl = 0;
- m_voice[i].osc.saddr = 0;
- m_voice[i].vol.acc = 0;
- m_voice[i].vol.incr = 0;
- m_voice[i].vol.start = 0;
- m_voice[i].vol.end = 0;
- m_voice[i].vol.pan = 0x7F;
- m_voice[i].vol_ctrl.value = 1;
- m_voice[i].vol.mode = 0;
- m_voice[i].state.value = 0;
+ for(auto & elem : m_voice) {
+ elem.osc_conf.value = 2;
+ elem.osc.fc = 0;
+ elem.osc.acc = 0;
+ elem.osc.start = 0;
+ elem.osc.end = 0;
+ elem.osc.ctl = 0;
+ elem.osc.saddr = 0;
+ elem.vol.acc = 0;
+ elem.vol.incr = 0;
+ elem.vol.start = 0;
+ elem.vol.end = 0;
+ elem.vol.pan = 0x7F;
+ elem.vol_ctrl.value = 1;
+ elem.vol.mode = 0;
+ elem.state.value = 0;
}
}