LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   pygame: example of creating a Sound from an object (https://www.linuxquestions.org/questions/programming-9/pygame-example-of-creating-a-sound-from-an-object-764350/)

eantoranz 10-25-2009 12:34 PM

pygame: example of creating a Sound from an object
 
Hi!

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?

Thanks in advance

eantoranz 10-26-2009 10:12 AM

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?

Thanks in advance!


All times are GMT -5. The time now is 08:36 AM.