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

noreply@sourceforge.net noreply@sourceforge.net
Wed, 27 Nov 2002 14:40:43 -0800


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

Category: Modules
Group: None
Status: Open
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: Martin v. Löwis (loewis)
Date: 2002-11-27 23: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 23: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 23: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 23: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