Re: JAMin CVS commit - 0.97.03
Steve Harris <[email protected]>
| Newsgroups | gmane.comp.audio.jamin.devel |
|---|---|
| Message-ID | <[email protected]> |
On 19 Jun 2007, at 00:25, Jan Depner wrote:
> 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.
Ah, I see. Sorry, I forgot how the code worked. Instantiating
multiple times is not really an issue, it leaks a bit of ram, but
this only happens on a switch.
The level change is more worrying though. I guess you would expect
that if the limiter is being driven, but if it's processing already
limited material there should be no change. Also there should be no
excursions over 0dB. In the old limiter there's a clamp on the output
just to make sure nothing goes over the set limit, Sampo, do you have
something similar?
- Steve
-------------------------------------------------------------------------
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/