summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/laserdsc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/laserdsc.cpp')
-rw-r--r--src/devices/machine/laserdsc.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/src/devices/machine/laserdsc.cpp b/src/devices/machine/laserdsc.cpp
index e1033518cb5..dc9fd2f5064 100644
--- a/src/devices/machine/laserdsc.cpp
+++ b/src/devices/machine/laserdsc.cpp
@@ -392,7 +392,7 @@ TIMER_CALLBACK_MEMBER(laserdisc_device::fetch_vbi_data)
// laserdiscs
//-------------------------------------------------
-void laserdisc_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void laserdisc_device::sound_stream_update(sound_stream &stream)
{
// compute AND values based on the squelch
int16_t leftand = (m_audiosquelch & 1) ? 0x0000 : 0xffff;
@@ -403,17 +403,7 @@ void laserdisc_device::sound_stream_update(sound_stream &stream, std::vector<rea
if (samples_avail < 0)
samples_avail += m_audiobufsize;
- // if no attached ld, just clear the buffers
- auto &dst0 = outputs[0];
- auto &dst1 = outputs[1];
- if (samples_avail < outputs[0].samples())
- {
- dst0.fill(0);
- dst1.fill(0);
- }
-
- // otherwise, stream from our buffer
- else
+ if (samples_avail >= stream.samples())
{
int16_t *buffer0 = &m_audiobuffer[0][0];
int16_t *buffer1 = &m_audiobuffer[1][0];
@@ -421,10 +411,10 @@ void laserdisc_device::sound_stream_update(sound_stream &stream, std::vector<rea
// copy samples, clearing behind us as we go
int sampindex;
- for (sampindex = 0; sampout != m_audiobufin && sampindex < outputs[0].samples(); sampindex++)
+ for (sampindex = 0; sampout != m_audiobufin && sampindex < stream.samples(); sampindex++)
{
- dst0.put_int(sampindex, buffer0[sampout] & leftand, 32768);
- dst1.put_int(sampindex, buffer1[sampout] & rightand, 32768);
+ stream.put_int(0, sampindex, buffer0[sampout] & leftand, 32768);
+ stream.put_int(1, sampindex, buffer1[sampout] & rightand, 32768);
buffer0[sampout] = 0;
buffer1[sampout] = 0;
sampout++;
@@ -434,16 +424,16 @@ void laserdisc_device::sound_stream_update(sound_stream &stream, std::vector<rea
m_audiobufout = sampout;
// clear out the rest of the buffer
- if (sampindex < outputs[0].samples())
+ if (sampindex < stream.samples())
{
sampout = (m_audiobufout == 0) ? m_audiobufsize - 1 : m_audiobufout - 1;
s32 fill0 = buffer0[sampout] & leftand;
s32 fill1 = buffer1[sampout] & rightand;
- for ( ; sampindex < outputs[0].samples(); sampindex++)
+ for ( ; sampindex < stream.samples(); sampindex++)
{
- dst0.put_int(sampindex, fill0, 32768);
- dst1.put_int(sampindex, fill1, 32768);
+ stream.put_int(0, sampindex, fill0, 32768);
+ stream.put_int(1, sampindex, fill1, 32768);
}
}
}