[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Pygame Now Can't Play MP3s?



I just installed the new versions of Python and Pygame (and PyOgre, which looks incredible but whose example doesn't work). As a test I loaded my music-playing demo from an older version, and it complained that it couldn't load that music file format -- MP3. It had worked before. (This is in WinXP.) It only worked when I converted it to an OGG. Does this mean Pygame has actually lost a feature in its new version?

Sample code:

import os, sys, pygame
print "Running music demo. Hit Enter to quit."

## Pick an MP3 or MIDI-format music file in this directory.
##MUSICFILE = "sa-tails.mp3"
MUSICFILE = "sa-tails.ogg"

pygame.mixer.init()

pygame.mixer.music.load(MUSICFILE)
pygame.mixer.music.play()

raw_input("> ") ## Wait for user to hit Enter.

## DONE
pygame.mixer.music.stop()
pygame.mixer.quit()
print "Done."