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

[pygame] Pygame2 sdlmixer documentation contribution + error



First, I have written a new documentation page for pygame2.sdlmixer. It's not complete, but it at least gives enough information to allow a user to play a sound effect. I'm pretty sure I followed all the documentation conventions, but it needs to be reviewed for correctness before it's commited. I only wrote descriptions for methods and classes I'd used successfully, but I also added TODOs and generic call signatures to make all the method names visible. I don't think people should have to use pydoc to learn what classes and methods are in the sdlmixer module.

Second, I don't think the sdlmixer.Music class is working properly. According to pydoc, it only has two methods and one attribute: __init__(), __new__(), and type. However, the sdlmixer library documentation lists several functions used specifically for playing music, not sound effects. Also, the Music class' C source code appears to list play() as one of its methods, but if I try to call the method, I get "AttributeError: 'sdlmixer.Music' object has no attribute 'play'". I can play sounds with sdlmixer.Channel() and sdlmixer.Chunk(), but not sdlmixer.Music(). Has that class not been implemented yet, or is this an error?

Thanks,
--
Evan Kroske
http://welcome2obscurity.blogspot.com/
The code, comments, and challenges of a novice
software developer desperate for attention.