[Python-Dev] Change to ossaudiodev setparameters() method (original) (raw)

Greg Ward gward@python.net
Sun, 25 May 2003 22:16:35 -0400


Currently, oss_audio_device objects have a setparameters() method with a rather silly interface:

oss.setparameters(sample_rate, sample_size, num_channels, format [, emulate])

This is silly because 1) 'sample_size' is implicit in 'format', and 2) the implementation doesn't actually use sample_size 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 sample_size=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 'sample_size' argument at all. Presumably the doc writer realized the silliness and was going to pester me to remove 'sample_size', 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?

    Greg

-- Greg Ward <gward@python.net> http://www.gerg.ca/ Sure, I'm paranoid... but am I paranoid ENOUGH?