[SCM] gsequencer/master: Imported Upstream version 0.4.2-66

jkraehemann-guest at users.alioth.debian.org jkraehemann-guest at users.alioth.debian.org
Wed Jun 17 02:45:16 UTC 2015


The following commit has been merged in the master branch:
commit b55ab87faec420cf437593699dbc81892b03d94f
Author: Joël Krähemann <jkraehemann at gmail.com>
Date:   Wed Jun 17 04:29:07 2015 +0200

    Imported Upstream version 0.4.2-66

diff --git a/configure b/configure
index 5c688a1..7b81553 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ags 0.4.2-65.
+# Generated by GNU Autoconf 2.69 for ags 0.4.2-66.
 #
 # Report bugs to <jkraehemann at gmail.com>.
 #
@@ -580,8 +580,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='ags'
 PACKAGE_TARNAME='ags'
-PACKAGE_VERSION='0.4.2-65'
-PACKAGE_STRING='ags 0.4.2-65'
+PACKAGE_VERSION='0.4.2-66'
+PACKAGE_STRING='ags 0.4.2-66'
 PACKAGE_BUGREPORT='jkraehemann at gmail.com'
 PACKAGE_URL=''
 
@@ -1317,7 +1317,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures ags 0.4.2-65 to adapt to many kinds of systems.
+\`configure' configures ags 0.4.2-66 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1387,7 +1387,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ags 0.4.2-65:";;
+     short | recursive ) echo "Configuration of ags 0.4.2-66:";;
    esac
   cat <<\_ACEOF
 
@@ -1523,7 +1523,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ags configure 0.4.2-65
+ags configure 0.4.2-66
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2000,7 +2000,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ags $as_me 0.4.2-65, which was
+It was created by ags $as_me 0.4.2-66, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2866,7 +2866,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='ags'
- VERSION='0.4.2-65'
+ VERSION='0.4.2-66'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -7161,7 +7161,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ags $as_me 0.4.2-65, which was
+This file was extended by ags $as_me 0.4.2-66, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7227,7 +7227,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-ags config.status 0.4.2-65
+ags config.status 0.4.2-66
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 4faa46c..6b1c65a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([ags],[0.4.2-65],[jkraehemann at gmail.com])
+AC_INIT([ags],[0.4.2-66],[jkraehemann at gmail.com])
 AM_INIT_AUTOMAKE([foreign])
 AC_CONFIG_SRCDIR([config.h.in])
 AC_CONFIG_HEADERS([config.h])
diff --git a/src/ags/X/ags_ladspa_browser.c b/src/ags/X/ags_ladspa_browser.c
index c40a0e4..ec8c4fb 100644
--- a/src/ags/X/ags_ladspa_browser.c
+++ b/src/ags/X/ags_ladspa_browser.c
@@ -355,16 +355,38 @@ ags_ladspa_browser_get_plugin_effect(AgsLadspaBrowser *ladspa_browser)
 {
   GtkComboBoxText *effect;
   GList *list;
-
+  gchar *str;
+  
   list = gtk_container_get_children(GTK_CONTAINER(ladspa_browser->plugin));
   effect = GTK_COMBO_BOX_TEXT(list->next->next->next->data);
   g_list_free(list);
+  
+  str = gtk_combo_box_text_get_active_text(effect);
+  str = &(str[6]);
+  
+  return(str);
+}
 
-  return(gtk_combo_box_text_get_active_text(effect));
+GtkWidget*
+ags_ladspa_browser_combo_box_boolean_controls_new()
+{
+  GtkComboBoxText *combo_box;
+
+  combo_box = (GtkComboBoxText *) gtk_combo_box_text_new();
+
+  gtk_combo_box_text_append_text(combo_box,
+				 "toggle button\0");
+  gtk_combo_box_text_append_text(combo_box,
+				 "check button\0");
+
+  gtk_combo_box_set_active((GtkComboBox *) combo_box,
+			   1);
+
+  return((GtkWidget *) combo_box);
 }
 
 /**
- * ags_ladspa_browser_combo_box_controls_new:
+ * ags_ladspa_browser_combo_box_float_controls_new:
  *
  * Creates a #GtkComboBox containing suitable widgets as controls.
  *
@@ -373,7 +395,7 @@ ags_ladspa_browser_get_plugin_effect(AgsLadspaBrowser *ladspa_browser)
  * Since: 0.4
  */
 GtkWidget*
-ags_ladspa_browser_combo_box_controls_new()
+ags_ladspa_browser_combo_box_float_controls_new()
 {
   GtkComboBoxText *combo_box;
 
@@ -385,8 +407,6 @@ ags_ladspa_browser_combo_box_controls_new()
 				 "dial\0");
   gtk_combo_box_text_append_text(combo_box,
 				 "vertical scale\0");
-  gtk_combo_box_text_append_text(combo_box,
-				 "horizontal scale\0");
 
   gtk_combo_box_set_active((GtkComboBox *) combo_box,
 			   1);
diff --git a/src/ags/X/ags_ladspa_browser.h b/src/ags/X/ags_ladspa_browser.h
index 4e8dd8e..3bfc95d 100644
--- a/src/ags/X/ags_ladspa_browser.h
+++ b/src/ags/X/ags_ladspa_browser.h
@@ -61,7 +61,9 @@ GType ags_ladspa_browser_get_type(void);
 gchar* ags_ladspa_browser_get_plugin_filename(AgsLadspaBrowser *ladspa_browser);
 gchar* ags_ladspa_browser_get_plugin_effect(AgsLadspaBrowser *ladspa_browser);
 
-GtkWidget* ags_ladspa_browser_combo_box_controls_new();
+GtkWidget* ags_ladspa_browser_combo_box_boolean_controls_new();
+GtkWidget* ags_ladspa_browser_combo_box_float_controls_new();
+
 GtkWidget* ags_ladspa_browser_preview_new();
 AgsLadspaBrowser* ags_ladspa_browser_new(GtkWidget *parent);
 
diff --git a/src/ags/X/ags_ladspa_browser_callbacks.c b/src/ags/X/ags_ladspa_browser_callbacks.c
index d936ff9..879f4c8 100644
--- a/src/ags/X/ags_ladspa_browser_callbacks.c
+++ b/src/ags/X/ags_ladspa_browser_callbacks.c
@@ -70,7 +70,7 @@ ags_ladspa_browser_plugin_filename_callback(GtkComboBoxText *combo_box,
 
       for(index = 0; (plugin_descriptor = ladspa_descriptor(index)) != NULL; index++){
 	gtk_combo_box_text_append_text(effect,
-				       g_strdup_printf("%s:%lu\0", plugin_descriptor->Name, plugin_descriptor->UniqueID));
+				       g_strdup_printf("%s - %s:%lu\0", (LADSPA_IS_HARD_RT_CAPABLE(plugin_descriptor->Properties) ? "\342\230\221": " \342\230\220"), plugin_descriptor->Name, plugin_descriptor->UniqueID));
       }
     }
   }
@@ -128,7 +128,7 @@ ags_ladspa_browser_plugin_effect_callback(GtkComboBoxText *combo_box,
       plugin_descriptor = ladspa_descriptor(index);
 
       port_descriptor = plugin_descriptor->PortDescriptors;   
-
+      
       /* update ui - reading plugin file */
       label = GTK_LABEL(list->data);
       gtk_label_set_text(label,
@@ -192,10 +192,17 @@ ags_ladspa_browser_plugin_effect_callback(GtkComboBoxText *combo_box,
 				  0, 1,
 				  y, y + 1);
 
-	gtk_table_attach_defaults(table,
-				  GTK_WIDGET(ags_ladspa_browser_combo_box_controls_new()),
-				  1, 2,
-				  y, y + 1);
+	if(LADSPA_IS_HINT_TOGGLED(plugin_descriptor->PortRangeHints[i].HintDescriptor)){
+	  gtk_table_attach_defaults(table,
+				    GTK_WIDGET(ags_ladspa_browser_combo_box_boolean_controls_new()),
+				    1, 2,
+				    y, y + 1);	  
+	}else{
+	  gtk_table_attach_defaults(table,
+				    GTK_WIDGET(ags_ladspa_browser_combo_box_float_controls_new()),
+				    1, 2,
+				    y, y + 1);
+	}
 
 	y++;
       }
diff --git a/src/ags/X/ags_line_member.c b/src/ags/X/ags_line_member.c
index bb07598..bcebdc2 100644
--- a/src/ags/X/ags_line_member.c
+++ b/src/ags/X/ags_line_member.c
@@ -675,9 +675,9 @@ ags_line_member_set_label(AgsLineMember *line_member,
      line_member->widget_type == GTK_TYPE_SPIN_BUTTON){
     child_widget = gtk_bin_get_child(GTK_BIN(line_member));
 
-    g_object_set(G_OBJECT(child_widget),
-		 "label\0", label,
-		 NULL);
+    //    g_object_set(G_OBJECT(child_widget),
+    //		 "label\0", label,
+    //		 NULL);
   }else{
     GtkLabel *label;
 
diff --git a/src/ags/X/ags_line_member_editor_callbacks.c b/src/ags/X/ags_line_member_editor_callbacks.c
index 61775e4..07f3666 100644
--- a/src/ags/X/ags_line_member_editor_callbacks.c
+++ b/src/ags/X/ags_line_member_editor_callbacks.c
@@ -85,14 +85,20 @@ ags_line_member_editor_ladspa_browser_response_callback(GtkDialog *dialog,
       GtkHBox *hbox;
       GtkCheckButton *check_button;
       GtkLabel *label;
+      GtkTable *table;
+      
       AgsAddRecallContainer *add_recall_container;
       AgsAddRecall *add_recall;
       AgsAddLineMember *add_line_member;
+
       AgsRecallContainer *recall_container;
       AgsRecallChannelRunDummy *recall_channel_run_dummy;
       AgsRecallLadspa *recall_ladspa;
+
       GtkAdjustment *adjustment;
+
       AgsLadspaPlugin *ladspa_plugin;
+
       GList *plugin;
       GList *task;
       GList *port;
@@ -304,6 +310,14 @@ ags_line_member_editor_ladspa_browser_response_callback(GtkDialog *dialog,
 			    add_recall);
 
       /* add controls of ports and apply range  */
+      list_start = gtk_container_get_children(GTK_CONTAINER(line_member_editor->ladspa_browser->description));
+      table = g_list_nth(list_start,
+			 4)->data;
+      g_list_free(list_start);
+
+      list_start = 
+	list = g_list_reverse(gtk_container_get_children(table));
+
       if(line != NULL){
 	if(index != -1 &&
 	   plugin_so){
@@ -319,42 +333,88 @@ ags_line_member_editor_ladspa_browser_response_callback(GtkDialog *dialog,
 	      if((LADSPA_IS_PORT_CONTROL(port_descriptor[i]) && 
 		   (LADSPA_IS_PORT_INPUT(port_descriptor[i]) ||
 		    LADSPA_IS_PORT_OUTPUT(port_descriptor[i])))){
-		AgsDial *dial;
+		GtkWidget *child_widget;
+		GType child_type;
 		GtkAdjustment *adjustment;
 
+		gchar *str;
+		
 		if(x == 2){
 		  x = 0;
 		  y++;
 		}
 
+		list = list->next;
+		str = gtk_combo_box_text_get_active_text(list->data);
+		
+		if(!g_ascii_strcasecmp(str,
+				       "toggle button\0")){
+		  child_type = GTK_TYPE_TOGGLE_BUTTON;
+		}else if(!g_ascii_strcasecmp(str,
+					     "check button\0")){
+		  child_type = GTK_TYPE_CHECK_BUTTON;
+		}else if(!g_ascii_strcasecmp(str,
+					     "spin button\0")){
+		  child_type = GTK_TYPE_SPIN_BUTTON;
+		}else if(!g_ascii_strcasecmp(str,
+					     "dial\0")){
+		  child_type = AGS_TYPE_DIAL;
+		}else if(!g_ascii_strcasecmp(str,
+					     "vertical scale\0")){
+		  child_type = GTK_TYPE_VSCALE;
+		}
+		
+		
 		line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER,
-							     "widget-type\0", AGS_TYPE_DIAL,
+							     "widget-type\0", child_type,
 							     "widget-label\0", plugin_descriptor->PortNames[i],
 							     "plugin-name\0", AGS_PORT(port->data)->plugin_name,
 							     "specifier\0", AGS_PORT(port->data)->specifier,
 							     "control-port\0", AGS_PORT(port->data)->control_port,
 							     NULL);
-		dial = (AgsDial *) ags_line_member_get_widget(line_member);
-		gtk_widget_set_size_request((GtkWidget *) dial,
-					    2 * dial->radius + 2 * dial->outline_strength + dial->button_width + 1,
-					    2 * dial->radius + 2 * dial->outline_strength + 1);
+
+		child_widget = ags_line_member_get_widget(line_member);
 		
-		lower_bound = plugin_descriptor->PortRangeHints[i].LowerBound;
-		upper_bound = plugin_descriptor->PortRangeHints[i].UpperBound;
-
-		adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0);
-		g_object_set(dial,
-			     "adjustment", adjustment,
-			     NULL);
-
-		if(upper_bound >= 0.0 && lower_bound >= 0.0){
-		  step = (upper_bound - lower_bound) / AGS_DIAL_DEFAULT_PRECISION;
-		}else if(upper_bound < 0.0 && lower_bound < 0.0){
-		  step = -1.0 * (lower_bound - upper_bound) / AGS_DIAL_DEFAULT_PRECISION;
+		if(LADSPA_IS_HINT_TOGGLED(plugin_descriptor->PortRangeHints[i].HintDescriptor)){
+		  //nothing
 		}else{
-		  step = (upper_bound - lower_bound) / AGS_DIAL_DEFAULT_PRECISION;
+		  lower_bound = plugin_descriptor->PortRangeHints[i].LowerBound;
+		  upper_bound = plugin_descriptor->PortRangeHints[i].UpperBound;
+
+		  adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0);
+
+		  if(GTK_IS_SPIN_BUTTON(child_widget)){
+		    g_object_set(child_widget,
+				 "digits\0", 4,
+				 "adjustment", adjustment,
+				 NULL);
+		    step = 0.0001;
+		  }else if(AGS_IS_DIAL(child_widget)){
+		    AgsDial *dial;
+		    
+		    dial = (AgsDial *) child_widget;
+		    gtk_widget_set_size_request((GtkWidget *) dial,
+						2 * dial->radius + 2 * dial->outline_strength + dial->button_width + 1,
+						2 * dial->radius + 2 * dial->outline_strength + 1);
+		    g_object_set(dial,
+				 "adjustment", adjustment,
+				 NULL);
+
+		    if(upper_bound >= 0.0 && lower_bound >= 0.0){
+		      step = (upper_bound - lower_bound) / AGS_DIAL_DEFAULT_PRECISION;
+		    }else if(upper_bound < 0.0 && lower_bound < 0.0){
+		      step = -1.0 * (lower_bound - upper_bound) / AGS_DIAL_DEFAULT_PRECISION;
+		    }else{
+		      step = (upper_bound - lower_bound) / AGS_DIAL_DEFAULT_PRECISION;
+		    }
+		  }else if(GTK_IS_VSCALE(child_widget)){
+		    g_object_set(child_widget,
+				 "adjustment", adjustment,
+				 NULL);
+		    step = 0.1;
+		  }
 		}
-
+		
 		gtk_adjustment_set_step_increment(adjustment,
 						  step);
 		gtk_adjustment_set_lower(adjustment,
@@ -373,6 +433,7 @@ ags_line_member_editor_ladspa_browser_response_callback(GtkDialog *dialog,
 	  
 		x++;
 		port = port->next;
+		list = list->next;
 	      }
 
 	      i++;
@@ -381,6 +442,8 @@ ags_line_member_editor_ladspa_browser_response_callback(GtkDialog *dialog,
 	}
       }
 
+      g_list_free(list_start);
+      
       task = g_list_reverse(task);
       
       /* launch tasks */
diff --git a/src/ags/audio/ags_recall_ladspa.c b/src/ags/audio/ags_recall_ladspa.c
index 9549e21..df7361a 100644
--- a/src/ags/audio/ags_recall_ladspa.c
+++ b/src/ags/audio/ags_recall_ladspa.c
@@ -724,7 +724,7 @@ ags_recall_ladspa_float_to_short(float *buffer,
   new_buffer = destination;
 
   for(i = 0; i < buffer_size; i++){
-    new_buffer[i] += (signed short) buffer[lines * i] * 32767.5f;
+    new_buffer[i] = (signed short) buffer[lines * i] * 32767.5f;
   }
 }
 
diff --git a/src/ags/audio/ags_recall_ladspa_run.c b/src/ags/audio/ags_recall_ladspa_run.c
index b8aa3ba..ff6b60e 100644
--- a/src/ags/audio/ags_recall_ladspa_run.c
+++ b/src/ags/audio/ags_recall_ladspa_run.c
@@ -375,7 +375,7 @@ ags_recall_ladspa_run_load_ports(AgsRecallLadspaRun *recall_ladspa_run)
 	}
 
 	for(j = 0; j < recall_ladspa->input_lines; j++){
-	  g_message("connecting port[%d]: %d/%d\0", j, i, port_count);
+	  //	  g_message("connecting port[%d]: %d/%d\0", j, i, port_count);
 	  port_data = &(current->port_value.ags_port_float);
 	  recall_ladspa->plugin_descriptor->connect_port(recall_ladspa_run->ladspa_handle[j],
 							 i,
diff --git a/src/ags/widget/ags_dial.c b/src/ags/widget/ags_dial.c
index 08609ef..f4d0473 100644
--- a/src/ags/widget/ags_dial.c
+++ b/src/ags/widget/ags_dial.c
@@ -712,11 +712,12 @@ ags_dial_draw(AgsDial *dial)
   }else if(dial->adjustment->upper < 0.0 && dial->adjustment->lower < 0.0){
     range = -1.0 * (dial->adjustment->lower - dial->adjustment->upper);
   }else{
-    range = (dial->adjustment->upper - dial->adjustment->lower);
+    range = (dial->adjustment->upper + dial->adjustment->lower);
   }
 
   if(range == 0.0){
     g_warning("ags_dial.c - range = 0.0\0");
+    return;
   }
   
   if(dial->adjustment->lower < 0.0){

-- 
gsequencer packaging



More information about the pkg-multimedia-commits mailing list