[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
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