KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm building an Radio Automation Program, but I can't figure out how to have a timer countdown the number of seconds left in the song. I'm currently using Pygame and don't really want to load another toolkit just for this. So far I can make a timer count up using this: import pygame #setup music track = "Music/Track02.wav" pygame.mixer.music.load(track) pygame.mixer.music.play() print("Playing Music") while(pygame.mixer.music.get_busy()): print "\r"+str(pygame.mixer.music.get_pos()), But I have no idea how to get the total length of the song and countdown without having played the song already.
Tags (comma-separated)
Save Edits
Cancel