[SCM] calf/master: Sidebars, GUI layouts, black buttons again, input knob for compressor

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:39:40 UTC 2013


The following commit has been merged in the master branch:
commit 65c6ba953873908c4829344a185e5f5dfd27a058
Author: Markus Schmidt <schmidt at boomshop.net>
Date:   Sat Oct 17 09:07:33 2009 +0200

    Sidebars, GUI layouts, black buttons again, input knob for compressor

diff --git a/gui/compressor.png b/gui/compressor.png
deleted file mode 100644
index ec327f6..0000000
Binary files a/gui/compressor.png and /dev/null differ
diff --git a/gui/filterclavier.png b/gui/filterclavier.png
deleted file mode 100644
index 9bf54eb..0000000
Binary files a/gui/filterclavier.png and /dev/null differ
diff --git a/gui/flanger.png b/gui/flanger.png
deleted file mode 100644
index 31b43ea..0000000
Binary files a/gui/flanger.png and /dev/null differ
diff --git a/gui/fluidsynth.png b/gui/fluidsynth.png
deleted file mode 100644
index e6aea8a..0000000
Binary files a/gui/fluidsynth.png and /dev/null differ
diff --git a/gui/grip_left.png b/gui/grip_left.png
deleted file mode 100644
index d4e9547..0000000
Binary files a/gui/grip_left.png and /dev/null differ
diff --git a/gui/grip_right.png b/gui/grip_right.png
deleted file mode 100644
index 5f066be..0000000
Binary files a/gui/grip_right.png and /dev/null differ
diff --git a/gui/gui-compressor.xml b/gui/gui-compressor.xml
index 4bf5caa..331a450 100644
--- a/gui/gui-compressor.xml
+++ b/gui/gui-compressor.xml
@@ -1,87 +1,91 @@
-<table border="10" rows="4" cols="1">
-    <hbox attach-x="0" attach-y="0" shrink-y="1" expand-y="0" homogeneous="1">
-    	<vbox expand="1">
-             <label param="bypass"/>
-             <align><toggle param="bypass" shrink="1" size="1"/></align>
-        </vbox>
-    	<vbox expand="1">
-            <label param="detection"/>
-            <align>
-                <hbox expand="0" >
-                    <radio param="detection" value="RMS" shrink="1"/>
-                    <radio param="detection" value="Peak" shrink="1"/>
-                </hbox>
-            </align>
-        </vbox>
-    	<vbox expand="1">
-            <label param="stereo_link"/>
-            <align>
-                <hbox expand="0" >
-                    <radio param="stereo_link" value="Average" shrink="1"/>
-                    <radio param="stereo_link" value="Maximum" shrink="1"/>
-                </hbox>
-            </align>
-        </vbox>
-    	<vbox expand="1">
-            <label param="aweighting"/>
-            <align>
-                <combo param="aweighting"/>
-            </align>
-        </vbox>
-    </hbox>
-    <if cond="directlink">
-        <line-graph attach-x="0" attach-y="1" refresh="1" width="384" height="384" param="compression" square="1" expand-y="1" fill-y="1"/>
-    </if>
-    <table attach-x="0" attach-y="2" expand-y="0" expand-x="1" spacing="10" rows="1" cols="3">
-        <vbox expand-x="1" fill-x="1" expand="1" fill="1" attach-x="0" attach-y="0">
-            <label param="compression" />
-            <vumeter param="compression" mode="2" hold="2" />
+<table rows="2" cols="4" spacing="10">
+    <vbox attach-x="0" attach-y="0" expand="0" fill="0" pad-x="7" pad-y="3" >
+        <label param="bypass" expand="0" fill="0" />
+        <align><toggle param="bypass" shrink="1" size="2"/></align>
+    </vbox>
+    <vbox attach-x="0" attach-y="1" expand="0" fill="0" pad-y="20" pad-x="7">
+        <label param="input" expand="0" fill="0" expand-y="0" fill-y="0" />
+        <knob param="input" size="4" expand="1" fill="1" />
+        <value param="input" />
+    </vbox>
+    
+    <table attach-x="1" attach-y="0" expand-y="0" fill-y="0" expand-x="1" spacing="1" rows="3" cols="2">
+        <vbox expand-x="1" fill-x="1"  expand="0" fill="0" attach-x="0" attach-y="0">
+            <label param="peak" />
+            <vumeter param="peak" mode="0" hold="2" shrink-y="0" />
         </vbox>
         <vbox shrink-x="1" expand-x="0" fill-x="0" expand="0" fill="0" attach-x="1" attach-y="0">
             <label param="clip" expand="0" fill="0" />
             <led param="clip" mode="1" expand="0" fill="0" />
         </vbox>
