aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_normalize.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 /test/run_normalize.cxx
parent67f591a9ce60651da41afc499bd9a22e25314e35 (diff)
downloadmpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.gz
mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.xz
mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.zip
audio_format: convert to C++
Diffstat (limited to '')
-rw-r--r--test/run_normalize.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/run_normalize.cxx b/test/run_normalize.cxx
index 070dbaf5a..72e23054f 100644
--- a/test/run_normalize.cxx
+++ b/test/run_normalize.cxx
@@ -26,7 +26,7 @@
#include "config.h"
#include "AudioCompress/compress.h"
#include "AudioParser.hxx"
-#include "audio_format.h"
+#include "AudioFormat.hxx"
#include "stdbin.h"
#include <glib.h>
@@ -38,7 +38,6 @@
int main(int argc, char **argv)
{
GError *error = NULL;
- struct audio_format audio_format;
bool ret;
struct Compressor *compressor;
static char buffer[4096];
@@ -49,16 +48,16 @@ int main(int argc, char **argv)
return 1;
}
+ AudioFormat audio_format(48000, SampleFormat::S16, 2);
if (argc > 1) {
- ret = audio_format_parse(&audio_format, argv[1],
+ ret = audio_format_parse(audio_format, argv[1],
false, &error);
if (!ret) {
g_printerr("Failed to parse audio format: %s\n",
error->message);
return 1;
}
- } else
- audio_format_init(&audio_format, 48000, SAMPLE_FORMAT_S16, 2);
+ }
compressor = Compressor_new(0);