[Python-Dev] Test results of linuxaudiodev.c

Greg Ward gward@mems-exchange.org
Mon, 3 Jul 2000 13:07:48 -0400


[Ping]
> Okay, i just discovered sunau.py.  Here's my real shot at
> test_linuxaudiodev.py.  Can you give this a try?

Didn't work -- even after I changed has_key(formats, ...) to
formats.has_key(...).  Here's what I get:

  Traceback (most recent call last):
    File "test_linuxaudiodev-ping.py", line 37, in ?
      test()
    File "test_linuxaudiodev-ping.py", line 35, in test
      play_au_file(findfile('audiotest.au'))
    File "test_linuxaudiodev-ping.py", line 26, in play_au_file
      raise "audio format not supported by linuxaudiodev"
  audio format not supported by linuxaudiodev

Sheesh, you'd think that plain old "Sun/NeXT audio data: 8-bit ISDN
u-law, mono, 8000 Hz" (this is what "file" reports on "audiotest.au")
would be supported.  ;-)

So I tried Michael Hudson's version.  It also failed, but in a more
interesting way.  There mere traceback is not enough, but it's a start:

  Traceback (most recent call last):
    File "test_linuxaudiodev-hudson.py", line 62, in ?
      test()
    File "test_linuxaudiodev-hudson.py", line 60, in test
      play_au_file(findfile('audiotest.au'))
    File "test_linuxaudiodev-hudson.py", line 55, in play_au_file
      dsp.write(data)
  linuxaudiodev.error: (11, 'Resource temporarily unavailable')

Here's the sequence of events I get:

  * run Michael's version of test_linuxaudiodev.py
  * it *immediately* dumps the above traceback, but does not return
    me to my shell prompt
  * Cardinal Fang *does* start his famous proclamation, and it
    sounds right (same as I get from "play audiotest.au")
  * but it's truncated about 3/4 of the way through: "Nobody expects
    the Spani----"
  * and then Python terminates with exit status 1 (presumably due to
    the traceback)

Very curious!  I know next-to-nothing about both Python's exception
handling, sound drivers on Linux, and PC audio hardware.  Any
speculation I might offer would probably be useless, so I will merely
comment that this is indeed curious.

        Greg
-- 
Greg Ward - software developer                gward@mems-exchange.org
MEMS Exchange / CNRI                           voice: +1-703-262-5376
Reston, Virginia, USA                            fax: +1-703-262-5367