summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/s_dsp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/s_dsp.cpp')
-rw-r--r--src/devices/sound/s_dsp.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/devices/sound/s_dsp.cpp b/src/devices/sound/s_dsp.cpp
index 487b77bff2f..98cd204b503 100644
--- a/src/devices/sound/s_dsp.cpp
+++ b/src/devices/sound/s_dsp.cpp
@@ -160,7 +160,7 @@ void s_dsp_device::device_start()
space().cache(m_cache);
space().specific(m_data);
- m_channel = machine().sound().stream_alloc(*this, 0, 2, clock() / 64);
+ m_channel = stream_alloc(0, 2, clock() / 64);
state_register();
}
@@ -965,8 +965,8 @@ int s_dsp_device::advance_envelope( int v )
void s_dsp_device::set_volume(int volume)
{
- m_channel->set_output_gain(0, volume / 100.0);
- m_channel->set_output_gain(1, volume / 100.0);
+ set_output_gain(0, volume / 100.0);
+ set_output_gain(1, volume / 100.0);
}
@@ -1064,17 +1064,17 @@ void s_dsp_device::state_register()
// sound_stream_update - handle a stream update
//-------------------------------------------------
-void s_dsp_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+void s_dsp_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
s16 mix[2];
- for (int i = 0; i < samples; i++)
+ for (int i = 0; i < outputs[0].samples(); i++)
{
mix[0] = mix[1] = 0;
dsp_update(mix);
/* Update the buffers */
- outputs[0][i] = (stream_sample_t)mix[0];
- outputs[1][i] = (stream_sample_t)mix[1];
+ outputs[0].put_int(i, (s32)mix[0], 32768);
+ outputs[1].put_int(i, (s32)mix[1], 32768);
}
}