diff options
author | 2018-11-04 16:01:42 +0100 | |
---|---|---|
committer | 2018-11-04 16:01:42 +0100 | |
commit | ecf0c22f7d3a33b5d489890f02eb2af92e1213bd (patch) | |
tree | c3f2b5852efc6913963e442dc3107737605f4cf1 /src/emu/disound.cpp | |
parent | 6fc8a93932fb73581cb3817ba824febd57c002b7 (diff) |
disound: added getters for input/output gain (nw)
Diffstat (limited to 'src/emu/disound.cpp')
-rw-r--r-- | src/emu/disound.cpp | 26 |
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 //------------------------------------------------- |