-        <vbox expand-x="1" fill-x="1" expand="1" fill="1" attach-x="2" attach-y="0">
-            <label param="peak" />
-            <vumeter param="peak" mode="0" hold="2" shrink-y="0" />
-        </vbox>
+        <vumeter param="compression" mode="2" hold="2" attach-x="0" attach-y="1" attach-w="2" expand="0" fill="0" expand-x="1" fill-x="1"/>
+        <label param="compression" attach-y="2" attach-x="0" expand-x="1" fill-x="1" expand="0" fill="0" />
     </table>
-    <table attach-x="0" attach-y="3" expand-y="0" rows="1" cols="6" homogeneous="1" spacing="10">
+    
+    <table attach-x="1" attach-y="1" expand="1" rows="2" cols="3" homogeneous="1" pad-x="5">
         <vbox expand="0" attach-x="0" attach-y="0">
             <label param="attack" />
             <knob param="attack" />
             <value param="attack" />
-            <led param="peak" mode="2" expand="0" fill="0" />
         </vbox>
         <vbox expand="0" attach-x="1" attach-y="0">
             <label param="release" />
             <knob param="release" />
             <value param="release" />
-            <led param="peak" mode="3" expand="0" fill="0" />
         </vbox>
         <vbox expand="0" attach-x="2" attach-y="0">
-            <label param="threshold" />
-            <knob param="threshold"/>
-            <value param="threshold" />
-            <led param="peak" mode="4" expand="0" fill="0" />
+            <label param="knee" />
+            <knob param="knee" />
+            <value param="knee" />
         </vbox>
-        <vbox expand="0" attach-x="3" attach-y="0">
+        <vbox expand="0" attach-x="0" attach-y="1">
             <label param="ratio" />
             <knob param="ratio" />
             <value param="ratio" />
-            <led param="peak" mode="5" expand="0" fill="0" />
         </vbox>
-        <vbox expand="0" attach-x="4" attach-y="0">
+        <vbox expand="0" attach-x="1" attach-y="1">
+            <label param="threshold" />
+            <knob param="threshold"/>
+            <value param="threshold" />
+        </vbox>
+        <vbox expand="0" attach-x="2" attach-y="1">
             <label param="makeup" />
             <knob param="makeup" />
             <value param="makeup" />
-            <led param="peak" mode="6" expand="0" fill="0" />
-        </vbox>
-        <vbox expand="0" attach-x="5" attach-y="0">
-            <label param="knee" />
-            <knob param="knee" />
-            <value param="knee" />
-            <led param="peak" mode="7" expand="0" fill="0" />
         </vbox>
     </table>
