summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/8364_paula.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/8364_paula.cpp')
-rw-r--r--src/devices/machine/8364_paula.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/devices/machine/8364_paula.cpp b/src/devices/machine/8364_paula.cpp
index 1e10ca55b3e..6869ffb3395 100644
--- a/src/devices/machine/8364_paula.cpp
+++ b/src/devices/machine/8364_paula.cpp
@@ -58,7 +58,7 @@ void paula_8364_device::device_start()
}
// create the stream
- m_stream = stream_alloc_legacy(0, 4, clock() / CLOCK_DIVIDER);
+ m_stream = stream_alloc(0, 4, clock() / CLOCK_DIVIDER);
}
//-------------------------------------------------
@@ -159,10 +159,10 @@ void paula_8364_device::dma_reload(audio_channel *chan)
}
//-------------------------------------------------
-// sound_stream_update_legacy - handle a stream update
+// sound_stream_update - handle a stream update
//-------------------------------------------------
-void paula_8364_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
+void paula_8364_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
int channum, sampoffs = 0;
@@ -176,11 +176,11 @@ void paula_8364_device::sound_stream_update_legacy(sound_stream &stream, stream_
// clear the sample data to 0
for (channum = 0; channum < 4; channum++)
- memset(outputs[channum], 0, sizeof(stream_sample_t) * samples);
+ outputs[channum].fill(0);
return;
}
- samples *= CLOCK_DIVIDER;
+ int samples = outputs[0].samples() * CLOCK_DIVIDER;
// update the DMA states on each channel and reload if fresh
for (channum = 0; channum < 4; channum++)
@@ -215,7 +215,7 @@ void paula_8364_device::sound_stream_update_legacy(sound_stream &stream, stream_
audio_channel *chan = &m_channel[channum];
int volume = (nextvol == -1) ? chan->vol : nextvol;
int period = (nextper == -1) ? chan->per : nextper;
- stream_sample_t sample;
+ s32 sample;
int i;
// normalize the volume value
@@ -247,7 +247,7 @@ void paula_8364_device::sound_stream_update_legacy(sound_stream &stream, stream_
// fill the buffer with the sample
for (i = 0; i < ticks; i += CLOCK_DIVIDER)
- outputs[channum][(sampoffs + i) / CLOCK_DIVIDER] = sample;
+ outputs[channum].put_int((sampoffs + i) / CLOCK_DIVIDER, sample, 32768);
// account for the ticks; if we hit 0, advance
chan->curticks -= ticks;