diff options
Diffstat (limited to 'src/devices/sound/tms5220.cpp')
-rw-r--r-- | src/devices/sound/tms5220.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/sound/tms5220.cpp b/src/devices/sound/tms5220.cpp index 227de0f2be9..9c4974c34e2 100644 --- a/src/devices/sound/tms5220.cpp +++ b/src/devices/sound/tms5220.cpp @@ -2062,14 +2062,14 @@ void tms5220_device::sound_stream_update(sound_stream &stream, std::vector<read_ /* loop while we still have samples to generate */ constexpr stream_buffer::sample_t sample_scale = 1.0 / 32768.0; - while (!output.done()) + for (int sampindex = 0; sampindex < output.samples(); ) { - int length = (output.remaining() > MAX_SAMPLE_CHUNK) ? MAX_SAMPLE_CHUNK : output.remaining(); + int length = (output.samples() > MAX_SAMPLE_CHUNK) ? MAX_SAMPLE_CHUNK : output.samples(); /* generate the samples and copy to the target buffer */ process(sample_data, length); for (int index = 0; index < length; index++) - output.put(sample_data[index] * sample_scale); + output.put(sampindex++, sample_data[index] * sample_scale); } } |