[Python-Dev] Change to ossaudiodev setparameters() method (original) (raw)
Guido van Rossum guido@python.org
Mon, 26 May 2003 02:39:59 -0400
- Previous message: [Python-Dev] Change to ossaudiodev setparameters() method
- Next message: [Python-Dev] Change to ossaudiodev setparameters() method
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Currently, ossaudiodevice objects have a setparameters() method with a rather silly interface:
oss.setparameters(samplerate, samplesize, numchannels, format [, emulate]) This is silly because 1) 'samplesize' is implicit in 'format', and 2) the implementation doesn't actually use samplesize for anything -- it just checks that you have passed in the correct sample size, ie. if you specify an 8-bit format, you must pass samplesize=8. (This is code inherited from linuxaudiodev that I never got around to cleaning up.) In addition to being silly, this is not the documented interface. The docs don't mention the 'samplesize' argument at all. Presumably the doc writer realized the silliness and was going to pester me to remove 'samplesize', but never got around to it. (Lot of that going around.) So, even though we're in a beta cycle, am I allowed to change the code so it's 1) sensible and 2) consistent with the documentation?
Yes. I like silliness in a MP skit, but not in my APIs. :-)
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Change to ossaudiodev setparameters() method
- Next message: [Python-Dev] Change to ossaudiodev setparameters() method
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]