Mostly ALSA fixing - Alex
authorterminatorX <>
Fri, 28 Mar 2003 19:16:44 +0000 (19:16 +0000)
committerterminatorX <>
Fri, 28 Mar 2003 19:16:44 +0000 (19:16 +0000)
18 files changed:
README
TODO
doc/terminatorX-manual/C/terminatorX-manual.xml
src/tX_audiodevice.cc
src/tX_audiodevice.h
src/tX_dialog.cc
src/tX_engine.cc
src/tX_glade_interface.cc
src/tX_global.c
src/tX_global.h
src/tX_mastergui.cc
src/tX_midiin.cc
src/tX_midiin.h
src/tX_sequencer.cc
src/tX_sequencer.h
src/tX_vtt.cc
src/tX_vtt.h
terminatorX.glade

diff --git a/README b/README
index 397279b2b1ed54061c6f969b9e2c2229bc1b8ff4..f37dc1d65eb9d1520055f6fc76cbd1aa4cc331e8 100644 (file)
--- a/README
+++ b/README
@@ -1,9 +1,9 @@
-terminatorX V3.73 README
+terminatorX V3.80 README
 ------------------------
 
-Copyright (C) 1999 - 2002 Alexander König
+Copyright (C) 1999 - 2003 Alexander König
 eMail: alex@lisas.de
-Homepage: http://www.terminatorX.cx
+Homepage: http://terminatorX.cx
 
 This is free software see the COPYING file that came with this
 distribution for details.
@@ -18,6 +18,7 @@ Read that fine Manual:
     o ./INSTALL             - Information on installing terminatorX
     o ./README.GNOME        - Some hints on GNOME-integration
     o ./README.PERFORMANCE  - Some hints on tuning terminatorX
-    o ./doc/index.html      - The index for the HTML version of the manual
-    o ./doc/manual.ps       - The postscript version of the manual
+    o ./doc/terminatorX-manual/C/terminatorX-manual.xml
+                           - The user manual browsable with "yelp"
+                             (yelp is the gnome2 help browser).
     o ./COPYING             - The license
diff --git a/TODO b/TODO
index dbfebcd40bb2631bfe9c0b511004bdddecd804ab..fbe0fffc9ccf3e0fa49f14b6311cbcf4d9d36d04 100644 (file)
--- a/TODO
+++ b/TODO
@@ -8,21 +8,10 @@ High priority milestones:
 
 I'd like to have this in 4.0:
 
-- Rewrite the audio device layer, so that terminatorX operates at a fix block
-  size - this will allow correct playback of sequencer events even if played
-  back on a different soundcard then recorded.
-
-- Support ALSA drivers and allow usage of multiple audio devices at the same 
-  time.
-  
-- Switch the terminatorX set file format to XML so that sets recorded on one
-  platform can be loaded on other platforms, too.
+- Write a JACK audio backend.
 
 - Support stereo LADSPA plugins somehow.
 
-- Move the "main buttons" on the top right to a menu bar in order to get the
-  GUI even more flexible.
-
 Low priority milestones:
 ------------------------
 
@@ -32,10 +21,25 @@ This might come after 4.0:
 
 - Find a replacement for DGA mouse grabbing as that has some problems and 
   might be gone sometime from now.
+    
+- Support other languages.
+
+--- Ok, the follownig points are already implemented:
+
+- Rewrite the audio device layer, so that terminatorX operates at a fix block
+  size - this will allow correct playback of sequencer events even if played
+  back on a different soundcard then recorded.
+
+- Support ALSA drivers and allow usage of multiple audio devices at the same 
+  time.
+  
+- Switch the terminatorX set file format to XML so that sets recorded on one
+  platform can be loaded on other platforms, too.
   
+- Move the "main buttons" on the top right to a menu bar in order to get the
+  GUI even more flexible.
+
 - Provide a MIDI interface to terminatorX.
 
 - Use libaudiofile, libvorbis, etc. for file loading to get rid of "piped
   loading" and accelerate loading of ogg and mp3 files this way.
-  
-- Support other languages.
index 21a284ca89d8bd8b6c8a3a34ff5477df0ceec33a..7991591e7fcf7cb75dbe48e5af11a4f882546cc6 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY legal SYSTEM "legal.xml">
 
 ]>
-<article id="index" lang="en">
+<article lang="en" id="index">
   <articleinfo>
     <title>terminatorX - Manual</title>
 
@@ -97,7 +97,7 @@
 
       <para>Try the following steps:</para>
 
-      <orderedlist continuation="restarts" inheritnum="ignore">
+      <orderedlist inheritnum="ignore" continuation="restarts">
         <listitem>
           <para>If you don&#39;t have <application moreinfo="none">LADSPA</application>
           (Linux Audio Developer&#39;s Simple Plugin API) installed, go and
     <sect2>
       <title><emphasis>Audio: ALSA</emphasis> Tab</title>
 
-      <para>Configuring the ALSA backend works pretty similar to configuring
-      the OSS backend (see above) - except that ALSA doesn&#39;t use crappy
-      &#34;2^x&#34; semantics for the buffer size setting: you can specify the
-      buffer size in plain bytes.</para>
+      <para>Using ALSA for audio output allows specifing the buffer sizes in
+      microseconds. ALSA uses a ring-buffer to process audio. The
+      <emphasis>Buffer Time</emphasis> option lets you set the size for the
+      complete ring buffer, while the <emphasis>Period Time</emphasis>
+      determines how many audio samples will be transferred to the audio
+      device per cycle.</para>
+
+      <para>It&#39;s advisable to set the <emphasis>Buffer Time</emphasis> to
+      at least the double of the <emphasis>Period Time</emphasis>, but for a
+      more detailed description check out the ALSA documentation.</para>
     </sect2>
 
     <sect2>
index 6c8e296b4136c55f74018e4b4ca199bb696c32cc..b42f9c38dfc4971b47cf23dcc5c8a493e04fc156 100644 (file)
@@ -217,7 +217,11 @@ int tX_audiodevice_alsa :: open()
        }
        
        /* Setting INTERLEAVED stereo... */
