def METHOD_NAME(self, dsp):
    # Two configurations for testing:
    #   config1 (8-bit, mono, 8 kHz) should work on even the most
    #      ancient and crufty sound card, but maybe not on special-
    #      purpose high-end hardware
    #   config2 (16-bit, stereo, 44.1kHz) should work on all but the
    #      most ancient and crufty hardware
    config1 = (ossaudiodev.AFMT_U8, 1, 8000)
    config2 = (AFMT_S16_NE, 2, 44100)
    for config in [config1, config2]:
        (fmt, channels, rate) = config
        if (dsp.setfmt(fmt) == fmt and
            dsp.channels(channels) == channels and
            dsp.speed(rate) == rate):
            break
    else:
        raise RuntimeError("unable to set audio sampling parameters: "
                           "you must have really weird audio hardware")
    # setparameters() should be able to set this configuration in
    # either strict or non-strict mode.
    result = dsp.setparameters(fmt, channels, rate, False)
    self.assertEqual(result, (fmt, channels, rate),
                     "setparameters%r: returned %r" % (config, result))
    result = dsp.setparameters(fmt, channels, rate, True)
    self.assertEqual(result, (fmt, channels, rate),
                     "setparameters%r: returned %r" % (config, result))