+    
+    <if cond="directlink">
+        <line-graph attach-x="2" attach-y="0" attach-h="2" refresh="1" width="200" height="200" param="compression" square="1" expand-y="1" fill-y="1" pad-x="7"/>
+    </if>
+    
+    <vbox expand="1" attach-x="3" attach-y="0" pad-x="5">
+        <vbox expand="0">
+            <label param="aweighting"/>
+            <align>
+                <combo param="aweighting"/>
+            </align>
+        </vbox>
+    </vbox>
+    <vbox attach-x="3" attach-y="1" spacing="10" pad-x="5" fill-y="0" expand-y="0">
+    	<vbox expand="1" expand-y="0" expand-x="1" fill-x="1">
+            <label param="stereo_link" expand-y="0" fill-y="0"/>
+            <align>
+                <hbox expand="0" fill-y="0" expand-x="1" fill-x="1">
+                    <radio param="stereo_link" value="Average" expand-x="1" fill-x="1"/>
+                    <radio param="stereo_link" value="Maximum" expand-x="1" fill-x="1"/>
+                </hbox>
+            </align>
+        </vbox>
+        <vbox expand="1" expand-y="0">
+        	<label param="detection" expand-y="0" fill-y="0" expand-x="1" fill-x="1"/>
+            <align>
+                <hbox expand="0" fill-y="0" expand-x="1" fill-x="1" >
+                    <radio param="detection" value="RMS" expand-x="1" fill-x="1"/>
+                    <radio param="detection" value="Peak" expand-x="1" fill-x="1"/>
+                </hbox>
+            </align>
+        </vbox>
+    </vbox>
+    
 </table>
diff --git a/gui/gui-filter.xml b/gui/gui-filter.xml
index 1f28a3b..7c45d9b 100644
--- a/gui/gui-filter.xml
+++ b/gui/gui-filter.xml
@@ -1,4 +1,4 @@
-<table border="10" rows="3" cols="1" >
+<table rows="2" cols="2" >
     <table attach-x="0" attach-y="0" shrink-y="1" expand-x="1" cols="3" rows="1" >
         <label param="mode" attach-x="0" attach-y="0" shrink-x="1" widget-name="inverted"/>
         <label attach-x="1" attach-y="0" shrink-x="1" pad-x="10" />
@@ -22,8 +22,8 @@
         </vbox>
     </hbox>
     <if cond="directlink">
-        <frame label="Freq. response" expand-x="1" fill-x="1" attach-x="0" attach-y="2" widget-name="frame">
-            <line-graph refresh="1" width="160" height="160" param="freq"/>
+        <frame label="Freq. response" expand-x="1" fill-x="1" attach-x="1" attach-y="0" attach-h="2" widget-name="frame" pad-x="3">
+            <line-graph refresh="1" width="360" height="160" param="freq"/>
         </frame>
     </if>
 </table>
diff --git a/gui/gui-filterclavier.xml b/gui/gui-filterclavier.xml
index 0dfe2af..5ff2b0a 100644
--- a/gui/gui-filterclavier.xml
+++ b/gui/gui-filterclavier.xml
@@ -1,4 +1,4 @@
-<table border="10" rows="3" cols="1">
+<table rows="3" cols="1">
     <table attach-x="0" attach-y="0" shrink-y="1" expand-x="1" cols="3" rows="1" >
         <label param="mode" attach-x="0" attach-y="0" shrink-x="1"/>
         <label attach-x="1" attach-y="0" shrink-x="1" pad-x="10"/>
diff --git a/gui/gui-flanger.xml b/gui/gui-flanger.xml
index b0b80be..aa5e581 100644
--- a/gui/gui-flanger.xml
+++ b/gui/gui-flanger.xml
@@ -1,4 +1,4 @@
-<table rows="3" cols="1" border="10">
+<table rows="3" cols="1">
     <frame label="Timbre" shrink-y="1" attach-x="0" attach-y="0" >
         <table rows="1" cols="1" homogeneous="1" spacing="10">
             <vbox expand="0" attach-x="0" attach-y="0">
diff --git a/gui/gui-monosynth.xml b/gui/gui-monosynth.xml
index 75eb1ba..3f3865f 100644
--- a/gui/gui-monosynth.xml
+++ b/gui/gui-monosynth.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<vbox border="10">
+<vbox>
   <frame label="Global">
     <hbox border="10" spacing="10">
       <vbox>
