[xiph-cvs] cvs commit: ao/src ao_private.h audio_out.c

Stan Seibert volsung at xiph.org
Sun Aug 12 22:24:05 PDT 2001



volsung     01/08/12 22:24:05

  Modified:    src      ao_private.h audio_out.c
  Log:
  Default driver is now identified when ao_default_driver_id() is called
  rather than ao_initialize().  This has the benefit of avoiding autodetection
  unless is it necessary.

Revision  Changes    Path
1.3       +0 -1      ao/src/ao_private.h

Index: ao_private.h
===================================================================
RCS file: /usr/local/cvsroot/ao/src/ao_private.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ao_private.h	2001/08/04 02:56:14	1.2
+++ ao_private.h	2001/08/13 05:24:04	1.3
@@ -58,7 +58,6 @@
 
 typedef struct ao_config {
         char *default_driver;
-	int default_driver_id;
 } ao_config;
 
 /* --- Functions --- */

1.17      +3 -7      ao/src/audio_out.c

Index: audio_out.c
===================================================================
RCS file: /usr/local/cvsroot/ao/src/audio_out.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- audio_out.c	2001/08/04 02:56:14	1.16
+++ audio_out.c	2001/08/13 05:24:04	1.17
@@ -71,7 +71,6 @@
 driver_list *driver_head = NULL;
 ao_config config = {
         NULL, /* default_driver */
-	-1,   /* default_driver_id */
 };
 
 ao_info **info_table = NULL;
@@ -85,7 +84,6 @@
 {
         free(config.default_driver);
         config.default_driver = NULL;
-	config.default_driver_id = -1;
 }
 
 
@@ -506,10 +504,6 @@
                 _append_dynamic_drivers(end);
         }
 
-	/* Find the default driver in the list of loaded drivers */
-	config.default_driver_id = 
-	  _find_default_driver_id(config.default_driver);
-
         /* Create the table of driver info structs */
         info_table = _make_info_table(driver_head, &driver_count);
 }
@@ -680,7 +674,9 @@
 
 int ao_default_driver_id ()
 {
-	return config.default_driver_id;
+	/* Find the default driver in the list of loaded drivers */
+  
+	return _find_default_driver_id(config.default_driver);
 }
 
 

--- >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