From 943bafbbc896a85c247ec4ff23d2bd4cce348399 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 19 Nov 2009 21:00:39 +0100 Subject: test/software_volume: check for errors --- test/software_volume.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/software_volume.c b/test/software_volume.c index cc19f3ffb..3b4c5f0fb 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); } } -- cgit v1.2.3