summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/disound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/disound.cpp')
-rw-r--r--src/emu/disound.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/emu/disound.cpp b/src/emu/disound.cpp
index 59d511e4e48..651cd1e2a46 100644
--- a/src/emu/disound.cpp
+++ b/src/emu/disound.cpp
@@ -162,6 +162,32 @@ sound_stream *device_sound_interface::output_to_stream_output(int outputnum, int
//-------------------------------------------------
+// input_gain - return the gain on the given
+// input index of the device
+//-------------------------------------------------
+
+float device_sound_interface::input_gain(int inputnum) const
+{
+ int stream_inputnum;
+ sound_stream *stream = input_to_stream_input(inputnum, stream_inputnum);
+ return (stream != nullptr) ? stream->input_gain(stream_inputnum) : 0.0f;
+}
+
+
+//-------------------------------------------------
+// output_gain - return the gain on the given
+// output index of the device
+//-------------------------------------------------
+
+float device_sound_interface::output_gain(int outputnum) const
+{
+ int stream_outputnum;
+ sound_stream *stream = output_to_stream_output(outputnum, stream_outputnum);
+ return (stream != nullptr) ? stream->output_gain(stream_outputnum) : 0.0f;
+}
+
+
+//-------------------------------------------------
// set_input_gain - set the gain on the given
// input index of the device
//-------------------------------------------------