/*
- * JACK Rack
- *
- * Copyright (C) Robert Ham 2003 (node@users.sourceforge.net)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * JACK Rack
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Original:
+ * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net)
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Modification for MLT:
+ * Copyright (C) 2004 Ushodaya Enterprises Limited
+ * Author: Dan Dennedy <dan@dennedy.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define _GNU_SOURCE
gboolean
settings_get_lock (const settings_t * settings, unsigned long control_index)
{
- g_return_if_fail (settings != NULL);
+ g_return_val_if_fail (settings != NULL, FALSE);
return settings->locks[control_index];
}
gboolean
settings_get_lock_all (const settings_t * settings)
{
- g_return_if_fail (settings != NULL);
+ g_return_val_if_fail (settings != NULL, FALSE);
return settings->lock_all;
}
gboolean
settings_get_enabled (const settings_t * settings)
{
- g_return_if_fail (settings != NULL);
+ g_return_val_if_fail (settings != NULL, FALSE);
return settings->enabled;
}
guint
settings_get_copies (const settings_t * settings)
{
- g_return_if_fail (settings != NULL);
+ g_return_val_if_fail (settings != NULL, 0);
return settings->copies;
}
unsigned long
settings_get_channels (const settings_t * settings)
{
- g_return_if_fail (settings != NULL);
+ g_return_val_if_fail (settings != NULL, 0);
return settings->channels;
}
gboolean
settings_get_wet_dry_enabled (const settings_t * settings)
{
- g_return_if_fail (settings != NULL);
+ g_return_val_if_fail (settings != NULL, FALSE);
return settings->wet_dry_enabled;
}
gboolean
settings_get_wet_dry_locked (const settings_t * settings)
{
- g_return_if_fail (settings != NULL);
+ g_return_val_if_fail (settings != NULL, FALSE);
return settings->wet_dry_locked;
}
LADSPA_Data
settings_get_wet_dry_value (settings_t * settings, unsigned long channel)
{
- g_return_if_fail (settings != NULL);
+ g_return_val_if_fail (settings != NULL, NAN);
if (channel >= settings->channels)
settings_set_channels (settings, channel + 1);