mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
Revert "Add an overload to input_to_stream_input in disound.cpp, fixes the input_gain and set_input_gain functions being unusable on device_mixer_interface type. [Lord Nightmare]"
This reverts commit 03f3e1ff42
.
This commit is contained in:
parent
b983390356
commit
a1d3d2aa40
@ -394,32 +394,6 @@ device_mixer_interface::~device_mixer_interface()
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// input_to_stream_input - convert a device's
|
||||
// input index to a stream and the input index
|
||||
// on that stream
|
||||
//-------------------------------------------------
|
||||
|
||||
sound_stream *device_mixer_interface::input_to_stream_input(int inputnum, int &stream_inputnum) const
|
||||
{
|
||||
assert(inputnum >= 0);
|
||||
|
||||
// scan the list looking for streams owned by this device
|
||||
for (auto &stream : device().machine().sound().streams())
|
||||
if (&stream->device() == &device())
|
||||
{
|
||||
if (inputnum < m_auto_allocated_inputs)
|
||||
{
|
||||
stream_inputnum = inputnum;
|
||||
return stream.get();
|
||||
}
|
||||
inputnum -= m_auto_allocated_inputs;
|
||||
}
|
||||
|
||||
// not found
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// interface_pre_start - perform startup prior
|
||||
// to the device startup
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
// helpers
|
||||
int inputs() const;
|
||||
int outputs() const;
|
||||
virtual sound_stream *input_to_stream_input(int inputnum, int &stream_inputnum) const;
|
||||
sound_stream *input_to_stream_input(int inputnum, int &stream_inputnum) const;
|
||||
sound_stream *output_to_stream_output(int outputnum, int &stream_outputnum) const;
|
||||
float input_gain(int inputnum) const;
|
||||
float output_gain(int outputnum) const;
|
||||
@ -120,9 +120,6 @@ public:
|
||||
device_mixer_interface(const machine_config &mconfig, device_t &device, int outputs = 1);
|
||||
virtual ~device_mixer_interface();
|
||||
|
||||
// helpers
|
||||
virtual sound_stream *input_to_stream_input(int inputnum, int &stream_inputnum) const override;
|
||||
|
||||
protected:
|
||||
// optional operation overrides
|
||||
virtual void interface_pre_start() override;
|
||||
|
Loading…
Reference in New Issue
Block a user