ivansafrin/Polycode — pull request #102 by mcclure (2012-04-20 10:04:45+00:00)
Title: Sound() should support procedurally generated data

ATM, the Sound class can only play data loaded from a file. What if I would prefer to generate a sound in code?

Here is a patch which adds a constructor to Sound which allows it to load sound data from an in-memory buffer.

(I think it might also be interesting to have, like, a Sound() subclass which instead of playing from a fixed buffer is generating data in realtime by repeatedly calling a callback function or something, but I have less idea how to make that happen.)