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

Re: [pygame] Does PyGame support Ogg Vorbis "OOTB"?



Brian Fisher wrote:
>>  I've already made sure to use BMP files exclusively for images.
>>
> Why BMP files exclusively? what image files are you avoiding? Why are
> you avoiding them

Because the documentation (still?) says that only BMP support is guaranteed:

From the documentation installed w/ my PyGame package:
"""
At the minimum the included load() function will support BMP files.
"""

From http://www.pygame.org/docs/ref/image.html:
"""
By default it can only load uncompressed BMP images.
"""

I also know from experience that with early versions of PyGame, only BMP
was supported and it was necessary to convert your images to work with
it. These documentation passages suggest that not much has changed in
that respect -- though I notice that on my installation, PNG support is
as good if not better than BMP support.

>>  But what about sound files? Does pygame.mixer.music *always*
>>  support Ogg files? I know my installation does.
>>
> SDL_mixer can be built without ogg vorbis support - but I don't see
> why it would be. again, if there is a case where it is, it would be
> good to get that fixed.

There's a(nother?) documentation problem here:

pygame.mixer.music.load makes no mention of what formats can be loaded
in either 1.7 or website documentation. In both cases, though,
pygame.mixer.music.play makes an oblique reference to using MP3, OGG,
and MOD formats:

"""
The starting position is dependent on the format of music playing. MP3
and OGG use the position as time (in seconds). MOD music it is the
pattern order number.
"""

This is the only indication that those formats are supported. It's
unclear whether other formats are supported or whether this support is
unique to the pygame.mixer.music module, or generally applies to all of
pygame.mixer.

The in-package documentation for 1.7.1 mentions only WAV support for
pygame.mixer:

"""
Loads a new sound object from a WAV file.
"""

(it doesn't say it doesn't support OGG, but it doesn't say it does, either).

The website says:
"""
The Sound can be loaded from an OGG audio file or from an uncompressed WAV.
"""

but doesn't say whether the program has changed, or only the
documentation. Is the support for pygame.mixer.Sound different from that
of pygame.mixer.music.load? Can you load MOD files with
pygame.mixer.Sound, for example?

The fact that there are two separate modules for handling sound playback
makes me think that the range of file format support will be different.

In all of the versions I've *tested*, loading an Ogg file worked just
fine with both music.load() and mixer.Sound() (well, nearly -- I did
once have a problem with playback of Sounds when the music module
*wasn't* playing, oddly enough)

>>  Also, one person has complained about installation problems on
>>  Fedora Core and also on OS X. Are there binary bundles that
>>  work well on those platforms? I assume Windows is covered,
>>  and I know the Debian installation "just works".
>>
> I don't know about Fedora, but it's my expectation that OS X prebuilt
> installer support for pygame 1.8 is sufficient for all needs. If there
> is any circumstance where that is not the case, please let the list
> know so it can be fixed.
> 
> Also, OS X support for pygame 1.7 has been lacking in that a prebuilt
> python 2.5 installer was not available for a long period of time,
> which may be where that part of the complaint originated.

Are you saying that the correct instructions for OS X, for v1.7 and v1.8
is now to just use the installer from pygame.org downloads? Are you also
saying that these work with the version of python that ships with OS X?

IOW, the documentation that warned my friend off of just doing a
straight install was outdated?

Thanks for all of the replies! It's one thing to know what works on your
own system (you can always just test), but it's very tricky to work out
what will reliably work with other versions on other platforms and
installations.

Cheers,
Terry

-- 
Terry Hancock (hancock@xxxxxxxxxxxxxxxxxxxx)
Anansi Spaceworks http://www.AnansiSpaceworks.com