[Python-checkins] CVS: python/dist/src/Lib/test/output test_linuxaudiodev,1.1,1.2

Jeremy Hylton python-dev@python.org
Fri, 6 Oct 2000 12:39:58 -0700


Update of /cvsroot/python/python/dist/src/Lib/test/output
In directory slayer.i.sourceforge.net:/tmp/cvs-serv2679/Lib/test/output

Modified Files:
	test_linuxaudiodev 
Log Message:
test_linuxaudio:
    read the header from the .au file and do a sanity check
    pass only the data to the audio device
    call flush() so that program does not exit until playback is complete
    call all the other methods to verify that they work minimally
    call setparameters with a bunch of bugs arguments

linuxaudiodev.c:
    use explicit O_WRONLY and O_RDONLY instead of 1 and 0
    add a string name to each of the entries in audio_types[]
    add AFMT_A_LAW to the list of known formats
    add x_mode attribute to lad object, stores imode from open call
    test ioctl return value as == -1, not < 0
    in read() method, resize string before return
    add getptr() method, that calls does ioctl on GETIPTR or GETOPTR
        depending on x_mode
    in setparameters() method, do better error checking and raise
        ValueErrors; also use ioctl calls recommended by Open Sound
        System Programmer's Guido (www.opensound.com)
    use PyModule_AddXXX to define names in module
    


Index: test_linuxaudiodev
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_linuxaudiodev,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** test_linuxaudiodev	2000/06/10 04:22:57	1.1
--- test_linuxaudiodev	2000/10/06 19:39:55	1.2
***************
*** 1 ****
--- 1,7 ----
  test_linuxaudiodev
+ expected rate >= 0, not -1
+ expected sample size >= 0, not -2
+ nchannels must be 1 or 2, not 3
+ unknown audio encoding: 177
+ sample size 16 expected for Little-endian 16-bit unsigned format: 8 received
+ sample size 8 expected for Logarithmic mu-law audio: 16 received