From 1058def8e7827e56ce4a70afb4aeacb5dc44148f Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Fri, 3 May 2013 21:08:42 +0400 Subject: Imported Upstream version 4.2-build2006 --- cmd/osstest/help.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 cmd/osstest/help.c (limited to 'cmd/osstest/help.c') diff --git a/cmd/osstest/help.c b/cmd/osstest/help.c new file mode 100644 index 0000000..4d29f76 --- /dev/null +++ b/cmd/osstest/help.c @@ -0,0 +1,55 @@ +/* + * + * This file is part of Open Sound System. + * + * Copyright (C) 4Front Technologies 1996-2008. + * + * This this source file is released under GPL v2 license (no other versions). + * See the COPYING file included in the main directory of this source + * distribution for the license terms and conditions. + * + */ + +#include +#include + +void +describe_error (int err) +{ + switch (err) + { + case ENODEV: + fprintf (stderr, "The device file was found in /dev but\n" + "OSS is not loaded. You need to load it by executing\n" + "the soundon command.\n"); + break; + + case ENXIO: + fprintf (stderr, "There are no sound devices available.\n" + "The most likely reason is that the device you have\n" + "is malfunctioning or it's not supported by OSS.\n" + "It's also possible that you are trying to use the wrong " + "device file.\n" + "Please fill the problem report at\n" + "http://www.opensound.com/support.cgi\n"); + break; + + case ENOSPC: + fprintf (stderr, "Your system cannot allocate memory for the device\n" + "buffers. Reboot your machine and try again.\n"); + break; + + case ENOENT: + fprintf (stderr, "The device file is missing from /dev.\n" + "Perhaps you have not installed and started Open Sound System yet\n"); + break; + + + case EBUSY: + fprintf (stderr, "The device is busy. There is some other application\n" + "using it.\n"); + + break; + default:; + } +} -- cgit v1.2.3