diff --git a/gui/gui-multibandcompressor.xml b/gui/gui-multibandcompressor.xml
index 301e2e0..a16884d 100644
--- a/gui/gui-multibandcompressor.xml
+++ b/gui/gui-multibandcompressor.xml
@@ -1,4 +1,4 @@
-<table border="10" rows="2" cols="1">
+<table rows="2" cols="1">
     <table attach-x="0" attach-y="0" expand-y="0" expand-x="1" spacing="5" rows="1" cols="11">
         <vbox shrink-x="1" expand-x="0" fill-x="0" expand="0" fill="0" attach-x="0" attach-y="0">
             <label param="level_in" />
diff --git a/gui/gui-multichorus.xml b/gui/gui-multichorus.xml
index cc1fe6c..018ff16 100644
--- a/gui/gui-multichorus.xml
+++ b/gui/gui-multichorus.xml
@@ -1,4 +1,4 @@
-<table rows="3" cols="2" border="10">
+<table rows="3" cols="2">
     <frame label="Timbre" attach-x="0" attach-y="0" shrink-y="1">
         <table rows="1" cols="5" homogeneous="1" spacing="10">
             <vbox attach-x="0" attach-y="0">
diff --git a/gui/gui-organ.xml b/gui/gui-organ.xml
index 6317fee..450ae4c 100644
--- a/gui/gui-organ.xml
+++ b/gui/gui-organ.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<vbox border="10">
+<vbox>
   <hbox>
     <if cond="directlink">
       <align scale-x="0.0" scale-y="1.0" align-x="0" align-y="0">
diff --git a/gui/gui-phaser.xml b/gui/gui-phaser.xml
index efb55be..58d07c0 100644
--- a/gui/gui-phaser.xml
+++ b/gui/gui-phaser.xml
@@ -1,4 +1,4 @@
-<table border="10" cols="1" rows="2">
+<table cols="1" rows="2">
     <frame label="Timbre" attach-x="0" attach-y="0" shrink-y="1">
         <vbox>
             <table rows="2" cols="3" homogeneous="1" spacing="10">
diff --git a/gui/gui-reverb.xml b/gui/gui-reverb.xml
index 51ae4cb..5dfbfd2 100644
--- a/gui/gui-reverb.xml
+++ b/gui/gui-reverb.xml
@@ -1,4 +1,4 @@
-<vbox border="10">
+<vbox>
     <hbox>
         <vbox border="5">
             <label param="predelay" />
diff --git a/gui/gui-vintagedelay.xml b/gui/gui-vintagedelay.xml
index ee2908a..58ac5bf 100644
--- a/gui/gui-vintagedelay.xml
+++ b/gui/gui-vintagedelay.xml
@@ -1,4 +1,4 @@
-<vbox border="10">
+<vbox>
     <frame label="Delay time">
         <vbox>
             <table rows="4" cols="3" border="5">
diff --git a/gui/gui-wavetable.xml b/gui/gui-wavetable.xml
index c79ea7b..aaba214 100644
--- a/gui/gui-wavetable.xml
+++ b/gui/gui-wavetable.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<vbox border="10">
+<vbox >
   <frame label="Oscillators">
     <vbox border="10" spacing="10">
       <table rows="5" cols="6">
