On Jul 30, 2004, at 2:48 PM, Bob Ippolito wrote:
Oh sorry, I didn't read your whole message. Actually, I'm not sure your guess is correct, you should really break into the process and get a backtrace with GDB, get a sample from Activity Monitor, use Shark, or something like that to see what it's doing when the CPU is thrashing. Another thing you could do is post a minimal script and ogg file that breaks and I may have a chance to try and reproduce/fix it myself.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 usingCompile it yourself. I thought it had ogg support, but I don't really have time to build another right now.
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?
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.(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.
Attachment:
smime.p7s
Description: application/pkcs7-signature