goal
To play a wav file from the location D:1.wav, when the application is started up by the user
research
Saw the following questions:
How would I go about playing an alarm sound in python?
what I tried
I tried the following lines:
Example 1
import winsound winsound.PlaySound('D:\1.wav',winsound.SND_FILENAME) ##Did not work Example 2
import winsound winsound.PlaySound('1.wav',winsound.SND_FILENAME) ##DID not work Both the times I got the default sound but not the sound that should have played as per the audio file
also
- When I write
winsound.PlaySound('1.wav',winsound.SND_FILENAME)where does python check for the file1.wav? In which directory? - Why is the flag
winsound.SND_FILENAMEused for?
specs Python 2.7 TKinter 8.5 Windows XP SP
Please help me with this issue.