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

Re: [pygame] Pygame Now Can't Play MP3s?



Yes.

Unfortunately no one can get smpeg compiling and working on windows
with the msvc71 C library that python2.4 requires.  Smpeg is what
sdl_mixer uses to play mp3s.  So unfortunately pygame can not play
mp3s on windows.

Smpeg can not handle lots of mp3 files anyway.  So even if someone did
get it to compile and run, a bunch of mp3s wouldn't work.

Your best bet is to use the ogg format(which is better anyway).

Sorry!



On 8/28/05, Kris Schnee <kschnee@xxxxxxxxxx> wrote:
> 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."
> 
>