Sophie

Sophie

distrib > Mandriva > 2010.2 > x86_64 > by-pkgid > 6f60b1f505fea762d0c5d42a3080ad66 > files > 1

pyvorbis-1.5-0.a.3mdv2010.0.src.rpm

diff -Nru pyvorbis-1.3/test/ogg123.py pyvorbis-patch/test/ogg123.py
--- pyvorbis-1.3/test/ogg123.py	2002-10-06 18:04:59.000000000 -0500
+++ pyvorbis-patch/test/ogg123.py	2003-12-12 00:07:52.000000000 -0600
@@ -165,9 +165,10 @@
             sys.exit(0)
 
         elif arg == '-d' or arg == '--device':
+            import ao
             try:
-                driver_id = ao_get_driver_id(val)
-            except aoError:
+                driver_id = ao.driver_id(val)
+            except ao.aoError:
                 sys.stderr.write('No such device %s\n' % val)
                 sys.exit(1)
                 
@@ -199,7 +200,12 @@
         usage()
         sys.exit(0)
 
-    myplayer = choices[modchoice]() # Either AOPlayer or LADPlayer
+    if modchoice == 'ao' and driver_id:
+        playerargs = (driver_id,)
+    else:
+        playerargs = ()
+
+    myplayer = apply(choices[modchoice],playerargs) # Either AOPlayer or LADPlayer
     if verbose:
         print "Module choice: %s" % modchoice