diff options
Diffstat (limited to 'src/devices/sound/vrc6.cpp')
-rw-r--r-- | src/devices/sound/vrc6.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/devices/sound/vrc6.cpp b/src/devices/sound/vrc6.cpp index b769fde4043..40f2ddf8946 100644 --- a/src/devices/sound/vrc6.cpp +++ b/src/devices/sound/vrc6.cpp @@ -17,7 +17,7 @@ #include "vrc6.h" // device type definition -DEFINE_DEVICE_TYPE(VRC6, vrc6snd_device, "vrc6snd", "Konami VRC6 (Sound)") +DEFINE_DEVICE_TYPE(VRC6, vrc6snd_device, "vrc6snd", "Konami 053329 VRC VI (Sound)") //************************************************************************** // LIVE DEVICE @@ -45,7 +45,7 @@ vrc6snd_device::vrc6snd_device(const machine_config &mconfig, const char *tag, d void vrc6snd_device::device_start() { - m_stream = machine().sound().stream_alloc(*this, 0, 1, clock()); + m_stream = stream_alloc(0, 1, clock()); m_freqctrl = m_pulsectrl[0] = m_pulsectrl[1] = 0; m_pulsefrql[0] = m_pulsefrql[1] = m_pulsefrqh[0] = m_pulsefrqh[1] = 0; @@ -93,15 +93,13 @@ void vrc6snd_device::device_reset() // our sound stream //------------------------------------------------- -void vrc6snd_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) +void vrc6snd_device::sound_stream_update(sound_stream &stream) { - std::fill_n(&outputs[0][0], samples, 0); - // check global halt bit if (m_freqctrl & 1) return; - for (int i = 0; i < samples; i++) + for (int i = 0; i < stream.samples(); i++) { // update pulse1 if (m_pulsefrqh[0] & 0x80) @@ -198,9 +196,8 @@ void vrc6snd_device::sound_stream_update(sound_stream &stream, stream_sample_t * // sum 2 4-bit pulses, 1 5-bit saw = unsigned 6 bit output s16 tmp = (s16)(u8)(m_output[0] + m_output[1] + m_output[2]); - tmp <<= 8; - outputs[0][i] = tmp; + stream.put_int(0, i, tmp, 128); } } |