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

Andrew MacIntyre andymac@bullseye.apana.org.au
Mon, 2 Jun 2003 22:22:25 +1000 (EST)


On Thu, 29 May 2003, Greg Ward wrote:

> On 29 May 2003, Guido van Rossum said:
> > Did you check in the changes to ossaudiodev?
>
> Oops!  I did now -- thanks.  Please try again.

With a CVS tree updated about 0520 AEST this morning (1920 UTC Sunday),
on a FreeBSD 4.7 system test_ossaudiodev (with -v) outputs the following:
test_ossaudiodev
playing test sound file...
elapsed time: 2.9 sec
test test_ossaudiodev crashed -- exceptions.AttributeError: 'module'
object has
no attribute 'AFMT_S16_NE'
Traceback (most recent call last):
  File "Lib/test/regrtest.py", line 394, in runtest
    the_package = __import__(abstest, globals(), locals(), [])
  File
"/home/andymac/build/python-cvs/python-cvs/Lib/test/test_ossaudiodev.py",
 line 119, in ?
    test()
  File
"/home/andymac/build/python-cvs/python-cvs/Lib/test/test_ossaudiodev.py",
 line 117, in test
    test_setparameters()
  File
"/home/andymac/build/python-cvs/python-cvs/Lib/test/test_ossaudiodev.py",
 line 73, in test_setparameters
    config2 = (ossaudiodev.AFMT_S16_NE, 2, 44100)
AttributeError: 'module' object has no attribute 'AFMT_S16_NE'
1 test failed:
    test_ossaudiodev

The sound file plays correctly, but as I don't have amplified speakers on
this box I don't get enough volume for hear it properly.

AFMT_S16_NE is not defined in /usr/include/sys/soundcard.h (nor is it
defined for FreeBSD 4.8), but definitions exist for both AFMT_S16_BE and
AFMT_S16_LE.

My automatic cvs update hasn't caught up with your sandbox audiotest
utility yet.

--
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac@bullseye.apana.org.au  (pref) | Snail: PO Box 370
        andymac@pcug.org.au             (alt) |        Belconnen  ACT  2616
Web:    http://www.andymac.org/               |        Australia