+#ifdef USE_ALSA_MEMCPY
        if (snd_pcm_hw_params_set_access(pcm_handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED) < 0) {
+#else
+       if (snd_pcm_hw_params_set_access(pcm_handle, hw_params, SND_PCM_ACCESS_MMAP_INTERLEAVED) < 0) {
+#endif 
                tX_error("ALSA: Failed to set interleaved access for PCM device \"%s\"", pcm_name);
                snd_pcm_hw_params_free (hw_params);
                return -1;
@@ -248,34 +252,36 @@ int tX_audiodevice_alsa :: open()
                snd_pcm_hw_params_free (hw_params);
                return -1;
        }
-
-       /* Setting the number of buffers... */
-       /* if (snd_pcm_hw_params_set_periods(pcm_handle, hw_params, globals.alsa_buff_no, 0) < 0) {
-               tX_error("ALSA: Failed to set %i periods for PCM device \"%s\"", globals.alsa_buff_no, pcm_name);
-               snd_pcm_hw_params_free (hw_params);
+       
+       unsigned int buffer_time=globals.alsa_buffer_time;
+       unsigned int period_time=globals.alsa_period_time;
+       
+       if (snd_pcm_hw_params_set_buffer_time_near(pcm_handle, hw_params, &buffer_time, &dir) < 0) {
+               tX_error("ALSA: failed to set the buffer time opf %lu usecs", globals.alsa_buffer_time);
                return -1;
-       } */
+       }
 
-       /* Setting the buffersize - ALSA cripples my mind, really... */
-       long unsigned int samples;
-       long unsigned int periodsize;
+       long unsigned int buffer_size;
 
-       periodsize = globals.alsa_buff_size * 2;
+       if (snd_pcm_hw_params_get_buffer_size(hw_params, &buffer_size) < 0) {
+               tX_error("ALSA: failed to retreive buffer size");
+               return -1;
+       }
+       
+       tX_debug("ALSA: buffer size is %i", buffer_size);
        
-       samples = snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hw_params, &periodsize);
-       if (samples < 0) {
-               tX_error("ALSA: Failed to set buffersize %li", globals.alsa_buff_size);
+       if (snd_pcm_hw_params_set_period_time_near(pcm_handle, hw_params, &period_time, &dir) < 0) {
+               tX_error("ALSA: failed to set period time %i", globals.alsa_period_time);
                return -1;
        }
-
-       samples_per_buffer=periodsize;//hw_buffsize/sizeof(int16_t);
        
-       periodsize /= 2;
-       if (snd_pcm_hw_params_set_period_size_near(pcm_handle, hw_params, &periodsize, 0) < 0) {
-               tX_error("ALSA: Failed to set periodsize %li", periodsize);
+       if (snd_pcm_hw_params_get_period_size(hw_params, &period_size, &dir)<0) {
+               tX_error("ALSA: failed to retreive period size");
                return -1;
        }
-
+       
+       samples_per_buffer=period_size;
+       
        /* Apply all that setup work.. */
        if (snd_pcm_hw_params(pcm_handle, hw_params) < 0) {
                tX_error("ALSA: Failed to apply settings to PCM device \"%s\"", pcm_name);
@@ -283,8 +289,6 @@ int tX_audiodevice_alsa :: open()
                return -1;
        }
        
-       tX_debug("ALSA: samples_per_buffer: %i, period=%i", samples_per_buffer, periodsize);
-       
        snd_pcm_hw_params_free (hw_params);
        return 0;
 }
@@ -312,11 +316,20 @@ void tX_audiodevice_alsa :: play(int16_t *buffer)
        swapbuffer (buffer, samples_per_buffer);
 #endif
        
-       pcmreturn = snd_pcm_writei(pcm_handle, buffer, samples_per_buffer/2);
+#ifdef USE_ALSA_MEMCPY
+       pcmreturn = snd_pcm_writei(pcm_handle, buffer, samples_per_buffer >> 1);
+#else  
+       pcmreturn = snd_pcm_mmap_writei(pcm_handle, buffer, samples_per_buffer >> 1);
+#endif
        
        while (pcmreturn==-EPIPE) {
                snd_pcm_prepare(pcm_handle);
-               pcmreturn=snd_pcm_writei(pcm_handle, buffer, samples_per_buffer/2);
+               
+#ifdef USE_ALSA_MEMCPY
+               pcmreturn = snd_pcm_writei(pcm_handle, buffer, samples_per_buffer >> 1);
+#else  
+               pcmreturn = snd_pcm_mmap_writei(pcm_handle, buffer, samples_per_buffer >> 1);
+#endif
                //tX_warning("ALSA: ** buffer underrun **");
        }
        
index b9efb8b2ede436d1624e5260c610f636cb1c50e6..30da6c9c72136d669dcfc71c6a857aaea2f8c821 100644 (file)
@@ -92,6 +92,7 @@ class tX_audiodevice_oss : public tX_audiodevice
 class tX_audiodevice_alsa : public tX_audiodevice
 {
        snd_pcm_t *pcm_handle;
+       snd_pcm_uframes_t period_size;
        
        public:
        virtual int open();
index b161c62bd2783d8a05f9cb0d285040dc46bffe58..4c9aef8331a3bb9005a2baed729558574fb2e8f3 100644 (file)
@@ -70,8 +70,10 @@ void apply_options(GtkWidget *dialog) {
        
        /* Audio: ALSA */
        strcpy(globals.alsa_device, gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "alsa_audio_device"))->entry)));
