aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-19 20:36:04 +0100
committerMax Kellermann <max@duempel.org>2009-11-19 20:36:04 +0100
commitb772f262131c255c913d2bdca807af30c3b9b533 (patch)
treeb2fe5983ed190dc8d106637fafb984e832071e01 /test
parentc33bbd947b6afbb9438dc485c890394be096d0d1 (diff)
downloadmpd-b772f262131c255c913d2bdca807af30c3b9b533.tar.gz
mpd-b772f262131c255c913d2bdca807af30c3b9b533.tar.xz
mpd-b772f262131c255c913d2bdca807af30c3b9b533.zip
test/software_volume: fixed audio_format parser
Assign default value only if none was given on the command line.
Diffstat (limited to '')
-rw-r--r--test/software_volume.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/software_volume.c b/test/software_volume.c
index a1cc1317a..cc19f3ffb 100644
--- a/test/software_volume.c
+++ b/test/software_volume.c
@@ -42,7 +42,7 @@ int main(int argc, char **argv)
ssize_t nbytes;
if (argc > 2) {
- g_printerr("Usage: software_voluem [FORMAT] <IN >OUT\n");
+ g_printerr("Usage: software_volume [FORMAT] <IN >OUT\n");
return 1;
}
@@ -54,8 +54,8 @@ int main(int argc, char **argv)
error->message);
return 1;
}
- }
- audio_format_init(&audio_format, 48000, 16, 2);
+ } else
+ audio_format_init(&audio_format, 48000, 16, 2);
while ((nbytes = read(0, buffer, sizeof(buffer))) > 0) {
pcm_volume(buffer, nbytes, &audio_format, PCM_VOLUME_1 / 2);