diff --git a/gui/logo.png b/gui/logo.png
deleted file mode 100644
index 1fa5134..0000000
Binary files a/gui/logo.png and /dev/null differ
diff --git a/gui/monosynth.png b/gui/monosynth.png
deleted file mode 100644
index e05bf75..0000000
Binary files a/gui/monosynth.png and /dev/null differ
diff --git a/gui/multibandcompressor.png b/gui/multibandcompressor.png
deleted file mode 100644
index ce731c2..0000000
Binary files a/gui/multibandcompressor.png and /dev/null differ
diff --git a/gui/multichorus.png b/gui/multichorus.png
deleted file mode 100644
index 5afcf63..0000000
Binary files a/gui/multichorus.png and /dev/null differ
diff --git a/gui/organ.png b/gui/organ.png
deleted file mode 100644
index 737fc89..0000000
Binary files a/gui/organ.png and /dev/null differ
diff --git a/gui/phaser.png b/gui/phaser.png
deleted file mode 100644
index 1828187..0000000
Binary files a/gui/phaser.png and /dev/null differ
diff --git a/gui/reverb.png b/gui/reverb.png
deleted file mode 100644
index 2ce17c5..0000000
Binary files a/gui/reverb.png and /dev/null differ
diff --git a/gui/toggle1.png b/gui/toggle1.png
index 420c1a7..a056e2f 100644
Binary files a/gui/toggle1.png and b/gui/toggle1.png differ
diff --git a/gui/toggle2.png b/gui/toggle2.png
index a48a614..ea92fcb 100644
Binary files a/gui/toggle2.png and b/gui/toggle2.png differ
diff --git a/gui/vintagedelay.png b/gui/vintagedelay.png
deleted file mode 100644
index 1fedc03..0000000
Binary files a/gui/vintagedelay.png and /dev/null differ
diff --git a/src/calf/metadata.h b/src/calf/metadata.h
index fd89b60..87062c5 100644
--- a/src/calf/metadata.h
+++ b/src/calf/metadata.h
@@ -131,7 +131,7 @@ struct monosynth_metadata: public plugin_metadata<monosynth_metadata>
 struct compressor_metadata: public plugin_metadata<compressor_metadata>
 {
     enum { in_count = 2, out_count = 2, support_midi = false, require_midi = false, rt_capable = true };
-    enum { param_threshold, param_ratio, param_attack, param_release, param_makeup, param_knee, param_detection, param_stereo_link, param_aweighting, param_compression, param_peak, param_clip, param_bypass, // param_freq, param_bw, 
+    enum { param_threshold, param_ratio, param_attack, param_release, param_makeup, param_knee, param_detection, param_stereo_link, param_aweighting, param_compression, param_peak, param_clip, param_bypass, param_input,// param_freq, param_bw, 
         param_count };
     PLUGIN_NAME_ID_LABEL("compressor", "compressor", "Compressor")
 };
diff --git a/src/custom_ctl.cpp b/src/custom_ctl.cpp
index 8b8d85f..9a18af0 100644
--- a/src/custom_ctl.cpp
+++ b/src/custom_ctl.cpp
@@ -900,10 +900,10 @@ calf_knob_class_init (CalfKnobClass *klass)
     widget_class->key_release_event = calf_knob_key_release;
     widget_class->scroll_event = calf_knob_scroll;
     GError *error = NULL;
-    klass->knob_image[0] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/knob1.png", &error);
-    klass->knob_image[1] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/knob2.png", &error);
-    klass->knob_image[2] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/knob3.png", &error);
-    klass->knob_image[3] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/knob4.png", &error);
+    klass->knob_image[0] = gdk_pixbuf_new_from_file(PKGLIBDIR "/knob1.png", &error);
+    klass->knob_image[1] = gdk_pixbuf_new_from_file(PKGLIBDIR "/knob2.png", &error);
+    klass->knob_image[2] = gdk_pixbuf_new_from_file(PKGLIBDIR "/knob3.png", &error);
+    klass->knob_image[3] = gdk_pixbuf_new_from_file(PKGLIBDIR "/knob4.png", &error);
     g_assert(klass->knob_image != NULL);
 }
 
@@ -1047,8 +1047,8 @@ calf_toggle_class_init (CalfToggleClass *klass)
     widget_class->button_press_event = calf_toggle_button_press;
     widget_class->key_press_event = calf_toggle_key_press;
     GError *error = NULL;