-       globals.alsa_buff_no=(int) gtk_spin_button_get_value(GTK_SPIN_BUTTON(lookup_widget(dialog, "alsa_buffers")));
-       globals.alsa_buff_size=(int) gtk_range_get_value(GTK_RANGE(lookup_widget(dialog, "alsa_buffersize")));
+       globals.alsa_buffer_time=(int) gtk_range_get_value(GTK_RANGE(lookup_widget(dialog, "alsa_buffer_time")));
+       globals.alsa_buffer_time*=1000;
+       globals.alsa_period_time=(int) gtk_range_get_value(GTK_RANGE(lookup_widget(dialog, "alsa_period_time")));
+       globals.alsa_period_time*=1000;
        globals.alsa_samplerate=atoi(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "alsa_samplerate"))->entry)));        
        
        /* TODO: JACK
@@ -294,8 +296,8 @@ void init_tx_options(GtkWidget *dialog) {
        gtk_combo_set_popdown_strings(GTK_COMBO(lookup_widget(dialog, "alsa_audio_device")), get_alsa_device_list());
        gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "alsa_audio_device"))->entry), globals.alsa_device);
 
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(lookup_widget(dialog, "alsa_buffers")), globals.alsa_buff_no);
-       gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "alsa_buffersize")), globals.alsa_buff_size);
+       gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "alsa_buffer_time")), globals.alsa_buffer_time/1000);
+       gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "alsa_period_time")), globals.alsa_period_time/1000);
 
        gtk_combo_set_popdown_strings(GTK_COMBO(lookup_widget(dialog, "alsa_samplerate")), get_sampling_rates_list());
        sprintf(tmp, "%i", globals.alsa_samplerate);
@@ -347,6 +349,7 @@ void init_tx_options(GtkWidget *dialog) {
 void create_options()
 {
        opt_dialog=create_tx_options();
+       gtk_widget_hide(lookup_widget(opt_dialog, "jack_driver"));      
        init_tx_options(opt_dialog);
        gtk_widget_show(opt_dialog);
 }
@@ -441,8 +444,6 @@ void show_about(int nag)
 
        pwid = gtk_pixmap_new( pmap, mask );
        
-       printf("pixmap: %08x %08x.\n", pwid, pmap);
-       
        if (nag) {
                GtkWidget *box=gtk_vbox_new(FALSE, 2);
                GtkWidget *box2=gtk_hbox_new(FALSE, 2);
index 9c68e178cefb7de5034e9a13be4f39b9c2e0831c..0b48a3095cf348c0eb61f01f6b39be4ea7d23548 100644 (file)
@@ -233,14 +233,12 @@ tX_engine_error tX_engine :: run() {
        switch (globals.audiodevice_type) {
 #ifdef USE_OSS 
                case OSS:
-                       puts("Using OSS output...");
                        device=new tX_audiodevice_oss(); 
                break;
 #endif                 
 
 #ifdef USE_ALSA                        
                case ALSA:
-                       puts("Using ALSA output...");
                        device=new tX_audiodevice_alsa(); 
                break;
 #endif
index c34a71f8e158d6df7d250bde55dd22f9de487096..d579f627843a484ca4a28eb84b6914e0cab2c5fd 100644 (file)
@@ -39,10 +39,6 @@ create_tx_options (void)
   GSList *oss_driver_group = NULL;
   GtkWidget *alsa_driver;
   GtkWidget *jack_driver;
-  GtkWidget *label19;
-  GtkWidget *hbox3;
-  GtkWidget *measure_latency;
-  GtkWidget *label20;
   GtkWidget *label1;
   GtkWidget *table5;
   GtkWidget *label21;
@@ -59,19 +55,16 @@ create_tx_options (void)
   GtkWidget *label15;
   GtkWidget *table6;
   GtkWidget *label27;
-  GtkWidget *label28;
   GtkWidget *label29;
   GtkWidget *label30;
   GtkWidget *alsa_audio_device;
   GtkWidget *combo_entry4;
-  GtkObject *alsa_buffers_adj;
-  GtkWidget *alsa_buffers;
   GtkWidget *alsa_samplerate;
   GtkWidget *combo_entry5;
-  GtkWidget *alsa_buffersize;
+  GtkWidget *alsa_period_time;
+  GtkWidget *label32;
+  GtkWidget *alsa_buffer_time;
   GtkWidget *label16;
-  GtkWidget *empty_notebook_page;
-  GtkWidget *label17;
   GtkWidget *table1;
   GtkWidget *label5;
   GtkWidget *label6;
@@ -127,7 +120,7 @@ create_tx_options (void)
   gtk_widget_show (notebook1);
   gtk_box_pack_start (GTK_BOX (dialog_vbox1), notebook1, TRUE, TRUE, 0);
 
-  table4 = gtk_table_new (2, 2, FALSE);
+  table4 = gtk_table_new (1, 2, FALSE);
   gtk_widget_show (table4);
   gtk_container_add (GTK_CONTAINER (notebook1), table4);
   gtk_container_set_border_width (GTK_CONTAINER (table4), 4);
@@ -169,29 +162,6 @@ create_tx_options (void)
   gtk_radio_button_set_group (GTK_RADIO_BUTTON (jack_driver), oss_driver_group);
   oss_driver_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (jack_driver));
 
-  label19 = gtk_label_new ("Latency:");
-  gtk_widget_show (label19);
-  gtk_table_attach (GTK_TABLE (table4), label19, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_label_set_justify (GTK_LABEL (label19), GTK_JUSTIFY_LEFT);
-  gtk_misc_set_alignment (GTK_MISC (label19), 0, 0.5);
-
-  hbox3 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox3);
-  gtk_table_attach (GTK_TABLE (table4), hbox3, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  measure_latency = gtk_button_new_with_mnemonic ("Measure");
-  gtk_widget_show (measure_latency);
-  gtk_box_pack_start (GTK_BOX (hbox3), measure_latency, FALSE, FALSE, 0);
-
-  label20 = gtk_label_new ("-- ms");
-  gtk_widget_show (label20);
-  gtk_box_pack_start (GTK_BOX (hbox3), label20, TRUE, TRUE, 0);
-  gtk_label_set_justify (GTK_LABEL (label20), GTK_JUSTIFY_LEFT);
-
   label1 = gtk_label_new ("Audio");
   gtk_widget_show (label1);
   gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label1);
@@ -256,7 +226,7 @@ create_tx_options (void)
                     (GtkAttachOptions) (0), 0, 0);
   gtk_tooltips_set_tip (tooltips, oss_buffers, "Sets the number of kernel level audio buffers. Actually most systems should run just fine with two.", NULL);
 
-  oss_buffersize = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (5, 1, 16, 1, 1, 1)));
+  oss_buffersize = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (9, 8, 16, 1, 1, 1)));
   gtk_widget_show (oss_buffersize);
   gtk_table_attach (GTK_TABLE (table5), oss_buffersize, 1, 2, 2, 3,
                     (GtkAttachOptions) (GTK_FILL),
@@ -295,15 +265,7 @@ create_tx_options (void)
   gtk_label_set_justify (GTK_LABEL (label27), GTK_JUSTIFY_LEFT);
   gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5);
 
-  label28 = gtk_label_new ("No. of buffers:");
-  gtk_widget_show (label28);
-  gtk_table_attach (GTK_TABLE (table6), label28, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_label_set_justify (GTK_LABEL (label28), GTK_JUSTIFY_LEFT);
-  gtk_misc_set_alignment (GTK_MISC (label28), 0, 0.5);
-
-  label29 = gtk_label_new ("Buffersize (samples):");
+  label29 = gtk_label_new ("Period Time (ms):");
   gtk_widget_show (label29);
   gtk_table_attach (GTK_TABLE (table6), label29, 0, 1, 2, 3,
                     (GtkAttachOptions) (GTK_FILL),
@@ -330,13 +292,6 @@ create_tx_options (void)
   combo_entry4 = GTK_COMBO (alsa_audio_device)->entry;
   gtk_widget_show (combo_entry4);
 
-  alsa_buffers_adj = gtk_adjustment_new (2, 2, 5, 1, 2, 2);
-  alsa_buffers = gtk_spin_button_new (GTK_ADJUSTMENT (alsa_buffers_adj), 1, 0);
-  gtk_widget_show (alsa_buffers);
-  gtk_table_attach (GTK_TABLE (table6), alsa_buffers, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-
   alsa_samplerate = gtk_combo_new ();
   g_object_set_data (G_OBJECT (GTK_COMBO (alsa_samplerate)->popwin),
                      "GladeParentKey", alsa_samplerate);
@@ -348,27 +303,33 @@ create_tx_options (void)
   combo_entry5 = GTK_COMBO (alsa_samplerate)->entry;
   gtk_widget_show (combo_entry5);
 
-  alsa_buffersize = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (1024, 64, 512, 32, 64, 64)));
-  gtk_widget_show (alsa_buffersize);
-  gtk_table_attach (GTK_TABLE (table6), alsa_buffersize, 1, 2, 2, 3,
+  alsa_period_time = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (29, 10, 500, 1, 10, 10)));
+  gtk_widget_show (alsa_period_time);
+  gtk_table_attach (GTK_TABLE (table6), alsa_period_time, 1, 2, 2, 3,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (GTK_FILL), 0, 0);
-  gtk_scale_set_digits (GTK_SCALE (alsa_buffersize), 0);
+  gtk_scale_set_digits (GTK_SCALE (alsa_period_time), 0);
+
+  label32 = gtk_label_new ("Buffer Time (ms):");
+  gtk_widget_show (label32);
+  gtk_table_attach (GTK_TABLE (table6), label32, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label32), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label32), 0, 0.5);
+
+  alsa_buffer_time = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (50, 10, 500, 1, 10, 10)));
+  gtk_widget_show (alsa_buffer_time);
+  gtk_table_attach (GTK_TABLE (table6), alsa_buffer_time, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_FILL), 0, 0);
+  gtk_scale_set_digits (GTK_SCALE (alsa_buffer_time), 0);
 
   label16 = gtk_label_new ("Audio: ALSA");
   gtk_widget_show (label16);
   gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label16);
   gtk_label_set_justify (GTK_LABEL (label16), GTK_JUSTIFY_LEFT);
 
-  empty_notebook_page = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (empty_notebook_page);
-  gtk_container_add (GTK_CONTAINER (notebook1), empty_notebook_page);
-
-  label17 = gtk_label_new ("Audio: JACK");
-  gtk_widget_show (label17);
-  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 3), label17);
-  gtk_label_set_justify (GTK_LABEL (label17), GTK_JUSTIFY_LEFT);
-
   table1 = gtk_table_new (4, 2, FALSE);
   gtk_widget_show (table1);
   gtk_container_add (GTK_CONTAINER (notebook1), table1);
@@ -442,7 +403,7 @@ create_tx_options (void)
 
   label4 = gtk_label_new ("Input");
   gtk_widget_show (label4);
-  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 4), label4);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 3), label4);
   gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_LEFT);
 
   table2 = gtk_table_new (6, 2, FALSE);
@@ -559,7 +520,7 @@ create_tx_options (void)
 
   label2 = gtk_label_new ("User Interface");
   gtk_widget_show (label2);
-  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 5), label2);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 4), label2);
   gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
 
   table3 = gtk_table_new (3, 2, FALSE);
@@ -615,7 +576,7 @@ create_tx_options (void)
 
   label3 = gtk_label_new ("Misc");
   gtk_widget_show (label3);
-  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 6), label3);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 5), label3);
   gtk_label_set_justify (GTK_LABEL (label3), GTK_JUSTIFY_LEFT);
 
   dialog_action_area1 = GTK_DIALOG (tx_options)->action_area;
@@ -660,10 +621,6 @@ create_tx_options (void)
   GLADE_HOOKUP_OBJECT (tx_options, oss_driver, "oss_driver");
   GLADE_HOOKUP_OBJECT (tx_options, alsa_driver, "alsa_driver");
   GLADE_HOOKUP_OBJECT (tx_options, jack_driver, "jack_driver");
-  GLADE_HOOKUP_OBJECT (tx_options, label19, "label19");
-  GLADE_HOOKUP_OBJECT (tx_options, hbox3, "hbox3");
-  GLADE_HOOKUP_OBJECT (tx_options, measure_latency, "measure_latency");
-  GLADE_HOOKUP_OBJECT (tx_options, label20, "label20");
   GLADE_HOOKUP_OBJECT (tx_options, label1, "label1");
   GLADE_HOOKUP_OBJECT (tx_options, table5, "table5");
   GLADE_HOOKUP_OBJECT (tx_options, label21, "label21");
@@ -679,17 +636,16 @@ create_tx_options (void)
   GLADE_HOOKUP_OBJECT (tx_options, label15, "label15");
   GLADE_HOOKUP_OBJECT (tx_options, table6, "table6");
   GLADE_HOOKUP_OBJECT (tx_options, label27, "label27");
-  GLADE_HOOKUP_OBJECT (tx_options, label28, "label28");
   GLADE_HOOKUP_OBJECT (tx_options, label29, "label29");
   GLADE_HOOKUP_OBJECT (tx_options, label30, "label30");
   GLADE_HOOKUP_OBJECT (tx_options, alsa_audio_device, "alsa_audio_device");
   GLADE_HOOKUP_OBJECT (tx_options, combo_entry4, "combo_entry4");
-  GLADE_HOOKUP_OBJECT (tx_options, alsa_buffers, "alsa_buffers");
   GLADE_HOOKUP_OBJECT (tx_options, alsa_samplerate, "alsa_samplerate");
   GLADE_HOOKUP_OBJECT (tx_options, combo_entry5, "combo_entry5");
-  GLADE_HOOKUP_OBJECT (tx_options, alsa_buffersize, "alsa_buffersize");
+  GLADE_HOOKUP_OBJECT (tx_options, alsa_period_time, "alsa_period_time");
+  GLADE_HOOKUP_OBJECT (tx_options, label32, "label32");
+  GLADE_HOOKUP_OBJECT (tx_options, alsa_buffer_time, "alsa_buffer_time");
   GLADE_HOOKUP_OBJECT (tx_options, label16, "label16");
-  GLADE_HOOKUP_OBJECT (tx_options, label17, "label17");
   GLADE_HOOKUP_OBJECT (tx_options, table1, "table1");
   GLADE_HOOKUP_OBJECT (tx_options, label5, "label5");
   GLADE_HOOKUP_OBJECT (tx_options, label6, "label6");
index a27fb731a77a76978210edbc2cab9ad258b19952..d5ae85ddc25441f05e880d9386c29011c9e0a604 100644 (file)
@@ -81,8 +81,8 @@ void set_global_defaults() {
        globals.oss_samplerate=44100;
 
        strcpy(globals.alsa_device, "00-00: Default");  
-       globals.alsa_buff_no=2;
-       globals.alsa_buff_size=1024;
+       globals.alsa_buffer_time=10000;
+       globals.alsa_period_time=5000;
        globals.alsa_samplerate=44100;
        
        globals.sense_cycles=12;
@@ -178,8 +178,8 @@ int load_globals_xml() {
                        restore_int("oss_samplerate", globals.oss_samplerate);
 
                        restore_string("alsa_device", globals.alsa_device);
-                       restore_int("alsa_buff_no", globals.alsa_buff_no);
-                       restore_int("alsa_buff_size", globals.alsa_buff_size);
+                       restore_int("alsa_buffer_time", globals.alsa_buffer_time);
+                       restore_int("alsa_period_time", globals.alsa_period_time);
                        restore_int("alsa_samplerate", globals.alsa_samplerate);
 
                        restore_string("xinput_device", globals.xinput_device);
@@ -260,8 +260,8 @@ void store_globals() {
                store_int("oss_samplerate", globals.oss_samplerate);
 
                store_string("alsa_device", globals.alsa_device);
-               store_int("alsa_buff_no", globals.alsa_buff_no);
-               store_int("alsa_buff_size", globals.alsa_buff_size);
+               store_int("alsa_buffer_time", globals.alsa_buffer_time);
+               store_int("alsa_period_time", globals.alsa_period_time);
                store_int("alsa_samplerate", globals.alsa_samplerate);          
                
                store_string("xinput_device", globals.xinput_device);
index 400e531f1bf5db514fbb1ecee6a327f222482f37..fedcd3dc4250018645fce50f3195201705b21175 100644 (file)
@@ -127,8 +127,8 @@ typedef struct {
        
        /* ALSA specific options */
        char alsa_device[PATH_MAX];
