summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/saa1099.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/saa1099.cpp')
-rw-r--r--src/devices/sound/saa1099.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/devices/sound/saa1099.cpp b/src/devices/sound/saa1099.cpp
index cad84d184bb..080ebabe89c 100644
--- a/src/devices/sound/saa1099.cpp
+++ b/src/devices/sound/saa1099.cpp
@@ -161,7 +161,7 @@ saa1099_device::saa1099_device(const machine_config &mconfig, const char *tag, d
void saa1099_device::device_start()
{
/* for each chip allocate one stream */
- m_stream = stream_alloc_legacy(0, 2, clock()/clock_divider);
+ m_stream = stream_alloc(0, 2, clock()/clock_divider);
save_item(NAME(m_noise_params));
save_item(NAME(m_env_enable));
@@ -200,18 +200,18 @@ void saa1099_device::device_clock_changed()
//-------------------------------------------------
-// sound_stream_update_legacy - handle a stream update
+// sound_stream_update - handle a stream update
//-------------------------------------------------
-void saa1099_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
+void saa1099_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
int j, ch;
/* if the channels are disabled we're done */
if (!m_all_ch_enable)
{
/* init output data */
- memset(outputs[LEFT],0,samples*sizeof(*outputs[LEFT]));
- memset(outputs[RIGHT],0,samples*sizeof(*outputs[RIGHT]));
+ outputs[LEFT].fill(0);
+ outputs[RIGHT].fill(0);
return;
}
@@ -227,7 +227,7 @@ void saa1099_device::sound_stream_update_legacy(sound_stream &stream, stream_sam
}
/* fill all data needed */
- for( j = 0; j < samples; j++ )
+ for( j = 0; j < outputs[0].samples(); j++ )
{
int output_l = 0, output_r = 0;
@@ -285,8 +285,8 @@ void saa1099_device::sound_stream_update_legacy(sound_stream &stream, stream_sam
m_noise[ch].counter -= clock_divider;
}
/* write sound data to the buffer */
- outputs[LEFT][j] = output_l / 6;
- outputs[RIGHT][j] = output_r / 6;
+ outputs[LEFT].put_int(j, output_l, 32768 * 6);
+ outputs[RIGHT].put_int(j, output_r, 32768 * 6);
}
}