[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] playing MP3s using pygame
Hi,
On Tue, 09 Apr 2002 Frank Raiser spewed into the ether:
> 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 :)"
Thanks ! This works right now. But, still pygame.mixer says "unsupported
format". I haven't fully explored what it is doing and why - I will
check that up and give more diagnostic info this evening.
Meanwhile, my player now (just about) supports MP3s :-)
pv.
--
Prahlad Vaidyanathan <http://www.symonds.net/~prahladv/>
Quick! Call Guiness book of world records! My Windows 98 hasn't crashed for
2 hours, 43 minutes and 9 seconds!!!
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org