[Python-Dev] Misc. warnings

Guido van Rossum guido@python.org
Tue, 07 Jan 2003 19:57:30 -0500


> Why would ossaudiodev be expected to work on Linux ?

It should work, except setup.py hasn't been fixed to build it.  Here's
a patch:

*** setup.py	4 Jan 2003 04:06:56 -0000	1.133
--- setup.py	8 Jan 2003 00:55:37 -0000
***************
*** 722,727 ****
--- 722,728 ----
          if platform == 'linux2':
              # Linux-specific modules
              exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
+             exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
  
          if platform == 'sunos5':
              # SunOS specific modules

However, then the test suite fails:

$ ./python ../Lib/test/regrtest.py test_ossaudiodev.py 
test_ossaudiodev
test test_ossaudiodev produced unexpected output:
**********************************************************************
*** lines 2-7 of actual output doesn't appear in expected output after line 1:
+ expected rate >= 0, not -1
+ expected sample size >= 0, not -2
+ nchannels must be 1 or 2, not 3
+ unknown audio encoding: 177
+ for linear unsigned 16-bit little-endian audio, expected sample size 16, not 8
+ for linear unsigned 8-bit audio, expected sample size 8, not 16
**********************************************************************
1 test failed:
    test_ossaudiodev
$

Also, I note that the compilation of ossaudiodev should really be
dependent on the existence of either <linux/soundcard.h> (Linux) or
<machine/soundcard.h> (BSD).

What's up with that, Greg?  I've seen tons of checkins to ossaudiodev
-- how close is it to completion?

--Guido van Rossum (home page: http://www.python.org/~guido/)