diff options
Diffstat (limited to 'src/devices/sound/k053260.cpp')
-rw-r--r-- | src/devices/sound/k053260.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/sound/k053260.cpp b/src/devices/sound/k053260.cpp index fcf35089747..434d352635c 100644 --- a/src/devices/sound/k053260.cpp +++ b/src/devices/sound/k053260.cpp @@ -115,8 +115,8 @@ void k053260_device::device_start() void k053260_device::device_reset() { - for (int i = 0; i < 4; i++) - m_voice[i].voice_reset(); + for (auto & elem : m_voice) + elem.voice_reset(); } @@ -208,9 +208,9 @@ WRITE8_MEMBER( k053260_device::write ) // 0x29 is a read register case 0x2a: // loop and pcm/adpcm select - for (int i = 0; i < 4; i++) + for (auto & elem : m_voice) { - m_voice[i].set_loop_kadpcm(data); + elem.set_loop_kadpcm(data); data >>= 1; } break; @@ -272,9 +272,9 @@ void k053260_device::sound_stream_update(sound_stream &stream, stream_sample_t * { stream_sample_t buffer[2] = {0, 0}; - for (int i = 0; i < 4; i++) + for (auto & voice : m_voice) { - KDSC_Voice &voice = m_voice[i]; + if (voice.playing()) voice.play(buffer); } |