pygame: example of creating a Sound from an object
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I'm creating a small framework to reproduce sounds. As I have to make a number of calculations to actually know what I want to put on the channel, I'd like to create a Sound from an object so that the sound is read (somehow) from this object (or buffer, if it's possible).
Are there examples out there of how to achieve this?
I have discovered pygame.bufferproxy.BufferProxy after spending some time experimenting with pygame while looking at pygame's code. Now, I'm able to create the BufferProxy object, but I just don't know how to set its length so when I try to write to the buffer, it tells me that I'm writing data that's over the size of the buffer. Can anybody tell me how to use this buddy?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.