Winsound works for only one Python file

Answered

I have a project called "SmallProjects" or whatever. There are many python files there but for some reason winsound works for only one of them.... Others compile but there is no sound

import winsound

if True:
winsound.PlaySound("bounce.wav", winsound.SND_ASYNC)

this doesnt do anything at all

3 comments

Hi Stanislaw,

Have you tried to run them from the command line (outside of PyCharm) using the same interpreter? What's the result?

0

Sorry for replying so late, I was in school. I tried running it from the cmd but nothing changed...

0

Thanks for the update.

Having the same problem when running in command line proves that the problem is not related to PyCharm. You should search the web for the solution in such case.

Quick search has led me to https://stackoverflow.com/questions/38362652/cant-play-wav-file-with-winsound-module

0

Please sign in to leave a comment.