[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] playing MP3s using pygame



On Tue, Apr 09, 2002 at 09:40:13AM -0400, Prahlad Vaidyanathan wrote:
> Someone on the python-tutor list mentioned that I could play MP3s using
> pygame. So, I built pygame with SDL_mixer, and did the following :

build it with smpeg support too.

> Hence I gather pygame does not support MP3s - am I right, or is there
> some black magic I can do to make it support them.

err.. it does. Except that mp3 is an mpeg layer and therefore supported
by smpeg. Try this:

import pygame,pygame.movie
m = pygame.movie.Movie("some file.mp3")
m.play()
print "yes it looks strange playing a movie when you just want sound :)"

Maybe some magic code for the mixer wouldn't hurt so that it
automatically forwards mp3 handling to smpeg if it's installed
and available. Might make it a little bit more intuitive.

-- 
Raiser, Frank aka CrashChaos
IRC: irc.openprojects.net #pygame
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org