Rename check for effect port existance

This commit is contained in:
Marcus Weseloh 2017-10-28 16:40:22 +02:00
parent adcd5a5d53
commit bcf711f51a
3 changed files with 7 additions and 7 deletions

View file

@ -2012,7 +2012,7 @@ int fluid_handle_ladspa_set(void *data, int ac, char **av, fluid_ostream_t out)
}
/* Redundant check, just here to give a more detailed error message */
if (!fluid_ladspa_port_exists(fx, effect_name, port_name))
if (!fluid_ladspa_effect_port_exists(fx, effect_name, port_name))
{
fluid_ostream_printf(out, "Effect port '%s:%s' not found\n", effect_name, port_name);
return FLUID_FAILED;
@ -2020,8 +2020,8 @@ int fluid_handle_ladspa_set(void *data, int ac, char **av, fluid_ostream_t out)
if (fluid_ladspa_set_control_port(fx, effect_name, port_name, atof(av[1])) != FLUID_OK)
{
fluid_ostream_printf(out, "Failed to set effect port '%s:%s', maybe it is "
"not a control node?\n", effect_name, port_name);
fluid_ostream_printf(out, "Failed to set '%s:%s', maybe it is not a control port?\n",
effect_name, port_name);
return FLUID_FAILED;
}
@ -2124,7 +2124,7 @@ int fluid_handle_ladspa_link(void* data, int ac, char **av, fluid_ostream_t out)
* here anyway to give the user better feedback in case a port or node
* could not be found.
*/
if (!fluid_ladspa_port_exists(fx, effect_name, port_name))
if (!fluid_ladspa_effect_port_exists(fx, effect_name, port_name))
{
fluid_ostream_printf(out, "Effect port '%s:%s' not found.\n", effect_name, port_name);
return FLUID_FAILED;

View file

@ -613,7 +613,7 @@ int fluid_ladspa_node_exists(fluid_ladspa_fx_t *fx, const char *name)
* @param name the port name
* @return TRUE if port was found, otherwise FALSE
*/
int fluid_ladspa_port_exists(fluid_ladspa_fx_t *fx, const char *effect_name, const char *name)
int fluid_ladspa_effect_port_exists(fluid_ladspa_fx_t *fx, const char *effect_name, const char *port_name)
{
fluid_ladspa_plugin_t *plugin;
int port_exists;
@ -626,7 +626,7 @@ int fluid_ladspa_port_exists(fluid_ladspa_fx_t *fx, const char *effect_name, con
LADSPA_API_RETURN(fx, FALSE);
}
port_exists = (get_plugin_port_idx(plugin, name) != -1);
port_exists = (get_plugin_port_idx(plugin, port_name) != -1);
LADSPA_API_RETURN(fx, port_exists);
}

View file

@ -160,7 +160,7 @@ int fluid_ladspa_add_plugin(fluid_ladspa_fx_t *fx, const char *effect_name,
int fluid_ladspa_plugin_can_add(fluid_ladspa_fx_t *fx, const char *name);
int fluid_ladspa_plugin_mode(fluid_ladspa_fx_t *fx, const char *name,
fluid_ladspa_mode_t mode, float gain);
int fluid_ladspa_port_exists(fluid_ladspa_fx_t *fx, const char *plugin_name, const char *name);
int fluid_ladspa_effect_port_exists(fluid_ladspa_fx_t *fx, const char *effect_name, const char *port_name);
int fluid_ladspa_add_audio_node(fluid_ladspa_fx_t *fx, const char *name);
int fluid_ladspa_set_control_port(fluid_ladspa_fx_t *fx, const char *effect_name,