output/Source: convert prepared_filter to reference
This commit is contained in:
parent
2e0949d8e6
commit
03cf6591c0
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user