]> git.sesse.net Git - mlt/blobdiff - src/modules/jackrack/plugin_settings.c
register jack ports before activating client
[mlt] / src / modules / jackrack / plugin_settings.c
index 68c277c3dbba9857ba543aa9a9541cde53e9f1ea..88d6a7ca46726a6652f067f696ea94c7e7c8632a 100644 (file)
@@ -1,25 +1,31 @@
 /*
- *   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.
  */
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
-
+#endif
 #include <math.h>
 
 #include "plugin_settings.h"
@@ -320,7 +326,7 @@ settings_get_control_value (settings_t * settings, guint copy, unsigned long con
 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]; 
 }
@@ -328,7 +334,7 @@ settings_get_lock          (const settings_t * settings, unsigned long control_i
 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;
 }
@@ -336,7 +342,7 @@ settings_get_lock_all      (const settings_t * settings)
 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;
 }
@@ -344,7 +350,7 @@ settings_get_enabled      (const settings_t * settings)
 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;
 }
@@ -353,7 +359,7 @@ settings_get_copies        (const settings_t * settings)
 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;
 }
@@ -361,7 +367,7 @@ settings_get_channels        (const settings_t * settings)
 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;
 }
@@ -369,7 +375,7 @@ settings_get_wet_dry_enabled (const settings_t * settings)
 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;
 }
@@ -377,7 +383,7 @@ settings_get_wet_dry_locked  (const settings_t * settings)
 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);