aboutsummaryrefslogtreecommitdiffstats
path: root/src/filter/NormalizeFilterPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-03 21:00:50 +0200
committerMax Kellermann <max@duempel.org>2013-08-03 21:37:56 +0200
commitd1e7b4e38136f9342aad76c685a13adf0e69f869 (patch)
tree49643b937ddfe735511b566a71398da5a945d7aa /src/filter/NormalizeFilterPlugin.cxx
parent67f591a9ce60651da41afc499bd9a22e25314e35 (diff)
downloadmpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.gz
mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.xz
mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.zip
audio_format: convert to C++
Diffstat (limited to 'src/filter/NormalizeFilterPlugin.cxx')
-rw-r--r--src/filter/NormalizeFilterPlugin.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/filter/NormalizeFilterPlugin.cxx b/src/filter/NormalizeFilterPlugin.cxx
index f4e2963cc..31bcabd36 100644
--- a/src/filter/NormalizeFilterPlugin.cxx
+++ b/src/filter/NormalizeFilterPlugin.cxx
@@ -22,7 +22,7 @@
#include "FilterInternal.hxx"
#include "FilterRegistry.hxx"
#include "pcm/PcmBuffer.hxx"
-#include "audio_format.h"
+#include "AudioFormat.hxx"
#include "AudioCompress/compress.h"
#include <assert.h>
@@ -34,7 +34,7 @@ class NormalizeFilter final : public Filter {
PcmBuffer buffer;
public:
- virtual const audio_format *Open(audio_format &af, GError **error_r);
+ virtual AudioFormat Open(AudioFormat &af, GError **error_r) override;
virtual void Close();
virtual const void *FilterPCM(const void *src, size_t src_size,
size_t *dest_size_r, GError **error_r);
@@ -47,14 +47,14 @@ normalize_filter_init(gcc_unused const struct config_param *param,
return new NormalizeFilter();
}
-const struct audio_format *
-NormalizeFilter::Open(audio_format &audio_format, gcc_unused GError **error_r)
+AudioFormat
+NormalizeFilter::Open(AudioFormat &audio_format, gcc_unused GError **error_r)
{
- audio_format.format = SAMPLE_FORMAT_S16;
+ audio_format.format = SampleFormat::S16;
compressor = Compressor_new(0);
- return &audio_format;
+ return audio_format;
}
void