This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Allow device name in linuxaudiodev.open
Type: Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gward Nosy List: gward, loewis
Priority: normal Keywords: patch

Created on 2002-11-27 21:58 by gward, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
lad-open-1.patch gward, 2002-11-27 21:58
test-lad-open-1.patch gward, 2002-11-27 22:14
Messages (6)
msg41816 - (view) Author: Greg Ward (gward) (Python committer) Date: 2002-11-27 21:58
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.
msg41817 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-11-27 22:05
Logged In: YES 
user_id=21627

The patch is fine. Please apply it.
msg41818 - (view) Author: Greg Ward (gward) (Python committer) Date: 2002-11-27 22:08
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)
msg41819 - (view) Author: Greg Ward (gward) (Python committer) Date: 2002-11-27 22:14
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).
msg41820 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-11-27 22:40
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.
msg41821 - (view) Author: Greg Ward (gward) (Python committer) Date: 2002-12-01 17:10
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.
History
Date User Action Args
2022-04-10 16:05:57adminsetgithub: 37546
2002-11-27 21:58:28gwardcreate