So i've been playing around with audio synthesis in love/lua. I'm very pleased with how its turning out.
I'm able to compose various functions to create a 'synth definition' with a main function f(t). I can then sample f(t) for N seconds using love.sound.newSoundData(), and then play back the created sample using love.audio.newSource(data).
This works wonderfully for creating small samples, combining them into an instrument, and allowing you to play them back. I'm happy with the performance.
What I want to do now is steadily stream samples out from the synthesizer function. One way of doing this would be to create new audio sources regularly and chain them back to back, but of course this will have horrible issues with synchronization and wont be a smooth signal. I notice there is a decoder object, which sends chunks of samples gradually to the audio system, but there doesn't seem to be any way of getting at its internal sound data.
I suppose my question is this: Is there any way to essentially 'fake' a streaming source, by generating my own buffered queue of sound data, that the love audio engine can play from?
Modifying/Generating streaming Sound Data
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Modifying/Generating streaming Sound Data
shameless bump, my last attempt!
Re: Modifying/Generating streaming Sound Data
As far as I know, this isn't possible with the current audio architecture.
Re: Modifying/Generating streaming Sound Data
This is the closest I've come to achieving a sound buffer (last post):
http://love2d.org/forums/viewtopic.php? ... 583#p36426
Not very usable, but the sine wave file could be replaced by user generated sound data, then queued to fill the buffer.. I guess?
http://love2d.org/forums/viewtopic.php? ... 583#p36426
Not very usable, but the sine wave file could be replaced by user generated sound data, then queued to fill the buffer.. I guess?
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests