dynamic AudioConnection

Status
Not open for further replies.

atom

New member
Helo and welcome.

I'd like to change my audio connection at runtime. I have just twoj connections now, from input to effect and from effect to output, now i'd like to switch the effect in the connection based on a button for example: flanger/chorus. I was experimenting with new AudioConnection and deleting it, but that seems to fail after firs allocation. What's the proper way to change the connections at runtime, do I need to create all the connections and then manipulate them somehow ? The AudioConnection class has no methods to disconnect the source/destination. Any advice ?

best regards
 
Currently AudioConnection need to be static. Dynamically changing them isn't supported. Maybe the library will someday be extended to support this, but for now the connections can't change at runtime.

You can fake this to some degree by using mixers, where you change the per-channel gain.
 
Well the idea was to disable those effects when one is working and the other not, to free CPU time, otherwise i will have multiple effects running i parallel (i assume setting the gain to 0.0 on a mixer will not disable the effect). I want to add at least a few of my own, and sequence them (sort of a glitch effect).

I'll see how much CPU will i use when all those effects are running in parallel, if it will be acceptable i will use mixers.
 
Some of the CPU heavy effects have ways to disable themselves. Others that don't do that probably should (and adding disable within an effect is simple).

If you run into problems where certain objects are using too much CPU time when not doing anything useful, please post here with code to demonstrate the problem.
 
Status
Not open for further replies.
Back
Top