diff options
Diffstat (limited to 'src/devices/sound/n63701x.cpp')
-rw-r--r-- | src/devices/sound/n63701x.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/devices/sound/n63701x.cpp b/src/devices/sound/n63701x.cpp index fae1ff01edd..c6f09efae72 100644 --- a/src/devices/sound/n63701x.cpp +++ b/src/devices/sound/n63701x.cpp @@ -64,13 +64,12 @@ void namco_63701x_device::device_start() // sound_stream_update - handle a stream update //------------------------------------------------- -void namco_63701x_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) +void namco_63701x_device::sound_stream_update(sound_stream &stream) { int ch; for (ch = 0;ch < 2;ch++) { - stream_sample_t *buf = outputs[ch]; voice_63701x *v = &m_voices[ch]; if (v->playing) @@ -80,12 +79,12 @@ void namco_63701x_device::sound_stream_update(sound_stream &stream, stream_sampl int vol = vol_table[v->volume]; int p; - for (p = 0;p < samples;p++) + for (p = 0;p < stream.samples();p++) { if (v->silence_counter) { v->silence_counter--; - *(buf++) = 0; + stream.put(0, p, 0); } else { @@ -94,31 +93,30 @@ void namco_63701x_device::sound_stream_update(sound_stream &stream, stream_sampl if (data == 0xff) /* end of sample */ { v->playing = 0; + stream.fill(0, 0, p); break; } else if (data == 0x00) /* silence compression */ { data = base[(pos++) & 0xffff]; v->silence_counter = data; - *(buf++) = 0; + stream.put(0, p, 0); } else { - *(buf++) = vol * (data - 0x80); + stream.put_int(0, p, vol * (data - 0x80), 32768); } } } v->position = pos; } - else - memset(buf, 0, samples * sizeof(*buf)); } } -WRITE8_MEMBER( namco_63701x_device::namco_63701x_w ) +void namco_63701x_device::write(offs_t offset, uint8_t data) { int ch = offset / 2; |