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

[pygame] Re: problem with loading MP3 file in pygame



From: "Walter A. Aprile" <w.aprile@interaction-ivrea.it>
Hello,

I am using python 2.2 under Windows 2000 with pygame 1.5.5

The following code snippet

import pygame
import pygame.mixer

filename = r"C:\Python22\pygame-work\tango.mp3"

pygame.mixer.init(44100)
pygame.mixer.music.load(filename)
pygame.mixer.music.play()

fails with

Traceback (most recent call last):
File "C:/Python22/pygame-work/audiotest.py", line 7, in ?
pygame.mixer.music.load(filename)
error: Module format not recognized

but it works fine it the file is a .wav or MIDI file. The file I am trying this to is 44.1KHz at 160 Kb/s, nothing very
exciting.

I am rather confused, and would greatly appreciate any help.
walter, strange. can you try it on some different mp3s. i have seen SMPEG unable to decode the occasional mp3 file, and perhaps this is one of them?
PS, you'll need to subscribe to post the the pygame-users mailing list, but can reply to me direct if it's easier.



____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org