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

Re: [pygame] pygame hangs with some mp3 files and hangs the hole prozess



Hi,

k sorry i copied wrong line for load, it was
pygame.mixer.music.load('test.mp3') but the result are the what i
said: 1 time sound is gone second time (any other file) and it hangs.

I tryed it with some other files and there the code works, but with
some mp3s that happens.
I can live with it when pygame dont play all mp3s but it should not
hang the prozess.

On 11/1/07, Ian Mallett <geometrian@xxxxxxxxx> wrote:
> On 10/31/07, Stefan Huchler <s.huchler@xxxxxxxxx> wrote:
>
> > >>> import pygame
> > >>> pygame.mixer.init()
> > >>> pygame.mixer.load('test.mp3')
> > >>> pygame.mixer.music.play()
> > >>> pygame.mixer.music.play()
> >
>  pygame.mixer.load() is not a function.  You want:  "Sound =
> pygame.mixer.Sound(filename)"
> You can't load .mp3 files with pygame.mixer.  Only .ogg or .wav, or you can
> use pygame.mixer.music.
> Try this:
>
>  import pygame
> from pygame.locals import *
> pygame.init()
> TestSound = pygame.mixer.Sound("test.mp3")
> TestSound.play()
>
> Ian
>
>