[xiph-cvs] cvs commit: vorbis-tools/ogg123 cmdline_options.c
Stan Seibert
volsung at xiph.org
Wed Jul 10 19:44:39 PDT 2002
volsung 02/07/10 19:44:39
Modified: ogg123 cmdline_options.c
Log:
Added long option for controlling audio buffer.
Revision Changes Path
1.13 +9 -4 vorbis-tools/ogg123/cmdline_options.c
Index: cmdline_options.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/cmdline_options.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- cmdline_options.c 2002/07/06 19:12:17 1.12
+++ cmdline_options.c 2002/07/11 02:44:39 1.13
@@ -11,7 +11,7 @@
* *
********************************************************************
- last mod: $Id: cmdline_options.c,v 1.12 2002/07/06 19:12:17 volsung Exp $
+ last mod: $Id: cmdline_options.c,v 1.13 2002/07/11 02:44:39 volsung Exp $
********************************************************************/
@@ -46,6 +46,7 @@
{"ntimes", required_argument, 0, 'y'},
{"shuffle", no_argument, 0, 'z'},
{"list", required_argument, 0, '@'},
+ {"audio-buffer", required_argument, 0, 0},
{0, 0, 0, 0}
};
@@ -67,9 +68,13 @@
switch (ret) {
case 0:
- status_error(_("Internal error: long option given when none expected.\n"));
- exit(1);
-
+ if(!strcmp(long_options[option_index].name, "audio-buffer")) {
+ ogg123_opts->buffer_size = 1024 * atoi(optarg);
+ } else {
+ status_error(_("Internal error parsing command line options.\n"));
+ exit(1);
+ }
+ break;
case 'b':
ogg123_opts->input_buffer_size = atoi(optarg) * 1024;
if (ogg123_opts->input_buffer_size < MIN_INPUT_BUFFER_SIZE * 1024) {
<p><p><p>--- >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