aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-19 21:00:39 +0100
committerMax Kellermann <max@duempel.org>2009-11-19 21:00:39 +0100
commit943bafbbc896a85c247ec4ff23d2bd4cce348399 (patch)
treedf4e439bccbe5f12a22a96a164e4a6293ef30d97 /test
parentb772f262131c255c913d2bdca807af30c3b9b533 (diff)
test/software_volume: check for errors
Diffstat (limited to 'test')
-rw-r--r--test/software_volume.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/software_volume.c b/test/software_volume.c
index cc19f3ff..3b4c5f0f 100644
--- a/test/software_volume.c
+++ b/test/software_volume.c
@@ -58,7 +58,12 @@ int main(int argc, char **argv)
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);
+ if (!pcm_volume(buffer, nbytes, &audio_format,
+ PCM_VOLUME_1 / 2)) {
+ g_printerr("pcm_volume() has failed\n");
+ return 2;
+ }
+
write(1, buffer, nbytes);
}
}