Re: JAMin CVS commit - 0.97.03
Jan Depner <[email protected]>
| Newsgroups | gmane.comp.audio.jamin.devel |
|---|---|
| Message-ID | <1182209157.15550.13.camel@eviltwin> |
On Mon, 2007-06-18 at 09:50 +0100, Steve Harris wrote:
> On 17 Jun 2007, at 21:09, Jan Depner wrote:
>
> > Steve,
> >
> > How can I switch limiter plugins on-the-fly? Should I have two
> > lim_settings, one for foo and one for fast and try to load and
> > instantiate both at startup? If so, when I switch, can I just
> > lim_connect the one I want or do I need to do something else?
>
> If the plugins are compatible they can share one lim_settings, just
> connect then both to it.
>
I'm not really up to speed on this. Don't I have to instantiate
both plugins and get a different handle for them? Right now I'm doing 2
plugin loads:
lim_plugin[0] = plugin_load("fast_lookahead_limiter_1913.so");
lim_plugin[1] = plugin_load("foo_limiter.so");
When I switch I do:
void process_set_limiter_plugin(int id)
{
limiter_plugin = id;
if (lim_plugin[limiter_plugin] == NULL) limiter_plugin ^= 1;
limiter.handle = plugin_instantiate(lim_plugin[limiter_plugin], sample_rate);
lim_connect(lim_plugin[limiter_plugin], &limiter, NULL, NULL);
}
I'm not sure I'm supposed to instantiate the plugins more than once but
if I don;t do that then I need 2 handles so I can't use 1 lim_settings.
BTW, this works except that you get volume shift when you switch
plugins. Also, if you push the limiter input when using the foo plugin
it distorts and will sometimes exceed 0 on the output. The fast limiter
won't do this.
Once we get this straightened out I'll try to clean up the interface
a bit so that you won't be offerred a choice of plugins if they didn't
both load.
Jan
--
Jan 'Evil Twin' Depner
http://myweb.cableone.net/eviltwin69
"Life should NOT be a journey to the grave with the intention of
arriving safely in an attractive and well preserved body, but rather to
skid in sideways, chardonnay in one hand, chocolate in the other, body
thoroughly used up, totally worn out, and screaming 'WOO HOO, what a ride'"
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/