diff options
Diffstat (limited to 'src/emu/disound.cpp')
-rw-r--r-- | src/emu/disound.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/emu/disound.cpp b/src/emu/disound.cpp index f3ab6b236f7..a8a0a55ad38 100644 --- a/src/emu/disound.cpp +++ b/src/emu/disound.cpp @@ -85,8 +85,8 @@ int device_sound_interface::inputs() const { // scan the list counting streams we own and summing their inputs int inputs = 0; - for (auto &stream : m_device.machine().sound().streams()) - if (&stream->device() == &m_device) + for (auto &stream : device().machine().sound().streams()) + if (&stream->device() == &device()) inputs += stream->input_count(); return inputs; } @@ -101,8 +101,8 @@ int device_sound_interface::outputs() const { // scan the list counting streams we own and summing their outputs int outputs = 0; - for (auto &stream : m_device.machine().sound().streams()) - if (&stream->device() == &m_device) + for (auto &stream : device().machine().sound().streams()) + if (&stream->device() == &device()) outputs += stream->output_count(); return outputs; } @@ -119,8 +119,8 @@ sound_stream *device_sound_interface::input_to_stream_input(int inputnum, int &s assert(inputnum >= 0); // scan the list looking for streams owned by this device - for (auto &stream : m_device.machine().sound().streams()) - if (&stream->device() == &m_device) + for (auto &stream : device().machine().sound().streams()) + if (&stream->device() == &device()) { if (inputnum < stream->input_count()) { @@ -146,7 +146,7 @@ sound_stream *device_sound_interface::output_to_stream_output(int outputnum, int assert(outputnum >= 0); // scan the list looking for streams owned by this device - for (auto &stream : m_device.machine().sound().streams()) + for (auto &stream : device().machine().sound().streams()) if (&stream->device() == &device()) { if (outputnum < stream->output_count()) @@ -212,7 +212,7 @@ void device_sound_interface::set_output_gain(int outputnum, float gain) // handle ALL_OUTPUTS as a special case if (outputnum == ALL_OUTPUTS) { - for (auto &stream : m_device.machine().sound().streams()) + for (auto &stream : device().machine().sound().streams()) if (&stream->device() == &device()) for (int num = 0; num < stream->output_count(); num++) stream->set_output_gain(num, gain); @@ -237,7 +237,7 @@ void device_sound_interface::set_output_gain(int outputnum, float gain) int device_sound_interface::inputnum_from_device(device_t &source_device, int outputnum) const { int overall = 0; - for (auto &stream : m_device.machine().sound().streams()) + for (auto &stream : device().machine().sound().streams()) if (&stream->device() == &device()) for (int inputnum = 0; inputnum < stream->input_count(); inputnum++, overall++) if (stream->input_source_device(inputnum) == &source_device && stream->input_source_outputnum(inputnum) == outputnum) @@ -278,7 +278,7 @@ void device_sound_interface::interface_validity_check(validity_checker &valid) c void device_sound_interface::interface_pre_start() { // scan all the sound devices - sound_interface_iterator iter(m_device.machine().root_device()); + sound_interface_iterator iter(device().machine().root_device()); for (device_sound_interface const &sound : iter) { // scan each route on the device @@ -286,7 +286,7 @@ void device_sound_interface::interface_pre_start() { // see if we are the target of this route; if we are, make sure the source device is started device_t *const target_device = route.m_base.get().subdevice(route.m_target.c_str()); - if ((target_device == &m_device) && !sound.device().started()) + if ((target_device == &device()) && !sound.device().started()) throw device_missing_dependencies(); } } @@ -300,7 +300,7 @@ void device_sound_interface::interface_pre_start() { // see if we are the target of this route device_t *const target_device = route.m_base.get().subdevice(route.m_target.c_str()); - if ((target_device == &m_device) && (route.m_input == AUTO_ALLOC_INPUT)) + if ((target_device == &device()) && (route.m_input == AUTO_ALLOC_INPUT)) { route.m_input = m_auto_allocated_inputs; m_auto_allocated_inputs += (route.m_output == ALL_OUTPUTS) ? sound.outputs() : 1; @@ -318,14 +318,14 @@ void device_sound_interface::interface_pre_start() void device_sound_interface::interface_post_start() { // iterate over all the sound devices - for (device_sound_interface &sound : sound_interface_iterator(m_device.machine().root_device())) + for (device_sound_interface &sound : sound_interface_iterator(device().machine().root_device())) { // scan each route on the device for (sound_route const &route : sound.routes()) { // if we are the target of this route, hook it up device_t *const target_device = route.m_base.get().subdevice(route.m_target.c_str()); - if (target_device == &m_device) + if (target_device == &device()) { // iterate over all outputs, matching any that apply int inputnum = route.m_input; @@ -343,7 +343,7 @@ void device_sound_interface::interface_post_start() int streaminputnum; sound_stream *const inputstream = input_to_stream_input(inputnum++, streaminputnum); if (!inputstream) - fatalerror("Sound device '%s' targeted output #%d to nonexistent device '%s' input %d\n", sound.device().tag(), outputnum, m_device.tag(), inputnum - 1); + fatalerror("Sound device '%s' targeted output #%d to nonexistent device '%s' input %d\n", sound.device().tag(), outputnum, device().tag(), inputnum - 1); // set the input inputstream->set_input(streaminputnum, outputstream, streamoutputnum, route.m_gain); @@ -362,7 +362,7 @@ void device_sound_interface::interface_post_start() void device_sound_interface::interface_pre_reset() { // update all streams on this device prior to reset - for (auto &stream : m_device.machine().sound().streams()) + for (auto &stream : device().machine().sound().streams()) if (&stream->device() == &device()) stream->update(); } @@ -415,7 +415,7 @@ void device_mixer_interface::interface_pre_start() m_outputmap.resize(m_auto_allocated_inputs); // iterate through all routes that point to us and note their mixer output - for (device_sound_interface const &sound : sound_interface_iterator(m_device.machine().root_device())) + for (device_sound_interface const &sound : sound_interface_iterator(device().machine().root_device())) { for (sound_route const &route : sound.routes()) { |