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

[pygame] Is it safe to subclass Pygame Channels and Sound classes?



Hi Everyone!

In my app I'm making heavy use of Pygame mixer's Channels and Sound objects. In both cases I need to add additional methods and attributes to them. Is my code is now, I have my own classes of each which reference related Pygame classes. (In other words, my "Channel" class has a bunch of things like the name, the priority of the sound that's currently playing, a reference to the Pygame Channel object, etc.)

My question is whether it's ok to subclass the actual Pygame mixer Channel and Sound classes for my use? I've never subclassed anything from an external module before, and I guess I'm wondering whether that's ok to do or whether that's frowned upon?

Thanks in advance!
Brian

--
Brian Madden