'Mesdames et Messieurs, la cour de Devin Dazzle'

def testPlay(self):

    candidates = [os.path.dirname(__file__), os.path.dirname(sys.argv[0]), os.path.join(os.path.dirname(sys.argv[0]), '../../win32comext/directsound/test'), '.']
    for candidate in candidates:
        fname = os.path.join(candidate, '01-Intro.wav')
        if os.path.isfile(fname):
            break
    else:
        raise TestSkipped("Can't    find    test    .wav    file    to    play")
    f = open(fname, 'rb')
    hdr = f.read(WAV_HEADER_SIZE)
    (wfx, size) = wav_header_unpack(hdr)
    d = ds.DirectSoundCreate(None, None)
    d.SetCooperativeLevel(None, ds.DSSCL_PRIORITY)
    sdesc = ds.DSBUFFERDESC()
    sdesc.dwFlags = (ds.DSBCAPS_STICKYFOCUS | ds.DSBCAPS_CTRLPOSITIONNOTIFY)
    sdesc.dwBufferBytes = size
    sdesc.lpwfxFormat = wfx
    buffer = d.CreateSoundBuffer(sdesc, None)
    event = win32event.CreateEvent(None, 0, 0, None)
    notify = buffer.QueryInterface(ds.IID_IDirectSoundNotify)
    notify.SetNotificationPositions((ds.DSBPN_OFFSETSTOP, event))
    buffer.Update(0, f.read(size))
    buffer.Play(0)
    win32event.WaitForSingleObject(event, (-1))
