aboutsummaryrefslogtreecommitdiffstats
path: root/test/software_volume.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/software_volume.cxx')
-rw-r--r--test/software_volume.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/software_volume.cxx b/test/software_volume.cxx
index d3b47d74a..19a0be88c 100644
--- a/test/software_volume.cxx
+++ b/test/software_volume.cxx
@@ -27,6 +27,7 @@
#include "pcm/PcmVolume.hxx"
#include "AudioParser.hxx"
#include "AudioFormat.hxx"
+#include "util/Error.hxx"
#include "stdbin.h"
#include <glib.h>
@@ -36,8 +37,6 @@
int main(int argc, char **argv)
{
- GError *error = NULL;
- bool ret;
static char buffer[4096];
ssize_t nbytes;
@@ -46,13 +45,12 @@ int main(int argc, char **argv)
return 1;
}
+ Error error;
AudioFormat audio_format(48000, SampleFormat::S16, 2);
if (argc > 1) {
- ret = audio_format_parse(audio_format, argv[1],
- false, &error);
- if (!ret) {
+ if (!audio_format_parse(audio_format, argv[1], false, error)) {
g_printerr("Failed to parse audio format: %s\n",
- error->message);
+ error.GetMessage());
return 1;
}
}