Sep-30-2022, 06:22 PM
Hi,
The following code plays only the beginning of a file:
Also, once that is fixed, how can I stop the file from playing?
TIA
The following code plays only the beginning of a file:
pygame.mixer.init() pygame.mixer.music.load('my_music.mp3') pygame.mixer.music.play() pygame.mixer.music.set_volume(0.5)If I add some delay say
time.sleep(10)
, the file is played for 10 seconds. Why is that?Also, once that is fixed, how can I stop the file from playing?
TIA