[xiph-cvs] cvs commit: vorbis-tools/ogg123 ogg123.c

Stan Seibert volsung at xiph.org
Wed Jul 25 12:51:35 PDT 2001



volsung     01/07/25 12:51:34

  Modified:    ogg123   Tag: volsung_20010721 ogg123.c
  Log:
  - Updated -h help text to include "-f" option and list all of the
  devices
    that are actually present, using ao_driver_info_list().
  - Corrected typo in error message.

Revision  Changes    Path
No                   revision

No                   revision

1.40.2.3  +16 -9     vorbis-tools/ogg123/ogg123.c

Index: ogg123.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.c,v
retrieving revision 1.40.2.2
retrieving revision 1.40.2.3
diff -u -r1.40.2.2 -r1.40.2.3
--- ogg123.c	2001/07/23 12:59:55	1.40.2.2
+++ ogg123.c	2001/07/25 19:51:34	1.40.2.3
@@ -14,7 +14,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: ogg123.c,v 1.40.2.2 2001/07/23 12:59:55 volsung Exp $
+ last mod: $Id: ogg123.c,v 1.40.2.3 2001/07/25 19:51:34 volsung Exp $
 
  ********************************************************************/
 
@@ -76,8 +76,9 @@
 
 void usage(void)
 {
-    FILE *o;
-    o = stderr;
+    FILE *o = stderr;
+    int i, driver_count;
+    ao_info **devices = ao_driver_info_list(&driver_count);
 
     fprintf(o,
             "Ogg123 from " PACKAGE " " VERSION "\n"
@@ -86,11 +87,17 @@
             "  -h, --help     this help\n"
             "  -V, --version  display Ogg123 version\n"
             "  -d, --device=d uses 'd' as an output device\n"
-	    "      Possible devices are (some may not be compiled):\n"
-	    "      null (output nothing), oss (for Linux and FreeBSD),\n"
-	    "      alsa (for Linux), sun (for NetBSD, OpenBSD, Solaris),\n"
-	    "      irix, arts (aRts sound daemon), esd (ESounD daemon),\n"
-	    "      raw (write to a file), wav (write to a .WAV file)\n"
+	    "      Possible devices are:\n"
+	    "        ");
+
+    for(i = 0; i < driver_count; i++)
+      fprintf(o,"%s ",devices[i]->short_name);
+
+    fprintf(o,"\n");
+
+    fprintf(o,
+	    "  -f, --file=filename  Set the output filename for a previously\n"
+	    "      specified file device (with -d).\n"
             "  -k n, --skip n  Skip the first 'n' seconds\n"
             "  -o, --device-option=k:v passes special option k with value\n"
             "      v to previously specified device (with -d).  See\n"
@@ -607,7 +614,7 @@
         fprintf(stderr, "Error: No device not available.\n");
         break;
       case AO_ENOTLIVE:
-	fprintf(stderr, "Error: %s requires an ouput filename to be specified with -f.\n", info->short_name);
+	fprintf(stderr, "Error: %s requires an output filename to be specified with -f.\n", info->short_name);
         break;
       case AO_EBADOPTION:
         fprintf(stderr, "Error: Unsupported option value to %s device.\n",

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list