[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Pygame2 sdlmixer documentation contribution + error
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Pygame2 sdlmixer documentation contribution + error
- From: Evan Kroske <e.kroske@xxxxxxxxx>
- Date: Sat, 15 Aug 2009 22:04:34 -0400
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sat, 15 Aug 2009 22:04:37 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=NhFUFavM2Nq97fIwiGCtNfUp/T/SEu8cJ42lJIBKz3U=; b=fSYRVF864S4zLxU1JNrgVLQQo+rw9STtSj2biqznME1dhH9odEGATtHho2qfJ6jOrk uPd8ux/+eOakvHpxs2K5PY4YnmNi9rYD+Bz1hCmMDxmRN2c24GaYvfACXdAWV5vr6RSL zAbR1YLZ1srntwWNkQx+McNZWlQ0ANcb7B8/Y=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=fnd6Eg/Y2dCvqBw2/EBMmcdif9N0NDs9snP+rwpafOinyOb2eQ1a2eIB9MEMw+GI7m R8cNRZD5DTXJHtYzNqSPdW7ZKmCDZe+6/OJL9gkbO0ifHvfYN+6wFQxEjbfrj49uhMat Pdub9pW1sLviHoK6rP40pQu2fgOPz4FYWlrtA=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
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.