-       int alsa_buff_no;
-       int alsa_buff_size; // In Samples
+       int alsa_buffer_time;
+       int alsa_period_time;
        int alsa_samplerate;
        
        char lrdf_path[PATH_MAX];
index a08a4d557bc3a1b1b3c56cb7a4a2f30d66eec57f..7902397b966623806f5521c5fecdc5009a81289f 100644 (file)
@@ -271,6 +271,28 @@ GtkSignalFunc drop_new_table(GtkWidget *widget, GdkDragContext *context,
        return NULL;
 }
 
+bool tx_mg_have_setname=false;
+char tx_mg_current_setname[PATH_MAX]="";
+
+GtkSignalFunc new_tables() {
+       GtkWidget *dialog=gtk_message_dialog_new(GTK_WINDOW(main_window), 
+               GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
+               "Are you sure you want to loose all turntables and events?");
+       
+       int res=gtk_dialog_run(GTK_DIALOG(dialog));
+       gtk_widget_destroy(dialog);
+               
+       if (res!=GTK_RESPONSE_YES) {
+               return NULL;
+       }
+
+       vtt_class::delete_all();
+       new_table(NULL, NULL);
+       sequencer.delete_all_events();
+       gtk_window_set_title(GTK_WINDOW(main_window), "terminatorX");
+
+       return NULL;
+}
 
 /* Loading saved setups */
 