-    klass->toggle_image[0] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/toggle1.png", &error);
-    klass->toggle_image[1] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/toggle2.png", &error);
+    klass->toggle_image[0] = gdk_pixbuf_new_from_file(PKGLIBDIR "/toggle1.png", &error);
+    klass->toggle_image[1] = gdk_pixbuf_new_from_file(PKGLIBDIR "/toggle2.png", &error);
     g_assert(klass->toggle_image != NULL);
 }
 
diff --git a/src/gui.cpp b/src/gui.cpp
index 38237b1..5cec823 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -342,7 +342,50 @@ GtkWidget *plugin_gui::create_from_xml(plugin_ctl_iface *_plugin, const char *xm
     
     XML_ParserFree(parser);
     last_status_serial_no = plugin->send_status_updates(this, 0);
-    return GTK_WIDGET(top_container->container);
+    
+    // decorations
+    // overall background
+    //GtkWidget *bgImg     = gtk_image_new_from_file(PKGLIBDIR "/background.png");
+    //gtk_widget_set_size_request(GTK_WIDGET(bgImg), 1, 1);
+    
+    // images for left side
+    GtkWidget *nwImg     = gtk_image_new_from_file(PKGLIBDIR "/side_nw.png");
+    GtkWidget *swImg     = gtk_image_new_from_file(PKGLIBDIR "/side_sw.png");
+    GtkWidget *wImg      = gtk_image_new_from_file(PKGLIBDIR "/side_w.png");
+    gtk_widget_set_size_request(GTK_WIDGET(wImg), 56, 1);
+    
+    // images for right side
+    GtkWidget *neImg     = gtk_image_new_from_file(PKGLIBDIR "/side_ne.png");
+    GtkWidget *seImg     = gtk_image_new_from_file(PKGLIBDIR "/side_se.png");
+    GtkWidget *eImg      = gtk_image_new_from_file(PKGLIBDIR "/side_e.png");
+    GtkWidget *logoImg   = gtk_image_new_from_file(PKGLIBDIR "/side_e_logo.png");
+    gtk_widget_set_size_request(GTK_WIDGET(eImg), 56, 1);
+    
+    // pack left box
+    GtkWidget *leftBox = gtk_vbox_new(FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(leftBox), GTK_WIDGET(nwImg), FALSE, FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(leftBox), GTK_WIDGET(wImg), TRUE, TRUE, 0);
+    gtk_box_pack_end(GTK_BOX(leftBox), GTK_WIDGET(swImg), FALSE, FALSE, 0);
+    
+     // pack right box
+    GtkWidget *rightBox = gtk_vbox_new(FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(rightBox), GTK_WIDGET(neImg), FALSE, FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(rightBox), GTK_WIDGET(eImg), TRUE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(rightBox), GTK_WIDGET(logoImg), FALSE, FALSE, 0);
+    gtk_box_pack_end(GTK_BOX(rightBox), GTK_WIDGET(seImg), FALSE, FALSE, 0);
+    
+    GtkWidget *decoTable = gtk_table_new(3, 1, FALSE);
+    
+    //gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(bgImg),     0, 2, 0, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0);
+    gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(leftBox),   0, 1, 0, 1, (GtkAttachOptions)(0), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
+    gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(rightBox),  2, 3, 0, 1, (GtkAttachOptions)(0), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
+    gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(top_container->container), 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 15, 5);
+    
+//    GtkWidget *frame = gtk_frame_new(NULL);
+//    gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
+//    gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(decoTable));
+    
+    return GTK_WIDGET(decoTable);
 }
 
 void plugin_gui::send_configure(const char *key, const char *value)
