[SCM] gsequencer/master: provide fix related to configuration in place

jkraehemann-guest at users.alioth.debian.org jkraehemann-guest at users.alioth.debian.org
Fri Feb 10 11:06:41 UTC 2017


The following commit has been merged in the master branch:
commit c89b120aa0c7a900cdf4ffbfdc4e3b00d64ad72e
Author: Joël Krähemann <jkraehemann-guest at users.alioth.debian.org>
Date:   Fri Feb 10 12:06:14 2017 +0100

    provide fix related to configuration in place

diff --git a/debian/patches/fix-delay-audio.patch b/debian/patches/fix-delay-audio.patch
new file mode 100644
index 0000000..e0c1383
--- /dev/null
+++ b/debian/patches/fix-delay-audio.patch
@@ -0,0 +1,184 @@
+Description: This patch includes a fix against updating samplerate and buffer
+ size. This is especially needed as doing configuration in place.
+Author: Joël Krähmann <jkraehemann at gmail.com>
+Applied-Upstream: 0.7.122.x, http://git.savannah.gnu.org/cgit/gsequencer.git
+Last-Update: 2017-02-10
+--- a/ags/audio/recall/ags_delay_audio.c
++++ b/ags/audio/recall/ags_delay_audio.c
+@@ -42,10 +42,20 @@
+ void ags_delay_audio_set_ports(AgsPlugin *plugin, GList *port);
+ void ags_delay_audio_finalize(GObject *gobject);
+ 
++void ags_delay_audio_notify_audio_callback(GObject *gobject,
++					   GParamSpec *pspec,
++					   gpointer user_data);
+ void ags_delay_audio_notify_soundcard_callback(GObject *gobject,
+ 					       GParamSpec *pspec,
+ 					       gpointer user_data);
+ 
++void ags_delay_audio_notify_samplerate_callback(GObject *gobject,
++						GParamSpec *pspec,
++						gpointer user_data);
++void ags_delay_audio_notify_buffer_size_callback(GObject *gobject,
++						 GParamSpec *pspec,
++						 gpointer user_data);
++
+ gdouble ags_delay_audio_get_bpm(AgsTactable *tactable);
+ gdouble ags_delay_audio_get_tact(AgsTactable *tactable);
+ gdouble ags_delay_audio_get_sequencer_duration(AgsTactable *tactable);
+@@ -55,6 +65,8 @@
+ void ags_delay_audio_change_sequencer_duration(AgsTactable *tactable, gdouble duration);
+ void ags_delay_audio_change_notation_duration(AgsTactable *tactable, gdouble duration);
+ 
++void ags_delay_audio_refresh_delay(AgsDelayAudio *delay_audio);
++
+ /**
+  * SECTION:ags_delay_audio
+  * @short_description: delay audio 
+@@ -326,7 +338,11 @@
+   AGS_RECALL(delay_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID;
+   AGS_RECALL(delay_audio)->xml_type = "ags-delay-audio\0";
+ 
+-  g_signal_connect_after(delay_audio, "notify::soundcard",
++  /* notify some properties to do final configuration */
++  g_signal_connect_after(delay_audio, "notify::audio\0",
++			 G_CALLBACK(ags_delay_audio_notify_audio_callback), NULL);
++
++  g_signal_connect_after(delay_audio, "notify::soundcard\0",
+ 			 G_CALLBACK(ags_delay_audio_notify_soundcard_callback), NULL);
+ }
+ 
+@@ -590,6 +606,30 @@
+ }
+ 
+ void
++ags_delay_audio_notify_audio_callback(GObject *gobject,
++				      GParamSpec *pspec,
++				      gpointer user_data)
++{
++  AgsDelayAudio *delay_audio;
++  
++  AgsAudio *audio;
++  
++  delay_audio = AGS_DELAY_AUDIO(gobject);
++
++  audio = AGS_RECALL_AUDIO(delay_audio)->audio;
++
++  if(audio == NULL){
++    return;
++  }
++
++  g_signal_connect_after(audio, "notify::samplerate\0",
++			 G_CALLBACK(ags_delay_audio_notify_samplerate_callback), delay_audio);
++
++  g_signal_connect_after(audio, "notify::buffer-size\0",
++			 G_CALLBACK(ags_delay_audio_notify_buffer_size_callback), delay_audio);
++}
++
++void
+ ags_delay_audio_notify_soundcard_callback(GObject *gobject,
+ 					  GParamSpec *pspec,
+ 					  gpointer user_data)
+@@ -606,6 +646,11 @@
+   delay_audio = AGS_DELAY_AUDIO(gobject);
+ 
+   soundcard = AGS_RECALL(delay_audio)->soundcard;
++
++  if(soundcard == NULL){
++    return;
++  }
++  
+   port = NULL;
+ 
+   /*  */
+@@ -706,6 +751,30 @@
+   AGS_RECALL(delay_audio)->port = port;
+ }
+ 
++void
++ags_delay_audio_notify_samplerate_callback(GObject *gobject,
++					   GParamSpec *pspec,
++					   gpointer user_data)
++{
++  AgsDelayAudio *delay_audio;
++  
++  delay_audio = AGS_DELAY_AUDIO(user_data);
++
++  ags_delay_audio_refresh_delay(delay_audio);
++}
++
++void
++ags_delay_audio_notify_buffer_size_callback(GObject *gobject,
++					    GParamSpec *pspec,
++					    gpointer user_data)
++{
++  AgsDelayAudio *delay_audio;
++  
++  delay_audio = AGS_DELAY_AUDIO(user_data);
++
++  ags_delay_audio_refresh_delay(delay_audio);
++}
++
+ gdouble
+ ags_delay_audio_get_bpm(AgsTactable *tactable)
+ {
+@@ -884,6 +953,59 @@
+ 
+   /* notation-duration */
+   g_value_reset(&value);
++
++  g_value_set_double(&value, ceil(AGS_NOTATION_DEFAULT_DURATION * delay));
++  ags_port_safe_write(delay_audio->notation_duration, &value);
++
++  /* sequencer-duration */
++  g_value_reset(&value);
++
++  g_value_set_double(&value, ceil(16.0 * delay));
++  ags_port_safe_write(delay_audio->sequencer_duration, &value);
++
++  /* -- finish adjust -- */
++
++  /* emit changed */
++  ags_delay_audio_sequencer_duration_changed(delay_audio);
++}
++
++void
++ags_delay_audio_refresh_delay(AgsDelayAudio *delay_audio)
++{
++  GObject *soundcard;
++
++  gdouble delay;
++  
++  GValue value = {0,};
++  
++  soundcard = AGS_RECALL(delay_audio)->soundcard;
++
++  if(soundcard == NULL){
++    return;
++  }
++  
++  delay = ags_soundcard_get_delay(AGS_SOUNDCARD(soundcard));
++  g_value_init(&value, G_TYPE_DOUBLE);
++
++  /* -- start adjust -- */
++  /* notation-delay */
++  g_value_reset(&value);
++
++  g_value_set_double(&value, delay);
++  ags_port_safe_write(delay_audio->notation_delay, &value);
++
++  //  g_message("notation delay = %f\0", notation_delay * (old_tact / new_tact));
++  
++  /* sequencer-delay */
++  g_value_reset(&value);
++
++  g_value_set_double(&value, delay);
++  ags_port_safe_write(delay_audio->sequencer_delay, &value);
++
++  //  g_message("sequencer delay = %f\0", sequencer_delay * (old_tact / new_tact));
++
++  /* notation-duration */
++  g_value_reset(&value);
+ 
+   g_value_set_double(&value, ceil(AGS_NOTATION_DEFAULT_DURATION * delay));
+   ags_port_safe_write(delay_audio->notation_duration, &value);
diff --git a/debian/patches/series b/debian/patches/series
index 238876d..de19bed 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+fix-delay-audio.patch
 fix-matrix.patch
 improved-disable-output-port-automation.patch
 improved-enable-builtin-port-automation.patch

-- 
gsequencer packaging



More information about the pkg-multimedia-commits mailing list