Commit 9e330747 authored by Max Kellermann's avatar Max Kellermann

output/Thread: move software_mixer_set_filter() call to Open()

.. and remove the obsolete method OpenFilter().
parent d6d465cd
......@@ -435,13 +435,6 @@ private:
void CloseOutput(bool drain);
/**
* Throws std::runtime_error on error.
*
* Mutex must not be locked.
*/
AudioFormat OpenFilter(AudioFormat &format);
/**
* Mutex must not be locked.
*/
void CloseFilter();
......
......@@ -89,22 +89,6 @@ AudioOutput::Disable()
}
}
inline AudioFormat
AudioOutput::OpenFilter(AudioFormat &format)
{
assert(format.IsValid());
const auto result = source.Open(format, *request.pipe,
prepared_replay_gain_filter,
prepared_other_replay_gain_filter,
prepared_filter);
if (mixer != nullptr && mixer->IsPlugin(software_mixer_plugin))
software_mixer_set_filter(*mixer, volume_filter.Get());
return result;
}
void
AudioOutput::CloseFilter()
{
......@@ -136,6 +120,9 @@ AudioOutput::Open()
prepared_other_replay_gain_filter,
prepared_filter)
.WithMask(config_audio_format);
if (mixer != nullptr && mixer->IsPlugin(software_mixer_plugin))
software_mixer_set_filter(*mixer, volume_filter.Get());
} catch (const std::runtime_error &e) {
FormatError(e, "Failed to open filter for \"%s\" [%s]",
name, plugin.name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment