Skip to contentSkip to conversation

src/pcm/pcm_ladspa.c: Delay LADSPA plugin activate call

PATCH Applied Matthias Larisch 2 participants 2 messages Mar 27, 2014 – Apr 3, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 src/pcm/pcm_ladspa.c: Delay LADSPA plugin activate call

Some LADSPA Plugins rely on connected control ports on activate call. While this is not okay by spec, the spec also encourages the activate call happening as late as possible.

---
 src/pcm/pcm_ladspa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/pcm/pcm_ladspa.c +0 -0
index 9ce5242..7d1e3df 100644
@@ -645,8 +645,6 @@ static int snd_pcm_ladspa_allocate_instances(snd_pcm_t

*pcm, snd_pcm_ladspa_t *l return -EINVAL;
}
list_add_tail(&instance->list, &plugin->instances);
- if (plugin->desc->activate)
- plugin->desc->activate(instance->handle);
if (plugin->policy == SND_PCM_LADSPA_POLICY_DUPLICATE)
{ err = snd_pcm_ladspa_connect_plugin_duplicate(plugin, &plugin->input, &plugin->output, instance, idx); if (err < 0) {
@@ -664,6 +662,8 @@ static int snd_pcm_ladspa_allocate_instances(snd_pcm_t *pcm, snd_pcm_ladspa_t *l assert(err >= 0);
err = snd_pcm_ladspa_connect_controls(plugin,
&plugin->output, instance); assert(err >= 0);
+ if (plugin->desc->activate)
+ plugin->desc->activate(instance->handle);
}
err = snd_pcm_ladspa_check_connect(plugin, &plugin->input,
&instance->input, depth); if (err < 0)

Signature · 1 line
1.9.1
Applied
#1 lore raw

At Thu, 27 Mar 2014 19:05:10 +0100,

Quoted 6 lines · Matthias Larisch

Some LADSPA Plugins rely on connected control ports on activate call. While this is not okay by spec, the spec also encourages the activate call happening as late as possible.

Thanks, applied.

Takashi

Quoted 34 lines
---
 src/pcm/pcm_ladspa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/pcm/pcm_ladspa.c +2 -2
index 9ce5242..7d1e3df 100644
@@ -645,8 +645,6 @@ static int snd_pcm_ladspa_allocate_instances(snd_pcm_t
 *pcm, snd_pcm_ladspa_t *l return -EINVAL;
 			}
 			list_add_tail(&instance->list, &plugin->instances);
-			if (plugin->desc->activate)
-				plugin->desc->activate(instance->handle);
 			if (plugin->policy == SND_PCM_LADSPA_POLICY_DUPLICATE)
 { err = snd_pcm_ladspa_connect_plugin_duplicate(plugin, &plugin->input,
 &plugin->output, instance, idx); if (err < 0) {
@@ -664,6 +662,8 @@ static int snd_pcm_ladspa_allocate_instances(snd_pcm_t
 *pcm, snd_pcm_ladspa_t *l assert(err >= 0);
 			err = snd_pcm_ladspa_connect_controls(plugin,
 &plugin->output, instance); assert(err >= 0);
+			if (plugin->desc->activate)
+				plugin->desc->activate(instance->handle);
 		}
 		err = snd_pcm_ladspa_check_connect(plugin, &plugin->input,
 &instance->input, depth); if (err < 0)
Signature · 7 lines
1.9.1
[1.2 signature.asc <application/pgp-signature (7bit)>]

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel