Commit Graph

9 Commits

Author SHA1 Message Date
Guido van Rossum 4507ec70cf - The audio driver tests (test_ossaudiodev.py and
test_linuxaudiodev.py) are no longer run by default.  This is
  because they don't always work, depending on your hardware and
  software.  To run these tests, you must use an invocation like
    ./python Lib/test/regrtest.py -u audio test_ossaudiodev
2003-02-14 19:29:22 +00:00
Barry Warsaw 04f357cffe Get rid of relative imports in all unittests. Now anything that
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".

This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).

Now Tim and Jack can have at it. :)
2002-07-23 19:04:11 +00:00
Anthony Baxter 4ce6b351cc don't fail if the audio device is busy, just skip.
SF patch 545486
2002-04-23 02:20:46 +00:00
Guido van Rossum 923ebe4dc6 It seems our sound cards can't play mulaw data. Use native-format
16-bit signed data instead.  Hope this works for you; it works for me.
2000-10-08 00:20:20 +00:00
Jeremy Hylton e2b7c4dea3 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
2000-10-06 19:39:55 +00:00
Moshe Zadka 92a69138b3 Oooopsss.....tab and space mismatch corrected. 2000-08-04 15:25:58 +00:00
Moshe Zadka 040c17fe38 Raise TestSkipped, not ImportError.
Honesty's the best policy.
2000-08-04 13:26:03 +00:00
Moshe Zadka 323a5086ae In case the user isn't allowed to access /dev/dsp or /dev/dsp isn't there
at all (my computer doesn't have a Sound Blaster), this doesn't mean
there's a bug in linuxaudiodev. The only error the test suite skips
is currently ImportError -- so that's what we raise. If you see a problem
with this patch, say so and I'll retract. If you think raising an ImportError
sucks, you're right -- but I ain't gonna buy a SB and I sure ain't gonna
let the test-suite fail on my machine.
2000-08-04 12:59:40 +00:00
Fred Drake 1f2d4640b8 Added test for linnuxaudiodev module; directly adapted from sunaudiodev
test.  Someone with more Linux audio knowledge should at least take a
brief look at it.
2000-06-10 04:22:57 +00:00