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

Re: [pygame] pygame.mixer failure on Mac OS X



On Jul 30, 2004, at 2:39 PM, Bob the Hamster wrote:

Hey, y'all. Anybody else using PyGame on Mac OS X? I installed it using
the pre-built packages from http://undefined.org/python/pimp/ and it was
working perfectly until I started to plaay around with pygame.mixer

I added .ogg music and sound effects to my game, and they worked fine on
both my GNU/Linux boxes, and on both Windows98 and WindowsXP boxes I
tested with, but on my Mac OS X box, it hangs on
pygame.mixer.Sound(filename) and the processor usage spikes. I have to
force-quit the python interpreter.

I strongly suspect that this is because the ogg vorbis libraries are
completely missing in the Mac OS X prebuilt packages. The description
for the "sdl_pygame_deps 1.2.6" package says: "SDL, SDL_image,
SDL_mixer, SDL_ttf, smpeg for pygame" but it says nothing about ogg
vorbis.

So my questions:

(1) Does anybody know how to get this fixed? Or worked-around?
Compile it yourself. I thought it had ogg support, but I don't really have time to build another right now.

(2) Does anybody know how to detect that the program is running on Mac
OS X so I can disable sound support until I figure out (1)? Python's
os.name == 'posix' on Mac OS X, same as on GNU/Linux, so I can'tt use
that.
sys.platform == 'darwin' -- but it's not the platform's fault, it's the particular package you are using. You are better off trying to play the sound file, and if it fails, just don't try and play any more sound files. Python has exceptions for a reason.

-bob

Attachment: smime.p7s
Description: application/pkcs7-signature