summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2020-06-01 08:25:43 +0200
committer Ivan Vangelista <mesgnet@yahoo.it>2020-06-01 08:25:43 +0200
commit32a28ac4d306fb7e7a97ce0d4d437e89915452a1 (patch)
tree37ccefb6e8ae592dc9ea106922ad0a2d0dd5437a
parent49873e3b142b72327802c9d95ebffa4b90c1cc5f (diff)
sound/rf5c68.cpp: use STRUCT_MEMBER for state saving (nw)
-rw-r--r--src/devices/sound/rf5c68.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/devices/sound/rf5c68.cpp b/src/devices/sound/rf5c68.cpp
index ef1fce5123d..256e5a9858c 100644
--- a/src/devices/sound/rf5c68.cpp
+++ b/src/devices/sound/rf5c68.cpp
@@ -74,16 +74,14 @@ void rf5c68_device::device_start()
/* allocate the stream */
m_stream = stream_alloc(0, 2, clock() / 384);
- for (int ch = 0; ch < NUM_CHANNELS; ch++)
- {
- save_item(NAME(m_chan[ch].enable), ch);
- save_item(NAME(m_chan[ch].env), ch);
- save_item(NAME(m_chan[ch].pan), ch);
- save_item(NAME(m_chan[ch].start), ch);
- save_item(NAME(m_chan[ch].addr), ch);
- save_item(NAME(m_chan[ch].step), ch);
- save_item(NAME(m_chan[ch].loopst), ch);
- }
+ save_item(STRUCT_MEMBER(m_chan, enable), NUM_CHANNELS);
+ save_item(STRUCT_MEMBER(m_chan, env), NUM_CHANNELS);
+ save_item(STRUCT_MEMBER(m_chan, pan), NUM_CHANNELS);
+ save_item(STRUCT_MEMBER(m_chan, start), NUM_CHANNELS);
+ save_item(STRUCT_MEMBER(m_chan, addr), NUM_CHANNELS);
+ save_item(STRUCT_MEMBER(m_chan, step), NUM_CHANNELS);
+ save_item(STRUCT_MEMBER(m_chan, loopst), NUM_CHANNELS);
+
save_item(NAME(m_cbank));
save_item(NAME(m_wbank));
save_item(NAME(m_enable));