On Sat, 2012-03-24 at 20:58 +0000, Aurélien Leblond wrote:
[...]
> Of course you can't do X things in the audio thread!!! Holy crap!
>
> Ha! How can I be so stupid!
> Ok, I get it now (well I hope anyway).
:) Just makin' sure.
It's easy to screw up if you're not working within a framework that
avoids it. I was just trying to stress that there's a more fundamental
problem here than getting the cursor position being a bit too slow.
> Create a fairly simply GUI that queries the mouse position, and get
> the GUI to feed that into two control inputs of the plugin itself.
> The plugin would simply take the value of those 2 control input, and
> feed that into two audio outputs (or VC outputs, for that matter)...
> And obviously, the two would be conpletely separated, the way it
> already is for other plugin: audio processing on one side, GUI on the
> other....
That'll do. As long as all the communication happens via ports these
problems are impossible. Some kind of event might be needed for
anything more fancy, but for a couple of numbers KISS with control
ports.
(Historical note, it's only to accommodate porting existing plugins from
certain broken proprietary APIs that the facility to directly access the
plugin exists at all. I should probably put some loud disclaimers in
the relevant extensions to explain that actually using them is a
terrible idea intended as a last resort)
> If I'm not wrong, that should dissociate GUI/plugin. In fact it
> wouldn't be that different than how a usual plugin works now, but
> instead of being let say a combo box changing the controls value of
> the plugin, it's simply the position of the mouse cursor.
Yep
> (by the way you are completely right, I'm learning audio dev as I go
> in this project! that does explain my confusions sometimes...)
Took me a while to figure out (the hard way) that the usual "la de da
direct access to everything" approach is an awful idea for audio.
I've since become more or less completely convinced that anything but an
event queue to and from your engine is wrong. Show me a program not
built that way, and I'll show you a program that's probably not
real-time safe :)
-dr
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sun Mar 25 00:15:03 2012
This archive was generated by hypermail 2.1.8 : Sun Mar 25 2012 - 00:15:03 EET