summaryrefslogtreecommitdiff
path: root/src/output/Source.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-27 11:42:14 +0100
committerMax Kellermann <max@musicpd.org>2017-12-27 11:56:05 +0100
commitedef62df86416a63efb936d5a5fd40ad1a49d171 (patch)
treecd93db6cf9bea01d01bc8474cc40fff540138b92 /src/output/Source.hxx
parente2621d5e44be0da281edd7d6906a085360959fde (diff)
filter/Internal: return std::unique_ptr<Filter>
Diffstat (limited to 'src/output/Source.hxx')
-rw-r--r--src/output/Source.hxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/output/Source.hxx b/src/output/Source.hxx
index 2de8564e2..87fe1db65 100644
--- a/src/output/Source.hxx
+++ b/src/output/Source.hxx
@@ -30,6 +30,7 @@
#include "util/ConstBuffer.hxx"
#include <utility>
+#include <memory>
#include <assert.h>
#include <stdint.h>
@@ -76,14 +77,14 @@ class AudioOutputSource {
* The replay_gain_filter_plugin instance of this audio
* output.
*/
- Filter *replay_gain_filter_instance = nullptr;
+ std::unique_ptr<Filter> replay_gain_filter_instance;
/**
* The replay_gain_filter_plugin instance of this audio
* output, to be applied to the second chunk during
* cross-fading.
*/
- Filter *other_replay_gain_filter_instance = nullptr;
+ std::unique_ptr<Filter> other_replay_gain_filter_instance;
/**
* The buffer used to allocate the cross-fading result.
@@ -99,7 +100,7 @@ class AudioOutputSource {
* The filter object of this audio output. This is an
* instance of chain_filter_plugin.
*/
- Filter *filter_instance = nullptr;
+ std::unique_ptr<Filter> filter_instance;
/**
* The #MusicChunk currently being processed (see
@@ -119,6 +120,9 @@ class AudioOutputSource {
ConstBuffer<uint8_t> pending_data;
public:
+ AudioOutputSource() noexcept;
+ ~AudioOutputSource() noexcept;
+
void SetReplayGainMode(ReplayGainMode _mode) noexcept {
replay_gain_mode = _mode;
}