@@ -624,41 +667,15 @@ void plugin_gui_window::create(plugin_ctl_iface *_jh, const char *title, const c
     assert(xml);
     container = gui->create_from_xml(_jh, xml);
     
-    // decorations
-    GtkWidget *bgImg     = gtk_image_new_from_file(PKGLIBDIR "/gui/pixmaps/background.png");
-    GtkWidget *logoImg   = gtk_image_new_from_file(PKGLIBDIR "/gui/pixmaps/logo.png");
-    GtkWidget *leftImg   = gtk_image_new_from_file(PKGLIBDIR "/gui/pixmaps/grip_left.png");
-    GtkWidget *rightImg  = gtk_image_new_from_file(PKGLIBDIR "/gui/pixmaps/grip_right.png");
-    GtkWidget *bottomImg = gtk_image_new_from_file(PKGLIBDIR "/gui/pixmaps/bottom.png");
-    gchar *titlePath = g_build_filename(PKGLIBDIR, "/gui/titles/", effect, ".png", NULL);
-    printf(effect);
-    GtkWidget *titleImg  = gtk_image_new_from_file(titlePath);
-    
-    GtkWidget *bottomBox = gtk_hbox_new(FALSE, 0);
-    gtk_box_pack_start(GTK_BOX(bottomBox), GTK_WIDGET(logoImg), FALSE, FALSE, 0);
-    gtk_box_pack_end(GTK_BOX(bottomBox), GTK_WIDGET(titleImg), FALSE, FALSE, 0);
-    
-    GtkWidget *decoTable = gtk_table_new(3, 2, FALSE);
-    gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(bgImg),     0, 3, 0, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
-    gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(leftImg),   0, 1, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
-    gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(rightImg),  2, 3, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
-    gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(bottomImg), 0, 3, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
-    gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(bottomBox), 0, 3, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
-    gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(container), 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
-    
-    string command_xml = make_gui_command_list(command_actions);
-    gtk_ui_manager_insert_action_group(ui_mgr, command_actions, 0);
-    gtk_ui_manager_add_ui_from_string(ui_mgr, command_xml.c_str(), -1, &error);    
-    
     GtkWidget *sw = gtk_scrolled_window_new(NULL, NULL);
     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
     gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_NONE);
-    gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), GTK_WIDGET(decoTable));
+    gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), GTK_WIDGET(container));
     
     gtk_box_pack_start(GTK_BOX(vbox), sw, true, true, 0);
     
     gtk_widget_show_all(GTK_WIDGET(sw));
-    gtk_widget_size_request(GTK_WIDGET(decoTable), &req);
+    gtk_widget_size_request(GTK_WIDGET(container), &req);
     int wx = max(req.width + 10, req2.width);
     int wy = req.height + req2.height + 10;
     // printf("size request %dx%d\n", req.width, req.height);
diff --git a/src/modules.cpp b/src/modules.cpp
index bc15225..0b08175 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -227,6 +227,7 @@ CALF_PORT_PROPS(compressor) = {
     { 0,      0,  1,    0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_METER | PF_CTLO_LABEL | PF_UNIT_DB | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "peak", "Peak Output" },
     { 0,      0,  1,    0, PF_FLOAT | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "clip", "0dB" },
     { 0,      0,  1,    0, PF_BOOL | PF_CTL_TOGGLE, NULL, "bypass", "Bypass" },
+    { 1,           0,           64,    0,  PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_NOBOUNDS, NULL, "input", "Input" },
     // { 2000,      10,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ | PF_PROP_GRAPH, NULL, "deess_freq", "Frequency" },
     // { 0.707,  0.707,   32,    0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF, NULL, "deess_res", "Q" },
 };
diff --git a/src/modules_dsp.cpp b/src/modules_dsp.cpp
index 6f9fc83..16ff4e1 100644
--- a/src/modules_dsp.cpp
+++ b/src/modules_dsp.cpp
@@ -581,8 +581,8 @@ uint32_t compressor_audio_module::process(uint32_t offset, uint32_t numsamples,
     clip -= std::min(clip, numsamples);
 
     while(offset < numsamples) {
-        float left = ins[0][offset];
-        float right = ins[1][offset];
+        float left = ins[0][offset] * *params[param_input];
+        float right = ins[1][offset] * *params[param_input];
         
         if(aweighting == 1) {
             left = awL.process(left);

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list