[Patches] [ python-Patches-644977 ] Allow device name in linuxaudiodev.open

noreply@sourceforge.net noreply@sourceforge.net
Sun, 01 Dec 2002 09:10:06 -0800


Patches item #644977, was opened at 2002-11-27 16:58
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=644977&group_id=5470

Category: Modules
Group: None
>Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Greg Ward (gward)
Assigned to: Greg Ward (gward)
Summary: Allow device name in linuxaudiodev.open

Initial Comment:
linuxaudiodev.open() does not allow the caller to specify the device file to open -- it hardcodes "/dev/dsp", which can be only overridden with the AUDIODEV environment variable.  Yuck.  This patch fixes that while preserving backwards compatibility.


----------------------------------------------------------------------

>Comment By: Greg Ward (gward)
Date: 2002-12-01 12:10

Message:
Logged In: YES 
user_id=14422

OK, I won't bother patching test_linuxaudiodev.py.  Closing this patch as "accepted" since the important part was checked in.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-11-27 17:40

Message:
Logged In: YES 
user_id=21627

I'm not sure every possible parameter combination must be
tested. I personally would find it annoying if the test
sound is played that often - it does not test that much.

More important would be to have documentation, any
documentation.

----------------------------------------------------------------------

Comment By: Greg Ward (gward)
Date: 2002-11-27 17:14

Message:
Logged In: YES 
user_id=14422

OK, I'm attaching a patch to Lib/test/test_linuxaudiodev.py to test the 'device' arg to open().  This refactors the code a bit and plays the test sound twice (so it will be heard *four* times total when running the complete test suite).

----------------------------------------------------------------------

Comment By: Greg Ward (gward)
Date: 2002-11-27 17:08

Message:
Logged In: YES 
user_id=14422

The only catch is testing; only idea I have is to play the test sound twice, once with open('w') (the current behaviour) and once with open('/dev/dsp','w').  

That sound OK?  (Err, pun not intended)


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-11-27 17:05

Message:
Logged In: YES 
user_id=21627

The patch is fine. Please apply it.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=644977&group_id=5470