diff options
Diffstat (limited to 'src/devices/sound/gb.cpp')
-rw-r--r-- | src/devices/sound/gb.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/devices/sound/gb.cpp b/src/devices/sound/gb.cpp index e5fe37688cc..42944daf152 100644 --- a/src/devices/sound/gb.cpp +++ b/src/devices/sound/gb.cpp @@ -142,7 +142,7 @@ cgb04_apu_device::cgb04_apu_device(const machine_config &mconfig, const char *ta void gameboy_sound_device::device_start() { - m_channel = machine().sound().stream_alloc(*this, 0, 2, machine().sample_rate()); + m_channel = stream_alloc_legacy(0, 2, machine().sample_rate()); m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gameboy_sound_device::timer_callback),this)); m_timer->adjust(clocks_to_attotime(FRAME_CYCLES/128), 0, clocks_to_attotime(FRAME_CYCLES/128)); @@ -1211,11 +1211,13 @@ void cgb04_apu_device::apu_power_off() //------------------------------------------------- -// sound_stream_update - handle a stream update +// sound_stream_update_legacy - handle a stream update //------------------------------------------------- -void gameboy_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) +void gameboy_sound_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) { + stream_sample_t *outputl = outputs[0]; + stream_sample_t *outputr = outputs[1]; while (samples-- > 0) { stream_sample_t sample; @@ -1272,7 +1274,7 @@ void gameboy_sound_device::sound_stream_update(sound_stream &stream, stream_samp right <<= 6; /* Update the buffers */ - *(outputs[0]++) = left; - *(outputs[1]++) = right; + *outputl++ = left; + *outputr++ = right; } } |