Tutorial by Examples

import pygame file = 'some.mp3' pygame.init() pygame.mixer.init() pygame.mixer.music.load(file) pygame.mixer.music.play(-1) # If the loops is -1 then the music will repeat indefinitely.
import pygame import time pygame.mixer.init() pygame.display.init() screen = pygame.display.set_mode ( ( 420 , 240 ) ) playlist = list() playlist.append ( "music3.mp3" ) playlist.append ( "music2.mp3" ) playlist.append ( "music1.mp3" ) pygame.mixer.musi...

Page 1 of 1