summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-27 11:21:43 +0100
committerMax Kellermann <max@musicpd.org>2017-12-27 11:21:43 +0100
commit03cf6591c0d688dc3303ae73ee088a82fb216882 (patch)
tree5a73e9dcd274635a99c34149ae0dab8f62442da8
parent2e0949d8e674b1e62391ae7a7febe9a644a55f24 (diff)
output/Source: convert prepared_filter to reference
-rw-r--r--src/output/Source.cxx6
-rw-r--r--src/output/Source.hxx4
-rw-r--r--src/output/Thread.cxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/output/Source.cxx b/src/output/Source.cxx
index 15c63b1da..72b602c1e 100644
--- a/src/output/Source.cxx
+++ b/src/output/Source.cxx
@@ -33,7 +33,7 @@ AudioFormat
AudioOutputSource::Open(const AudioFormat audio_format, const MusicPipe &_pipe,
PreparedFilter *prepared_replay_gain_filter,
PreparedFilter *prepared_other_replay_gain_filter,
- PreparedFilter *prepared_filter)
+ PreparedFilter &prepared_filter)
{
assert(audio_format.IsValid());
@@ -90,7 +90,7 @@ void
AudioOutputSource::OpenFilter(AudioFormat audio_format,
PreparedFilter *prepared_replay_gain_filter,
PreparedFilter *prepared_other_replay_gain_filter,
- PreparedFilter *prepared_filter)
+ PreparedFilter &prepared_filter)
try {
assert(audio_format.IsValid());
@@ -107,7 +107,7 @@ try {
prepared_other_replay_gain_filter->Open(audio_format);
}
- filter_instance = prepared_filter->Open(audio_format);
+ filter_instance = prepared_filter.Open(audio_format);
} catch (...) {
CloseFilter();
throw;
diff --git a/src/output/Source.hxx b/src/output/Source.hxx
index 0e962b779..2de8564e2 100644
--- a/src/output/Source.hxx
+++ b/src/output/Source.hxx
@@ -136,7 +136,7 @@ public:
AudioFormat Open(AudioFormat audio_format, const MusicPipe &_pipe,
PreparedFilter *prepared_replay_gain_filter,
PreparedFilter *prepared_other_replay_gain_filter,
- PreparedFilter *prepared_filter);
+ PreparedFilter &prepared_filter);
void Close() noexcept;
void Cancel() noexcept;
@@ -195,7 +195,7 @@ private:
void OpenFilter(AudioFormat audio_format,
PreparedFilter *prepared_replay_gain_filter,
PreparedFilter *prepared_other_replay_gain_filter,
- PreparedFilter *prepared_filter);
+ PreparedFilter &prepared_filter);
void CloseFilter() noexcept;
diff --git a/src/output/Thread.cxx b/src/output/Thread.cxx
index f06a7430a..fe2e42512 100644
--- a/src/output/Thread.cxx
+++ b/src/output/Thread.cxx
@@ -148,7 +148,7 @@ AudioOutputControl::InternalOpen(const AudioFormat in_audio_format,
f = source.Open(in_audio_format, pipe,
output->prepared_replay_gain_filter,
output->prepared_other_replay_gain_filter,
- output->prepared_filter);
+ *output->prepared_filter);
} catch (...) {
std::throw_with_nested(FormatRuntimeError("Failed to open filter for %s",
GetLogName()));