@@ -341,6 +363,9 @@ void load_tt_part(char * buffer)
        }
 #endif 
        
+       tx_mg_have_setname=true;
+       strcpy(tx_mg_current_setname, buffer);
+       
        tX_seqpar :: init_all_graphics();
        vg_init_all_non_seqpars();
                
@@ -433,13 +458,20 @@ void do_save_tables(GtkWidget *wid)
        char wbuf[PATH_MAX];
        char *ext;
        
-       strcpy(buffer, gtk_file_selection_get_filename(GTK_FILE_SELECTION(save_dialog)));
-       strcpy(globals.tables_filename, buffer);
-       
-       gtk_widget_destroy(save_dialog);
-       
-       save_dialog=NULL;
-       save_dialog_win=NULL;
+       if (wid) {
+               strcpy(buffer, gtk_file_selection_get_filename(GTK_FILE_SELECTION(save_dialog)));
+               int len=strlen(buffer);
+               if (!len || (buffer[len-1]=='/')) {                     
+                       tx_note("Invalid filename for set file.", true);                        
+                       return;
+               }
+               strcpy(globals.tables_filename, buffer);
+               gtk_widget_destroy(save_dialog);
+               save_dialog=NULL;
+               save_dialog_win=NULL;
+       } else {
+               strcpy(buffer, tx_mg_current_setname);
+       }
        
        ext=strrchr(buffer, '.');
        
