pygame music, cant read mp3?

globalrev skanemupp at yahoo.se
Mon May 5 08:04:31 EDT 2008


On 5 Maj, 14:03, globalrev <skanem... at yahoo.se> wrote:
> On 5 Maj, 13:47, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
>
>
>
> > globalrev wrote:
> > >http://www.pygame.org/docs/ref/mixer.html
>
> > > import pygame
>
> > > #pygame.mixer.init(frequency=22050, size=-16, channels=2,
> > > buffer=3072)  //it complained abiout words=
> > > so i guess its only the nbrs should be there//
>
> > > pygame.mixer.init(22050, -16, 2, 3072)
> > > pygame.mixer.music.load("example1.mp3")
> > > pygame.mixer.music.play(loops=1, start=0.0)
>
> > > Traceback (most recent call last):
> > >   File "C:\Python25\myPrograms\pygameProgs\musicexp.py", line 5, in
> > > <module>
> > >     pygame.mixer.music.load("example1.mp3")
> > > error: Couldn't read from 'example1.mp3'
>
> > Give it the full path to the MP3. Be aware of backward slashes + the need to
> > escape them.
>
> > Diez
>
> escape them?
>
> import pygame
>
> #pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=3072)
> pygame.mixer.init(22050, -16, 2, 3072)
> pygame.mixer.music.load('C:/Python25/myPrograms/pygameProgs/
> example1.mp3')
> pygame.mixer.music.play(loops=1, start=0.0)
>
> Traceback (most recent call last):
>   File "C:\Python25\myPrograms\pygameProgs\musicexp.py", line 5, in
> <module>
>     pygame.mixer.music.load('C:/Python25/myPrograms/pygameProgs/
> example1.mp3')
> error: Couldn't read from 'C:/Python25/myPrograms/pygameProgs/
> example1.mp3'

tried filenames with \ also but same result.



More information about the Python-list mailing list