Python Forum
I can not play mp3 in pygame
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I can not play mp3 in pygame
#4
you need a main game loop to keep the script from reaching the end of the program.

add all this after your code in the first post
done = False
song_ended = pygame.USEREVENT + 1
while not done:
    for event in pygame.event.get():
        if event.type == song_ended:
            print('The song ended')
Recommended Tutorials:
Reply


Messages In This Thread
I can not play mp3 in pygame - by vinicius - Feb-07-2018, 01:21 AM
RE: I can not play mp3 in pygame - by Windspar - Feb-07-2018, 01:29 AM
RE: I can not play mp3 in pygame - by vinicius - Feb-09-2018, 02:28 AM
RE: I can not play mp3 in pygame - by metulburr - Feb-09-2018, 05:13 AM
RE: I can not play mp3 in pygame - by SeabassG33 - Feb-19-2018, 11:01 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020