@@ -451,6 +483,9 @@ void do_save_tables(GtkWidget *wid)
        {
                strcat(buffer, ".tX");
        }
+
+       tx_mg_have_setname=true;
+       strcpy(tx_mg_current_setname, buffer);
        
        out=fopen(buffer, "w");
        
@@ -467,19 +502,18 @@ void do_save_tables(GtkWidget *wid)
        }
 }
 
-GtkSignalFunc save_tables()
+GtkSignalFunc save_tables_as()
 {
-       if (save_dialog_win) 
-       {
-               gdk_window_raise(save_dialog_win);
-               return 0;
+       if (save_dialog_win) {
+               gtk_widget_destroy(save_dialog);
+               save_dialog=NULL;
+               save_dialog_win=NULL;
        }
        
        save_dialog=gtk_file_selection_new("Save Set"); 
-       
-       if (strlen(globals.tables_filename))
-       {
-               gtk_file_selection_set_filename(GTK_FILE_SELECTION(save_dialog), globals.tables_filename);
+
+       if (tx_mg_have_setname) {
+               gtk_file_selection_set_filename(GTK_FILE_SELECTION(save_dialog), tx_mg_current_setname);
        }
        
        gtk_widget_show(save_dialog);
@@ -493,6 +527,17 @@ GtkSignalFunc save_tables()
        return NULL;
 }
 
+GtkSignalFunc save_tables()
+{
+       if (!tx_mg_have_setname) {
+               save_tables_as();
+       } else {
+               do_save_tables(NULL);
+       }
+       
+       return NULL;
+}
+
 GtkSignalFunc master_volume_changed (GtkWidget *wid, void *d)
 {
        sp_master_volume.receive_gui_value((float) 2.0-GTK_ADJUSTMENT(wid)->value);
@@ -671,6 +716,17 @@ void grab_off()
 
 void quit()
 {
+       GtkWidget *dialog=gtk_message_dialog_new(GTK_WINDOW(main_window), 
+       GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
+       "Exit terminatorX and loose all unsaved data?");
+       
+       int res=gtk_dialog_run(GTK_DIALOG(dialog));
+       gtk_widget_destroy(dialog);
+               
+       if (res!=GTK_RESPONSE_YES) {
+               return;
+       }
+
        turn_audio_off();
        if (update_tag)
        gtk_timeout_remove(update_tag);
@@ -822,6 +878,7 @@ void create_master_menu() {
        menu_item = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
        gtk_widget_show (menu_item);
        gtk_container_add (GTK_CONTAINER (sub_menu), menu_item);
+       g_signal_connect(menu_item, "activate", (GCallback) new_tables, NULL);
 
        menu_item = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
        gtk_widget_show (menu_item);
@@ -833,9 +890,10 @@ void create_master_menu() {
        gtk_container_add (GTK_CONTAINER (sub_menu), menu_item);
        g_signal_connect(menu_item, "activate", (GCallback) save_tables, NULL);
 
-       /*menu_item = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
+       menu_item = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
        gtk_widget_show (menu_item);
-       gtk_container_add (GTK_CONTAINER (sub_menu), menu_item);*/
+       gtk_container_add (GTK_CONTAINER (sub_menu), menu_item);
+       g_signal_connect(menu_item, "activate", (GCallback) save_tables_as, NULL);
 
        menu_item = gtk_menu_item_new ();
        gtk_widget_show (menu_item);
index 2f1c401fc5a88fb3eba16710f1f60d7b152f2583..e5cb2034fec43994cb385119c6049c1d9b8b45c4 100644 (file)
   File: tX_midiin.cc
  
   Description: Implements MIDI input to control turntable parameters.
+  
+       Changes (Alexander König <alex@lisas.de>:
+       - Using a glib GIOCallback instead of polling events
+       - Updating the treeview immedialtey after bind/unbind_clicked
+       - Adding "remove binding" option
+       - Adding destroy handler for the GUI
+       - moving printf to tX_* macros
+       - removing some debug code
 */    
 
 #include "tX_midiin.h"
index 0f737762742cecb9c23c30fe8a4a7512099d0798..1c574cba0d757ce2ee35b6396a213fe91f44fa75 100644 (file)
     File: tX_midiin.h
  
     Description: Header to tX_midiin.cc
+       
+       Changes (Alexander König <alex@lisas.de>:
+       - Default Constructor for tX_midievents
+       - new handlers for destroy and remove binding events
 */    
 
 #ifndef _tx_midiin_h
@@ -54,9 +58,6 @@ class tX_midievent
        }
        
        tX_midievent() : channel(0), type(NONE), value(0.0), is_noteon(false) {}
-       
-       /* not being used anyway */
-       // void print( const char* prefix ) const;
 };
 
 #include <config.h>
index 18535f156a6df25aec9cd1536c9c8ecfe8bb65ee..93fcbf0fcda989783577779e166cf0c68d378b17 100644 (file)
@@ -199,6 +199,14 @@ void tX_sequencer :: trig_stop()
        seq_update();
 }
 
+void tX_sequencer :: delete_all_events() {
+       while (song_list.size()) {
+               list <tX_event *> :: iterator ev=song_list.begin();
+               delete (*ev);
+               song_list.erase(ev);
+       }
+}
+
 void tX_sequencer :: delete_all_events_for_sp(tX_seqpar *sp)
 {
        list <tX_event *> :: iterator song_event;
index 45a83e25086cffc1c93ae18f9f045b3616f74b9e..eb4c1fa4e24540876c895942dff6e5347db09459 100644 (file)
@@ -80,6 +80,7 @@ class tX_sequencer
        }
        
        void delete_all_events_for_sp(tX_seqpar *sp);
+       void delete_all_events();
        
        void save(FILE *, char *indent);
 #ifdef ENABLE_TX_LEGACY        
index 2caf2bbea8e7d26254c8a0be70c700a921a054cb..ab824346666f4fe012b6b2176d20eedcba722efe 100644 (file)
@@ -1798,6 +1798,13 @@ int vtt_class :: load(xmlDocPtr doc, xmlNodePtr node) {
        return 0;
 }
 
+void vtt_class :: delete_all()
+{
+       while (main_list.size()) {
+               delete((*main_list.begin()));
+       }
+}
+
 
 int vtt_class :: load_all(xmlDocPtr doc, char *fname) {
        xmlNodePtr root=xmlDocGetRootElement(doc);
@@ -1830,9 +1837,7 @@ int vtt_class :: load_all(xmlDocPtr doc, char *fname) {
        }
        
        /* delete current tables... */
-       while (main_list.size()) {
-               delete((*main_list.begin()));
-       }
+       delete_all();
 
        int table_ctr=0;
        
index 4c24aaed110b4413839b4313560f9a62a5acca7e..89be7f55fb6357f3a4605d14c291fe43b3970b79 100644 (file)
@@ -298,6 +298,7 @@ class vtt_class
        static int save_all(FILE *);
        int load(xmlDocPtr, xmlNodePtr);
        static int load_all(xmlDocPtr doc, char *fname);
+       static void delete_all();
 
 #ifdef ENABLE_TX_LEGACY
        int load_10(FILE *);
index 821e94fae1f4c60c94a81987449fe3010d4d1fe8..9e9c15b69590d17f267d1e6a6e46d2041a1387eb 100644 (file)
@@ -86,7 +86,7 @@
            <widget class="GtkTable" id="table4">
              <property name="border_width">4</property>
              <property name="visible">True</property>
-             <property name="n_rows">2</property>
+             <property name="n_rows">1</property>
              <property name="n_columns">2</property>
              <property name="homogeneous">False</property>
              <property name="row_spacing">2</property>
                  <property name="y_options">fill</property>
                </packing>
              </child>
-
-             <child>
-               <widget class="GtkLabel" id="label19">
-                 <property name="visible">True</property>
-                 <property name="label" translatable="yes">Latency:</property>
-                 <property name="use_underline">False</property>
-                 <property name="use_markup">False</property>
-                 <property name="justify">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap">False</property>
-                 <property name="selectable">False</property>
-                 <property name="xalign">0</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">0</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">0</property>
-                 <property name="right_attach">1</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkHBox" id="hbox3">
-                 <property name="visible">True</property>
-                 <property name="homogeneous">False</property>
-                 <property name="spacing">0</property>
-
-                 <child>
-                   <widget class="GtkButton" id="measure_latency">
-                     <property name="visible">True</property>
-                     <property name="can_focus">True</property>
-                     <property name="label" translatable="yes">Measure</property>
-                     <property name="use_underline">True</property>
-                     <property name="relief">GTK_RELIEF_NORMAL</property>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">False</property>
-                     <property name="fill">False</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GtkLabel" id="label20">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">-- ms</property>
-                     <property name="use_underline">False</property>
-                     <property name="use_markup">False</property>
-                     <property name="justify">GTK_JUSTIFY_LEFT</property>
-                     <property name="wrap">False</property>
-                     <property name="selectable">False</property>
-                     <property name="xalign">0.5</property>
-                     <property name="yalign">0.5</property>
-                     <property name="xpad">0</property>
-                     <property name="ypad">0</property>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">True</property>
-                     <property name="fill">True</property>
-                   </packing>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="left_attach">1</property>
-                 <property name="right_attach">2</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options">fill</property>
-               </packing>
-             </child>
            </widget>
            <packing>
              <property name="tab_expand">False</property>
                  <property name="digits">0</property>
                  <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
                  <property name="inverted">False</property>
-                 <property name="adjustment">5 1 16 1 1 1</property>
+                 <property name="adjustment">9 8 16 1 1 1</property>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
                </packing>
              </child>
 
-             <child>
-               <widget class="GtkLabel" id="label28">
-                 <property name="visible">True</property>
-                 <property name="label" translatable="yes">No. of buffers:</property>
-                 <property name="use_underline">False</property>
-                 <property name="use_markup">False</property>
-                 <property name="justify">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap">False</property>
-                 <property name="selectable">False</property>
-                 <property name="xalign">0</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">0</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">0</property>
-                 <property name="right_attach">1</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
              <child>
                <widget class="GtkLabel" id="label29">
                  <property name="visible">True</property>
-                 <property name="label" translatable="yes">Buffersize (samples):</property>
+                 <property name="label" translatable="yes">Period Time (ms):</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                </packing>
              </child>
 
-             <child>
-               <widget class="GtkSpinButton" id="alsa_buffers">
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="climb_rate">1</property>
-                 <property name="digits">0</property>
-                 <property name="numeric">False</property>
-                 <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-                 <property name="snap_to_ticks">False</property>
-                 <property name="wrap">False</property>
-                 <property name="adjustment">2 2 5 1 2 2</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">1</property>
-                 <property name="right_attach">2</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
              <child>
                <widget class="GtkCombo" id="alsa_samplerate">
                  <property name="visible">True</property>
              </child>
 
              <child>
-               <widget class="GtkHScale" id="alsa_buffersize">
+               <widget class="GtkHScale" id="alsa_period_time">
                  <property name="visible">True</property>
                  <property name="can_focus">True</property>
                  <property name="draw_value">True</property>
                  <property name="digits">0</property>
                  <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
                  <property name="inverted">False</property>
-                 <property name="adjustment">1024 64 512 32 64 64</property>
+                 <property name="adjustment">29 10 500 1 10 10</property>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
                  <property name="y_options">fill</property>
                </packing>
              </child>
+
+             <child>
+               <widget class="GtkLabel" id="label32">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Buffer Time (ms):</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkHScale" id="alsa_buffer_time">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="draw_value">True</property>
+                 <property name="value_pos">GTK_POS_TOP</property>
+                 <property name="digits">0</property>
+                 <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                 <property name="inverted">False</property>
+                 <property name="adjustment">50 10 500 1 10 10</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options">fill</property>
+               </packing>
+             </child>
            </widget>
            <packing>
              <property name="tab_expand">False</property>
            </packing>
          </child>
 
-         <child>
-           <placeholder/>
-         </child>
-
-         <child>
-           <widget class="GtkLabel" id="label17">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">Audio: JACK</property>
-             <property name="use_underline">False</property>
-             <property name="use_markup">False</property>
-             <property name="justify">GTK_JUSTIFY_LEFT</property>
-             <property name="wrap">False</property>
-             <property name="selectable">False</property>
-             <property name="xalign">0.5</property>
-             <property name="yalign">0.5</property>
-             <property name="xpad">0</property>
-             <property name="ypad">0</property>
-           </widget>
-           <packing>
-             <property name="type">tab</property>
-           </packing>
-         </child>
-
          <child>
            <widget class="GtkTable" id="table1">
              <property name="border_width">4</property>