but none of them work. I know this probably has a really simple answer, but I would really appreciate some help. Thanks!

asked Jul 18, 2015 at 23:13
181 1 1 gold badge 2 2 silver badges 9 9 bronze badges

The winsound.Beep() function simply calls the Windows API Beep() function which doesn’t provide a way to do it multiple times simultaneously. I tried playing more than one .wav sound file at the same time using winsound.SND_ASYNC , but was unable to get more than one going at once either.

Commented Jul 19, 2015 at 3:39

2 Answers 2

import winsound from multiprocessing import Process def func1(): winsound.PlaySound("C:\samplepath\soundfile1.wav", winsound.SND_FILENAME|winsound.SND_NOWAIT) def func2(): winsound.PlaySound("C:\samplepath\soundfile2.wav", winsound.SND_FILENAME|winsound.SND_NOWAIT) if __name__=='__main__': p1 = Process(target = func1) p1.start() p2 = Process(target = func2) p2.start() 

This should allow you to play sounds simultaneously (although I have not tested it with beeps).

answered Feb 8, 2021 at 23:27
David Dancey David Dancey
76 7 7 bronze badges

This will not work with the winsound.Beep sound, only the first one can be heard. Off-topic: indenting Python code 5 spaces is fairly unusual. I suggest you read (and start following) the PEP 8 – Style Guide for Python Code. Also, the file paths shown are invalid because they contain backslashes which have not been escaped properly.