[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#984986: marked as done (unblock: gsequencer/3.7.44-2)



Your message dated Thu, 11 Mar 2021 17:03:08 +0100
with message-id <YEo/PILidhAVCgyw@chou>
and subject line Re: Bug#984986: unblock: gsequencer/3.7.44-2
has caused the Debian Bug report #984986,
regarding unblock: gsequencer/3.7.44-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
984986: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984986
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package gsequencer

[ Reason ]
The upstream of gsequencer (this is actually me) provided some
patches to improve security of the library's provided utility
functions.

Some versions of GCC complain about may-be unitialized after
return from utility functions. The provided patches fixes this.

Since hardening options are recommended, see here:

https://wiki.debian.org/Hardening

Further, there are some problems with not unified floating
point number types. Actually there are no implications,
because these types are defined as follows:

typedef float gfloat;
typedef double gdouble;

But, if you want to change this you get some real problems,
especially since the gsequencer libraries have some
conversion functions to store floats in a char buffer.

http://git.savannah.nongnu.org/cgit/gsequencer.git/tree/ags/audio/ags_char_buffer_util.h?h=3.7.x

And finally, there were some remains of using complex macro
as type, this should be unified as double _Comples, too.

There is a bug related to maybe-unitialized available:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983868

At last, I would love to patch the user's manual chapter 2.
The information there are incomplete and were not updated
as extending the UI of gsequencer. It might cause confusion,
as explaining the menus and not cover every item or control.

I strongly recommend to patch.

[ Impact ]
The user of the gsequencer binary doesn't recognized anything,
except if you consider developers as users of the libraries. 

Developers, might end in some memory corruption if the code
does SIGSEGV.

The Advanced Gtk+ Sequencer framework, opens various file
handles for sockets or alike, if configured so.

[ Tests ]
GSequencer comes with unit-tests and a functional integration
test suite. Running in debian-ci.

I did some manual tests, too. Like to ensure AgsFFPlayer
and AgsPitchSampler work as desired. They are related
to:

ags_audio_buffer_util.c
ags_sf2_synth_util.c
ags_sfz_synth_util.c

Other manual tested machines are AgsPanel, AgsMixer, AgsDrum,
AgsMatrix and AgsFMSynth.

[ Risks ]
The changes are trivial, if a function returns where it shouldn't
it would just be silence. So no additional processing is performed.

(Discussion of the risks involved. E.g. code is trivial or
complex, key package vs leaf package, alternatives available.)

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]
The Advanced Gtk+ Sequencer provides you 2 different flavors of
OSC (Open Sound Control) service. One without any authentication
running in local network. The SLIP encoded UDP/TCP packages using
IPv4/IPv6 is not routable. Can be started by providing suitable
configuration file.

Another flavor, is the AGS-OSC-OVER-XMLRPC which encapsules the
OSC messages by the HTTP and WebSockets protocol, is actually
routable but only with valid Basic HTTP authentication. Only,
available for developers.

unblock gsequencer/3.7.44-2
diff -Nru gsequencer-3.7.44/debian/changelog gsequencer-3.7.44/debian/changelog
--- gsequencer-3.7.44/debian/changelog	2021-02-27 19:16:33.000000000 +0100
+++ gsequencer-3.7.44/debian/changelog	2021-03-08 18:44:04.000000000 +0100
@@ -1,4 +1,13 @@
-gsequencer (3.7.44-1) UNRELEASED; urgency=medium
+gsequencer (3.7.44-2) unstable; urgency=medium
+
+  * add patch to fix undefined behavior or missing return if buffer NULL in
+    utility functions
+  * add patch to fix floating point number types
+  * add patch to update chapter 2 of user manual
+
+ -- Joël Krähemann <jkraehemann@gmail.com>  Mon, 08 Mar 2021 18:44:04 +0100
+
+gsequencer (3.7.44-1) unstable; urgency=medium
 
   * New upstream version 3.7.44
 
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_audio_buffer_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_audio_buffer_util-c.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_audio_buffer_util-c.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_audio_buffer_util-c.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,1652 @@
+Description: fix undefined behavior in ags_audio_buffer_util.c
+ ags_audio_buffer_util.c didn't set output variables if buffer is NULL.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/ags_audio_buffer_util.c
++++ b/ags/audio/ags_audio_buffer_util.c
+@@ -475,6 +475,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++  
+   i = 0;
+   
+   /* unrolled function */
+@@ -523,6 +527,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   i = 0;
+   
+   /* unrolled function */
+@@ -571,6 +579,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   i = 0;
+   
+   /* unrolled function */
+@@ -618,6 +630,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   i = 0;
+   
+   /* unrolled function */
+@@ -760,6 +776,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(1.0);
++  }
++
+   start_volume = current_volume;
+   i = 0;
+   
+@@ -891,6 +911,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(1.0);
++  }
++
+   start_volume = current_volume;
+   i = 0;
+   
+@@ -1022,6 +1046,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(1.0);
++  }
++
+   start_volume = current_volume;
+   i = 0;
+   
+@@ -1153,6 +1181,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(1.0);
++  }
++
+   start_volume = current_volume;
+   i = 0;
+   
+@@ -1284,6 +1316,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(1.0);
++  }
++
+   start_volume = current_volume;
+   i = 0;
+   
+@@ -1415,6 +1451,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(1.0);
++  }
++
+   start_volume = current_volume;
+   i = 0;
+   
+@@ -1550,6 +1590,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(1.0);
++  }
++
+   start_volume = current_volume;
+   i = 0;
+   
+@@ -1681,6 +1725,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(1.0);
++  }
++
+   start_volume = current_volume;
+   i = 0;
+ 
+@@ -1724,6 +1772,10 @@
+ {
+   gdouble retval;
+ 
++  if(buffer == NULL){
++    return(1.0);
++  }
++
+   retval = 0.0;
+   
+   switch(format){
+@@ -1818,6 +1870,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -1943,6 +1999,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -2068,6 +2128,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -2193,6 +2257,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -2318,6 +2386,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -2443,6 +2515,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -2568,6 +2644,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -2693,6 +2773,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+   //TODO:JK: improve me
+@@ -2726,6 +2810,10 @@
+ 			     guint buffer_length,
+ 			     gdouble volume)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+     {
+@@ -2815,6 +2903,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(0.0);
++  }
++
+   /* calculate average value */
+   current_value = 0.0;
+ 
+@@ -3119,6 +3211,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(0.0);
++  }
++
+   /* calculate average value */
+   current_value = 0.0;
+ 
+@@ -3423,6 +3519,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(0.0);
++  }
++
+   /* calculate average value */
+   current_value = 0.0;
+ 
+@@ -3727,6 +3827,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(0.0);
++  }
++
+   /* calculate average value */
+   current_value = 0.0;
+ 
+@@ -4031,6 +4135,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(0.0);
++  }
++
+   /* calculate average value */
+   current_value = 0.0;
+ 
+@@ -4335,6 +4443,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(0.0);
++  }
++
+   /* calculate average value */
+   current_value = 0.0;
+ 
+@@ -4633,6 +4745,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(0.0);
++  }
++
+   /* calculate average value */
+   current_value = 0.0;
+ 
+@@ -4932,6 +5048,10 @@
+   guint current_channel;
+   guint i;
+ 
++  if(buffer == NULL){
++    return(0.0);
++  }
++
+   i = 0;
+   
+   /* calculate average value */
+@@ -4985,6 +5105,10 @@
+ {
+   gdouble current_value;
+ 
++  if(buffer == NULL){
++    return(0.0);
++  }
++
+   current_value = 0.0;
+   
+   switch(format){
+@@ -5091,6 +5215,10 @@
+ 
+   gint8 *ret_buffer;
+ 
++  if(buffer == NULL){
++    return(NULL);
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5144,6 +5272,10 @@
+ 
+   gint16 *ret_buffer;
+ 
++  if(buffer == NULL){
++    return(NULL);
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5197,6 +5329,10 @@
+ 
+   gint32 *ret_buffer;
+ 
++  if(buffer == NULL){
++    return(NULL);
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5250,6 +5386,10 @@
+ 
+   gint32 *ret_buffer;
+ 
++  if(buffer == NULL){
++    return(NULL);
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5303,6 +5443,10 @@
+ 
+   gint64 *ret_buffer;
+ 
++  if(buffer == NULL){
++    return(NULL);
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5356,6 +5500,10 @@
+ 
+   gfloat *ret_buffer;
+ 
++  if(buffer == NULL){
++    return(NULL);
++  }
++
+   //FIXME:JK: lost precision
+ 
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+@@ -5412,6 +5560,10 @@
+ 
+   gdouble *ret_buffer;
+ 
++  if(buffer == NULL){
++    return(NULL);
++  }
++
+   //FIXME:JK: lost precision
+ 
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+@@ -5480,6 +5632,10 @@
+   guint output_frames;
+   guint i, n;
+ 
++  if(buffer == NULL){
++    return(NULL);
++  }
++
+   delay_factor = 1.0 / (gdouble) target_samplerate * (gdouble) samplerate;
+   
+   output_frames = ceil((gdouble) buffer_length / (gdouble) samplerate * (gdouble) target_samplerate);
+@@ -5544,6 +5700,10 @@
+ {
+   void *retval;
+ 
++  if(buffer == NULL){
++    return(NULL);
++  }
++
+   retval = NULL;
+   
+   switch(format){
+@@ -5642,6 +5802,11 @@
+ {
+   SRC_DATA secret_rabbit;
+ 
++  if(buffer == NULL ||
++     target_buffer == NULL){
++    return;
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5691,6 +5856,11 @@
+ {
+   SRC_DATA secret_rabbit;
+ 
++  if(buffer == NULL ||
++     target_buffer == NULL){
++    return;
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5740,6 +5910,11 @@
+ {
+   SRC_DATA secret_rabbit;
+ 
++  if(buffer == NULL ||
++     target_buffer == NULL){
++    return;
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5789,6 +5964,11 @@
+ {
+   SRC_DATA secret_rabbit;
+ 
++  if(buffer == NULL ||
++     target_buffer == NULL){
++    return;
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5838,6 +6018,11 @@
+ {
+   SRC_DATA secret_rabbit;
+ 
++  if(buffer == NULL ||
++     target_buffer == NULL){
++    return;
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5887,6 +6072,11 @@
+ {
+   SRC_DATA secret_rabbit;
+ 
++  if(buffer == NULL ||
++     target_buffer == NULL){
++    return;
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5931,6 +6121,11 @@
+ {
+   SRC_DATA secret_rabbit;
+ 
++  if(buffer == NULL ||
++     target_buffer == NULL){
++    return;
++  }
++
+   secret_rabbit.src_ratio = target_samplerate / samplerate;
+ 
+   secret_rabbit.input_frames = buffer_length;
+@@ -5993,6 +6188,11 @@
+   guint output_frames;
+   guint i, n;
+ 
++  if(buffer == NULL ||
++     target_buffer == NULL){
++    return;
++  }
++
+   delay_factor = 1.0 / (gdouble) target_samplerate * (gdouble) samplerate;
+   
+   output_frames = ceil((gdouble) buffer_length / (gdouble) samplerate * (gdouble) target_samplerate);
+@@ -6053,6 +6253,11 @@
+ 					   guint target_buffer_length,
+ 					   void *target_buffer)
+ {
++  if(buffer == NULL ||
++     target_buffer == NULL){
++    return;
++  }
++
+   switch(format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+     {
+@@ -6160,6 +6365,11 @@
+   gint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -6319,6 +6529,11 @@
+   gint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -6477,6 +6692,11 @@
+   gint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -6636,6 +6856,11 @@
+   gint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -6792,6 +7017,11 @@
+   gint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;  
+ 
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -6951,6 +7181,11 @@
+   gint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -7107,6 +7342,11 @@
+   gint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -7264,6 +7504,11 @@
+ {
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+   for(; i < count; i++){
+@@ -7298,6 +7543,11 @@
+ 			   void *source, guint schannels,
+ 			   guint count, guint format)
+ {
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   switch(format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+     {
+@@ -7381,6 +7631,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -7542,6 +7797,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -7707,6 +7967,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -7872,6 +8137,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -8037,6 +8307,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -8203,6 +8478,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -8369,6 +8649,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -8534,6 +8819,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -8697,6 +8987,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -8857,6 +9152,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -9022,6 +9322,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -9187,6 +9492,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -9353,6 +9663,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -9519,6 +9834,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -9684,6 +10004,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -9849,6 +10174,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -10012,6 +10342,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -10173,6 +10508,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -10338,6 +10678,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -10504,6 +10849,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -10670,6 +11020,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -10835,6 +11190,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -11000,6 +11360,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -11165,6 +11530,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -11328,6 +11698,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -11486,6 +11861,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -11652,6 +12032,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -11818,6 +12203,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -11983,6 +12373,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -12148,6 +12543,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -12313,6 +12713,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -12478,6 +12883,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -12641,6 +13051,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;  
+ 
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -12803,6 +13218,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -12969,6 +13389,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -13134,6 +13559,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -13299,6 +13729,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -13464,6 +13899,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -13629,6 +14069,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -13794,6 +14239,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -13957,6 +14407,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -14113,6 +14568,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -14271,6 +14731,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -14436,6 +14901,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -14601,6 +15071,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -14766,6 +15241,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -14931,6 +15411,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -15094,6 +15579,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -15253,6 +15743,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -15416,6 +15911,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -15582,6 +16082,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -15748,6 +16253,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -15914,6 +16424,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -16080,6 +16595,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -16243,6 +16763,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -16399,6 +16924,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -16555,6 +17085,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -16713,6 +17248,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -16878,6 +17418,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -17043,6 +17588,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -17208,6 +17758,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -17373,6 +17928,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -17536,6 +18096,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -17692,6 +18257,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+ #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
+@@ -17853,6 +18423,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   c_ptr = &c_value;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -17899,6 +18474,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   c_ptr = &c_value;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -17945,6 +18525,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   c_ptr = &c_value;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -17991,6 +18576,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   c_ptr = &c_value;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -18037,6 +18627,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   c_ptr = &c_value;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -18083,6 +18678,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   c_ptr = &c_value;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -18129,6 +18729,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   c_ptr = &c_value;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -18179,6 +18784,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   c_ptr = &c_value;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -18226,6 +18836,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+   for(; i < count; i++){
+@@ -18266,6 +18881,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+   
+   ptr = &value;
+@@ -18304,6 +18924,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+   ptr = &value;    
+@@ -18342,6 +18967,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+   ptr = &value;    
+@@ -18380,6 +19010,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+   ptr = &value;    
+@@ -18418,6 +19053,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+   ptr = &value;    
+@@ -18456,6 +19096,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+   ptr = &value;    
+@@ -18494,6 +19139,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+   ptr = &value;    
+@@ -18533,6 +19183,11 @@
+   guint current_dchannel, current_schannel;
+   guint i;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   i = 0;
+ 
+   ptr = &value;    
+@@ -18568,6 +19223,11 @@
+ 					    void *source, guint schannels, guint soffset,
+ 					    guint count, guint mode)
+ {
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++
+   switch(mode){
+   case AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S8:
+     {
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_buffer_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_buffer_util-c.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_buffer_util-c.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_buffer_util-c.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,375 @@
+Description: fix undefined behavior in ags_buffer_util.c
+ ags_buffer_util.c didn't set output variables if buffer is NULL.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/lib/ags_buffer_util.c
++++ b/ags/lib/ags_buffer_util.c
+@@ -54,6 +54,10 @@
+ 
+   guint limit;
+   guint i;
++
++  if(buffer == NULL){
++    return(NULL);
++  }
+   
+   start_cbuffer = 
+     cbuffer = (guchar *) malloc(buffer_length * sizeof(guchar));
+@@ -107,6 +111,10 @@
+ 
+   guint limit;
+   guint i;
++
++  if(buffer == NULL){
++    return(NULL);
++  }
+   
+   start_cbuffer = 
+     cbuffer = (guchar *) malloc((2 * buffer_length) * sizeof(guchar));
+@@ -176,6 +184,10 @@
+ 
+   guint limit;
+   guint i;
++
++  if(buffer == NULL){
++    return(NULL);
++  }
+   
+   start_cbuffer = 
+     cbuffer = (guchar *) malloc((4 * buffer_length) * sizeof(guchar));
+@@ -263,6 +275,10 @@
+ 
+   guint limit;
+   guint i;
++
++  if(buffer == NULL){
++    return(NULL);
++  }
+   
+   start_cbuffer = 
+     cbuffer = (guchar *) malloc((4 * buffer_length) * sizeof(guchar));
+@@ -350,6 +366,10 @@
+ 
+   guint limit;
+   guint i;
++
++  if(buffer == NULL){
++    return(NULL);
++  }
+   
+   start_cbuffer = 
+     cbuffer = (guchar *) malloc((8 * buffer_length) * sizeof(guchar));
+@@ -470,6 +490,10 @@
+ 				     guint buffer_length)
+ {
+   guchar *cbuffer, *start_cbuffer;
++
++  if(buffer == NULL){
++    return(NULL);
++  }
+   
+   start_cbuffer = 
+     cbuffer = (guchar *) malloc((buffer_length * sizeof(gfloat)) * sizeof(guchar));
+@@ -496,6 +520,10 @@
+ {
+   guchar *cbuffer, *start_cbuffer;
+ 
++  if(buffer == NULL){
++    return(NULL);
++  }
++
+   start_cbuffer = 
+     cbuffer = (guchar *) malloc((buffer_length * sizeof(gdouble)) * sizeof(guchar));
+ 
+@@ -521,6 +549,10 @@
+ {
+   guchar *cbuffer, *start_cbuffer;
+ 
++  if(buffer == NULL){
++    return(NULL);
++  }
++
+   start_cbuffer = 
+     cbuffer = (guchar *) malloc((buffer_length * sizeof(AgsComplex)) * sizeof(guchar));
+ 
+@@ -549,6 +581,10 @@
+   guint limit;
+   guint i;
+ 
++  if(cbuffer == NULL){
++    return(NULL);
++  }
++
+   start_buffer = 
+     buffer = (gint8 *) malloc(buffer_size * sizeof(gint8));
+   memset(buffer, 0, buffer_size * sizeof(gint8));
+@@ -603,6 +639,10 @@
+   guint limit;
+   guint i;
+ 
++  if(cbuffer == NULL){
++    return(NULL);
++  }
++
+   start_buffer = 
+     buffer = (gint16 *) malloc((buffer_size / 2) * sizeof(gint16));
+   memset(buffer, 0, (buffer_size / 2) * sizeof(gint16));
+@@ -675,6 +715,10 @@
+   guint limit;
+   guint i;
+ 
++  if(cbuffer == NULL){
++    return(NULL);
++  }
++
+   start_buffer = 
+     buffer = (gint32 *) malloc((buffer_size / 4) * sizeof(gint32));
+   memset(buffer, 0, (buffer_size / 4) * sizeof(gint32));
+@@ -765,6 +809,10 @@
+   guint limit;
+   guint i;
+   
++  if(cbuffer == NULL){
++    return(NULL);
++  }
++
+   start_buffer = 
+     buffer = (gint32 *) malloc((buffer_size / 4) * sizeof(gint32));
+   memset(buffer, 0, (buffer_size / 4) * sizeof(gint32));
+@@ -855,6 +903,10 @@
+   guint limit;
+   guint i;
+ 
++  if(cbuffer == NULL){
++    return(NULL);
++  }
++
+   start_buffer = 
+     buffer = (gint64 *) malloc((buffer_size / 8) * sizeof(gint64));
+   memset(buffer, 0, (buffer_size / 8) * sizeof(gint64));
+@@ -978,6 +1030,10 @@
+ {
+   gfloat *buffer, *start_buffer;
+   
++  if(cbuffer == NULL){
++    return(NULL);
++  }
++
+   start_buffer = 
+     buffer = (gfloat *) malloc((buffer_size / sizeof(gfloat)) * sizeof(gfloat));
+ 
+@@ -1005,6 +1061,10 @@
+ {
+   gdouble *buffer, *start_buffer;
+   
++  if(cbuffer == NULL){
++    return(NULL);
++  }
++
+   start_buffer = 
+     buffer = (gdouble *) malloc((buffer_size / sizeof(gdouble)) * sizeof(gdouble));
+ 
+@@ -1032,6 +1092,10 @@
+ {
+   AgsComplex *buffer, *start_buffer;
+   
++  if(cbuffer == NULL){
++    return(NULL);
++  }
++
+   start_buffer = 
+     buffer = (AgsComplex *) malloc((buffer_size / sizeof(AgsComplex)) * sizeof(AgsComplex));
+ 
+@@ -1059,6 +1123,10 @@
+ {
+   gint8 val;
+ 
++  if(cbuffer == NULL){
++    return(0);
++  }
++
+   val = 0;
+   val |= cbuffer[0];
+ 
+@@ -1082,6 +1150,10 @@
+ {
+   gint16 val;
+ 
++  if(cbuffer == NULL){
++    return(0);
++  }
++
+   val = 0;
+   
+   if(byte_order == AGS_BYTE_ORDER_BE){
+@@ -1112,6 +1184,10 @@
+ {
+   gint32 val;
+ 
++  if(cbuffer == NULL){
++    return(0);
++  }
++
+   val = 0;
+   
+   if(byte_order == AGS_BYTE_ORDER_BE){
+@@ -1144,6 +1220,10 @@
+ {
+   gint32 val;
+ 
++  if(cbuffer == NULL){
++    return(0);
++  }
++
+   val = 0;
+   
+   if(byte_order == AGS_BYTE_ORDER_BE){
+@@ -1178,6 +1258,10 @@
+ {
+   gint64 val;
+ 
++  if(cbuffer == NULL){
++    return(0);
++  }
++
+   val = 0;
+   
+   if(byte_order == AGS_BYTE_ORDER_BE){
+@@ -1222,6 +1306,10 @@
+     guint32 val;
+     GFloatIEEE754 ieee_float;
+   }data;
++
++  if(cbuffer == NULL){
++    return(0.0);
++  }
+   
+   data.val = 0;
+   
+@@ -1260,6 +1348,10 @@
+     GDoubleIEEE754 ieee_double;
+   }data;
+ 
++  if(cbuffer == NULL){
++    return(0.0);
++  }
++
+   data.val = 0;
+   
+   if(byte_order == AGS_BYTE_ORDER_BE){
+@@ -1306,6 +1398,10 @@
+   }data;
+ 
+   guint i;
++
++  if(cbuffer == NULL){
++    return(NULL);
++  }
+   
+   for(i = 0; i < sizeof(AgsComplex); i++){
+     if(byte_order == AGS_BYTE_ORDER_BE){
+@@ -1333,6 +1429,10 @@
+ 				     gint8 value,
+ 				     guint byte_order)
+ {
++  if(cbuffer == NULL){
++    return;
++  }
++  
+   cbuffer[0] = value;
+ }
+ 
+@@ -1351,6 +1451,10 @@
+ 				      gint16 value,
+ 				      guint byte_order)
+ {
++  if(cbuffer == NULL){
++    return;
++  }
++
+   if(byte_order == AGS_BYTE_ORDER_BE){
+     cbuffer[0] = (0xff & value);
+     cbuffer[1] = (0xff00 & value) >> 8;
+@@ -1375,6 +1479,10 @@
+ 				      gint32 value,
+ 				      guint byte_order)
+ {
++  if(cbuffer == NULL){
++    return;
++  }
++
+   if(byte_order == AGS_BYTE_ORDER_BE){
+     cbuffer[0] = (0xff & value);
+     cbuffer[1] = (0xff00 & value) >> 8;
+@@ -1401,6 +1509,10 @@
+ 				      gint32 value,
+ 				      guint byte_order)
+ {
++  if(cbuffer == NULL){
++    return;
++  }
++
+   if(byte_order == AGS_BYTE_ORDER_BE){
+     cbuffer[0] = (0xff & value);
+     cbuffer[1] = (0xff00 & value) >> 8;
+@@ -1429,6 +1541,10 @@
+ 				      gint64 value,
+ 				      guint byte_order)
+ {
++  if(cbuffer == NULL){
++    return;
++  }
++
+   if(byte_order == AGS_BYTE_ORDER_BE){
+     cbuffer[0] = (0xff & value);
+     cbuffer[1] = (0xff00 & value) >> 8;
+@@ -1470,6 +1586,10 @@
+     GFloatIEEE754 ieee_float;
+   }data;
+ 
++  if(cbuffer == NULL){
++    return;
++  }
++
+   data.ieee_float.v_float = value;
+   
+   if(byte_order == AGS_BYTE_ORDER_BE){
+@@ -1505,6 +1625,10 @@
+     GDoubleIEEE754 ieee_double;
+   }data;
+ 
++  if(cbuffer == NULL){
++    return;
++  }
++
+   data.ieee_double.v_double = value;
+ 
+   if(byte_order == AGS_BYTE_ORDER_BE){
+@@ -1550,6 +1674,10 @@
+ 
+   guint i;
+ 
++  if(cbuffer == NULL){
++    return;
++  }
++
+   ags_complex_set(&(data.c_val),
+ 		  ags_complex_get(value));
+ 
+@@ -1581,6 +1709,10 @@
+     
+   guint i, j;
+ 
++  if(cbuffer == NULL){
++    return;
++  }
++
+   if(word_size <= 1){
+     return;
+   }
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_char_buffer_util-ch.diff gsequencer-3.7.44/debian/patches/patch-ags_char_buffer_util-ch.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_char_buffer_util-ch.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_char_buffer_util-ch.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,303 @@
+Description: fix undefined behavior in ags_char_buffer_util.c
+ ags_char_buffer_util.c didn't set output variables if buffer is NULL. This
+ patch fixes some type safety problems with floating point numbers.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/ags_char_buffer_util.c
++++ b/ags/audio/ags_char_buffer_util.c
+@@ -1,5 +1,5 @@
+ /* GSequencer - Advanced GTK Sequencer
+- * Copyright (C) 2005-2019 Joël Krähemann
++ * Copyright (C) 2005-2021 Joël Krähemann
+  *
+  * This file is part of GSequencer.
+  *
+@@ -53,6 +53,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1) / G_MAXINT8;
+   
+   swap_bytes = FALSE;
+@@ -193,6 +198,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1) / G_MAXINT16;
+   
+   swap_bytes = FALSE;
+@@ -333,6 +343,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1) / ((1 << 23) - 1);
+   
+   swap_bytes = FALSE;
+@@ -473,6 +488,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1) / G_MAXINT32;
+   
+   swap_bytes = FALSE;
+@@ -613,6 +633,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1) / G_MAXINT64;
+   
+   swap_bytes = FALSE;
+@@ -746,13 +771,18 @@
+  */
+ void
+ ags_char_buffer_util_copy_float_to_cbuffer(guchar *destination, guint word_size, guint dchannels,
+-					   float *source, guint schannels,
++					   gfloat *source, guint schannels,
+ 					   guint frame_count, guint byte_order)
+ {
+   gdouble scale_factor;
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1);
+   
+   swap_bytes = FALSE;
+@@ -890,13 +920,18 @@
+  */
+ void
+ ags_char_buffer_util_copy_double_to_cbuffer(guchar *destination, guint word_size, guint dchannels,
+-					    double *source, guint schannels,
++					    gdouble *source, guint schannels,
+ 					    guint frame_count, guint byte_order)
+ {
+   gdouble scale_factor;
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1);
+   
+   swap_bytes = FALSE;
+@@ -1041,6 +1076,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = G_MAXINT8 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
+   
+   swap_bytes = FALSE;
+@@ -1175,6 +1215,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = G_MAXINT16 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
+   
+   swap_bytes = FALSE;
+@@ -1309,6 +1354,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = ((1 << 23) - 1) / (((guint64) 1 << (word_size * 8 - 1)) - 1);
+   
+   swap_bytes = FALSE;
+@@ -1443,6 +1493,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = G_MAXINT32 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
+   
+   swap_bytes = FALSE;
+@@ -1577,6 +1632,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = G_MAXINT64 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
+   
+   swap_bytes = FALSE;
+@@ -1703,7 +1763,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_char_buffer_util_copy_cbuffer_to_float(float *destination, guint dchannels,
++ags_char_buffer_util_copy_cbuffer_to_float(gfloat *destination, guint dchannels,
+ 					   gint8 *source, guint word_size, guint schannels,
+ 					   guint frame_count, guint byte_order)
+ {
+@@ -1711,6 +1771,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = 1.0 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
+   
+   swap_bytes = FALSE;
+@@ -1837,7 +1902,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_char_buffer_util_copy_cbuffer_to_double(double *destination, guint dchannels,
++ags_char_buffer_util_copy_cbuffer_to_double(gdouble *destination, guint dchannels,
+ 					    guchar *source, guint word_size, guint schannels,
+ 					    guint frame_count, guint byte_order)
+ {
+@@ -1845,6 +1910,11 @@
+   guint i;
+   gboolean swap_bytes;
+ 
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   scale_factor = 1.0 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
+   
+   swap_bytes = FALSE;
+@@ -1977,6 +2047,11 @@
+ 					   guint frame_count, guint byte_order,
+ 					   guint word_size, guint mode)
+ {
++  if(destination == NULL ||
++     source == NULL){
++    return;
++  }
++  
+   switch(mode){
+   case AGS_CHAR_BUFFER_UTIL_COPY_S8_TO_CBUFFER:
+     {
+@@ -2016,14 +2091,14 @@
+   case AGS_CHAR_BUFFER_UTIL_COPY_FLOAT_TO_CBUFFER:
+     {
+       ags_char_buffer_util_copy_float_to_cbuffer(((guchar *) destination) + (doffset * word_size), word_size, dchannels,
+-						 ((float *) source) + soffset, schannels,
++						 ((gfloat *) source) + soffset, schannels,
+ 						 frame_count, byte_order);
+     }
+     break;
+   case AGS_CHAR_BUFFER_UTIL_COPY_DOUBLE_TO_CBUFFER:
+     {
+       ags_char_buffer_util_copy_double_to_cbuffer(((guchar *) destination) + (doffset * word_size), word_size, dchannels,
+-						  ((double *) source) + soffset, schannels,
++						  ((gdouble *) source) + soffset, schannels,
+ 						  frame_count, byte_order);
+     }
+     break;
+@@ -2064,14 +2139,14 @@
+     break;
+   case AGS_CHAR_BUFFER_UTIL_COPY_CBUFFER_TO_FLOAT:
+     {
+-      ags_char_buffer_util_copy_cbuffer_to_float(((float *) destination) + doffset, dchannels,
++      ags_char_buffer_util_copy_cbuffer_to_float(((gfloat *) destination) + doffset, dchannels,
+ 						 ((guchar *) source) + (soffset * word_size), word_size, schannels,
+ 						 frame_count, byte_order);
+     }
+     break;
+   case AGS_CHAR_BUFFER_UTIL_COPY_CBUFFER_TO_DOUBLE:
+     {
+-      ags_char_buffer_util_copy_cbuffer_to_double(((double *) destination) + doffset, dchannels,
++      ags_char_buffer_util_copy_cbuffer_to_double(((gdouble *) destination) + doffset, dchannels,
+ 						  ((guchar *) source) + (soffset * word_size), word_size, schannels,
+ 						  frame_count, byte_order);
+     }
+--- a/ags/audio/ags_char_buffer_util.h
++++ b/ags/audio/ags_char_buffer_util.h
+@@ -1,5 +1,5 @@
+ /* GSequencer - Advanced GTK Sequencer
+- * Copyright (C) 2005-2020 Joël Krähemann
++ * Copyright (C) 2005-2021 Joël Krähemann
+  *
+  * This file is part of GSequencer.
+  *
+@@ -80,10 +80,10 @@
+ 					      gint64 *source, guint schannels,
+ 					      guint frame_count, guint byte_order);
+ void ags_char_buffer_util_copy_float_to_cbuffer(guchar *destination, guint word_size, guint dchannels,
+-						float *source, guint schannels,
++						gfloat *source, guint schannels,
+ 						guint frame_count, guint byte_order);
+ void ags_char_buffer_util_copy_double_to_cbuffer(guchar *destination, guint word_size, guint dchannels,
+-						 double *source, guint schannels,
++						 gdouble *source, guint schannels,
+ 						 guint frame_count, guint byte_order);
+ 
+ /* copy from cbuffer */
+@@ -102,10 +102,10 @@
+ void ags_char_buffer_util_copy_cbuffer_to_s64(gint64 *destination, guint dchannels,
+ 					      guchar *source, guint word_size, guint schannels,
+ 					      guint frame_count, guint byte_order);
+-void ags_char_buffer_util_copy_cbuffer_to_float(float *destination, guint dchannels,
++void ags_char_buffer_util_copy_cbuffer_to_float(gfloat *destination, guint dchannels,
+ 						gint8 *source, guint word_size, guint schannels,
+ 						guint frame_count, guint byte_order);
+-void ags_char_buffer_util_copy_cbuffer_to_double(double *destination, guint dchannels,
++void ags_char_buffer_util_copy_cbuffer_to_double(gdouble *destination, guint dchannels,
+ 						 guchar *source, guint word_size, guint schannels,
+ 						 guint frame_count, guint byte_order);
+ 
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_fast_pitch_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_fast_pitch_util-c.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_fast_pitch_util-c.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_fast_pitch_util-c.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,100 @@
+Description: fix undefined behavior in ags_fast_pitch_util.c
+ ags_fast_pitch_util.c check buffer is NULL.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/ags_fast_pitch_util.c
++++ b/ags/audio/ags_fast_pitch_util.c
+@@ -66,6 +66,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i, j;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -379,6 +383,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i, j;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -692,6 +700,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i, j;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -1005,6 +1017,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i, j;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -1318,6 +1334,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i, j;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -1627,6 +1647,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i, j;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -1940,6 +1964,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i, j;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -2253,6 +2281,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i, j;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_filter_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_filter_util-c.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_filter_util-c.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_filter_util-c.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,100 @@
+Description: fix undefined behavior in ags_filter_util.c
+ ags_filter_util.c check buffer is NULL.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/ags_filter_util.c
++++ b/ags/audio/ags_filter_util.c
+@@ -66,6 +66,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -368,6 +372,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -670,6 +678,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -972,6 +984,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -1274,6 +1290,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -1576,6 +1596,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -1878,6 +1902,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
+@@ -2180,6 +2208,10 @@
+   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
+   gdouble t;
+   guint i;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   /* frequency */
+   base_freq = exp2((base_key) / 12.0) * 440.0;
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_fm_synth_util-ch.diff gsequencer-3.7.44/debian/patches/patch-ags_fm_synth_util-ch.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_fm_synth_util-ch.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_fm_synth_util-ch.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,789 @@
+Description: fix undefined behavior in ags_fm_synth_util.c
+ ags_fm_synth_util.c checkk if buffer is NULL. This patch fixes some type
+ safety problems with floating point numbers.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/ags_fm_synth_util.c
++++ b/ags/audio/ags_fm_synth_util.c
+@@ -1,5 +1,5 @@
+ /* GSequencer - Advanced GTK Sequencer
+- * Copyright (C) 2005-2020 Joël Krähemann
++ * Copyright (C) 2005-2021 Joël Krähemann
+  *
+  * This file is part of GSequencer.
+  *
+@@ -65,6 +65,10 @@
+   static const gdouble scale = 127.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -133,6 +137,10 @@
+ {
+   static const gdouble scale = 32767.0;
+   guint i;
++
++  if(buffer == NULL){
++    return;
++  }
+     
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+@@ -203,6 +211,10 @@
+   static const gdouble scale = 8388607.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -272,6 +284,10 @@
+   static const gdouble scale = 214748363.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -341,6 +357,10 @@
+   static const gdouble scale = 9223372036854775807.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -399,7 +419,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_fm_synth_util_sin_float(float *buffer,
++ags_fm_synth_util_sin_float(gfloat *buffer,
+ 			    gdouble freq, gdouble phase, gdouble volume,
+ 			    guint samplerate,
+ 			    guint offset, guint n_frames,
+@@ -409,6 +429,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -467,7 +491,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_fm_synth_util_sin_double(double *buffer,
++ags_fm_synth_util_sin_double(gdouble *buffer,
+ 			     gdouble freq, gdouble phase, gdouble volume,
+ 			     guint samplerate,
+ 			     guint offset, guint n_frames,
+@@ -477,6 +501,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -551,6 +579,10 @@
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   c_ptr = buffer;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -635,6 +667,10 @@
+   static const gdouble scale = 127.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -707,6 +743,10 @@
+   static const gdouble scale = 32767.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -779,6 +819,10 @@
+   static const gdouble scale = 8388607.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -851,6 +895,10 @@
+   static const gdouble scale = 214748363.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -923,6 +971,10 @@
+   static const gdouble scale = 9223372036854775807.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -984,7 +1036,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_fm_synth_util_sawtooth_float(float *buffer,
++ags_fm_synth_util_sawtooth_float(gfloat *buffer,
+ 				 gdouble freq, gdouble phase, gdouble volume,
+ 				 guint samplerate,
+ 				 guint offset, guint n_frames,
+@@ -994,6 +1046,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1055,7 +1111,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_fm_synth_util_sawtooth_double(double *buffer,
++ags_fm_synth_util_sawtooth_double(gdouble *buffer,
+ 				  gdouble freq, gdouble phase, gdouble volume,
+ 				  guint samplerate,
+ 				  guint offset, guint n_frames,
+@@ -1065,6 +1121,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1142,6 +1202,10 @@
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1229,6 +1293,10 @@
+   static const gdouble scale = 127.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1301,6 +1369,10 @@
+   static const gdouble scale = 32767.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1374,6 +1446,10 @@
+   gdouble current_freq;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1445,6 +1521,10 @@
+ {
+   static const gdouble scale = 214748363.0;
+   guint i;
++
++  if(buffer == NULL){
++    return;
++  }
+   
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+@@ -1518,6 +1598,10 @@
+   static const gdouble scale = 9223372036854775807.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1579,7 +1663,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_fm_synth_util_triangle_float(float *buffer,
++ags_fm_synth_util_triangle_float(gfloat *buffer,
+ 				 gdouble freq, gdouble phase, gdouble volume,
+ 				 guint samplerate,
+ 				 guint offset, guint n_frames,
+@@ -1589,6 +1673,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1650,7 +1738,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_fm_synth_util_triangle_double(double *buffer,
++ags_fm_synth_util_triangle_double(gdouble *buffer,
+ 				  gdouble freq, gdouble phase, gdouble volume,
+ 				  guint samplerate,
+ 				  guint offset, guint n_frames,
+@@ -1660,6 +1748,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1737,6 +1829,10 @@
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1824,6 +1920,10 @@
+   static const gdouble scale = 127.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -1913,6 +2013,10 @@
+   static const gdouble scale = 32767.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -2002,6 +2106,10 @@
+   static const gdouble scale = 8388607.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -2091,6 +2199,10 @@
+   static const gdouble scale = 214748363.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -2180,6 +2292,10 @@
+   static const gdouble scale = 9223372036854775807.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -2258,7 +2374,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_fm_synth_util_square_float(float *buffer,
++ags_fm_synth_util_square_float(gfloat *buffer,
+ 			       gdouble freq, gdouble phase, gdouble volume,
+ 			       guint samplerate,
+ 			       guint offset, guint n_frames,
+@@ -2268,6 +2384,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -2346,7 +2466,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_fm_synth_util_square_double(double *buffer,
++ags_fm_synth_util_square_double(gdouble *buffer,
+ 				gdouble freq, gdouble phase, gdouble volume,
+ 				guint samplerate,
+ 				guint offset, guint n_frames,
+@@ -2356,6 +2476,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -2451,6 +2575,10 @@
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   c_ptr = buffer;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -2555,6 +2683,10 @@
+   static const gdouble scale = 127.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -2644,6 +2776,10 @@
+   static const gdouble scale = 32767.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -2733,6 +2869,10 @@
+   static const gdouble scale = 8388607.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -2822,6 +2962,10 @@
+   static const gdouble scale = 214748363.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -2911,6 +3055,10 @@
+   static const gdouble scale = 9223372036854775807.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -2989,7 +3137,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_fm_synth_util_impulse_float(float *buffer,
++ags_fm_synth_util_impulse_float(gfloat *buffer,
+ 				gdouble freq, gdouble phase, gdouble volume,
+ 				guint samplerate,
+ 				guint offset, guint n_frames,
+@@ -2999,6 +3147,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -3077,7 +3229,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_fm_synth_util_impulse_double(double *buffer,
++ags_fm_synth_util_impulse_double(gdouble *buffer,
+ 				 gdouble freq, gdouble phase, gdouble volume,
+ 				 guint samplerate,
+ 				 guint offset, guint n_frames,
+@@ -3087,6 +3239,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(lfo_osc_mode){
+   case AGS_SYNTH_OSCILLATOR_SIN:
+   {
+@@ -3181,6 +3337,10 @@
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   c_ptr = buffer;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -3283,6 +3443,10 @@
+ 		      gdouble lfo_freq, gdouble lfo_depth,
+ 		      gdouble tuning)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -3341,7 +3505,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_fm_synth_util_sin_float((float *) buffer,
++    ags_fm_synth_util_sin_float((gfloat *) buffer,
+ 				freq, phase, volume,
+ 				samplerate,
+ 				offset, n_frames,
+@@ -3352,7 +3516,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_fm_synth_util_sin_double((double *) buffer,
++    ags_fm_synth_util_sin_double((gdouble *) buffer,
+ 				 freq, phase, volume,
+ 				 samplerate,
+ 				 offset, n_frames,
+@@ -3407,6 +3571,10 @@
+ 			   gdouble lfo_freq, gdouble lfo_depth,
+ 			   gdouble tuning)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -3465,7 +3633,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_fm_synth_util_sawtooth_float((float *) buffer,
++    ags_fm_synth_util_sawtooth_float((gfloat *) buffer,
+ 				     freq, phase, volume,
+ 				     samplerate,
+ 				     offset, n_frames,
+@@ -3476,7 +3644,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_fm_synth_util_sawtooth_double((double *) buffer,
++    ags_fm_synth_util_sawtooth_double((gdouble *) buffer,
+ 				      freq, phase, volume,
+ 				      samplerate,
+ 				      offset, n_frames,
+@@ -3531,6 +3699,10 @@
+ 			   gdouble lfo_freq, gdouble lfo_depth,
+ 			   gdouble tuning)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -3589,7 +3761,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_fm_synth_util_triangle_float((float *) buffer,
++    ags_fm_synth_util_triangle_float((gfloat *) buffer,
+ 				     freq, phase, volume,
+ 				     samplerate,
+ 				     offset, n_frames,
+@@ -3600,7 +3772,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_fm_synth_util_triangle_double((double *) buffer,
++    ags_fm_synth_util_triangle_double((gdouble *) buffer,
+ 				      freq, phase, volume,
+ 				      samplerate,
+ 				      offset, n_frames,
+@@ -3655,6 +3827,10 @@
+ 			 gdouble lfo_freq, gdouble lfo_depth,
+ 			 gdouble tuning)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -3713,7 +3889,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_fm_synth_util_square_float((float *) buffer,
++    ags_fm_synth_util_square_float((gfloat *) buffer,
+ 				   freq, phase, volume,
+ 				   samplerate,
+ 				   offset, n_frames,
+@@ -3724,7 +3900,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_fm_synth_util_square_double((double *) buffer,
++    ags_fm_synth_util_square_double((gdouble *) buffer,
+ 				    freq, phase, volume,
+ 				    samplerate,
+ 				    offset, n_frames,
+@@ -3779,6 +3955,10 @@
+ 			  gdouble lfo_freq, gdouble lfo_depth,
+ 			  gdouble tuning)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -3837,7 +4017,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_fm_synth_util_impulse_float((float *) buffer,
++    ags_fm_synth_util_impulse_float((gfloat *) buffer,
+ 				    freq, phase, volume,
+ 				    samplerate,
+ 				    offset, n_frames,
+@@ -3848,7 +4028,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_fm_synth_util_impulse_double((double *) buffer,
++    ags_fm_synth_util_impulse_double((gdouble *) buffer,
+ 				     freq, phase, volume,
+ 				     samplerate,
+ 				     offset, n_frames,
+--- a/ags/audio/ags_fm_synth_util.h
++++ b/ags/audio/ags_fm_synth_util.h
+@@ -1,5 +1,5 @@
+ /* GSequencer - Advanced GTK Sequencer
+- * Copyright (C) 2005-2019 Joël Krähemann
++ * Copyright (C) 2005-2021 Joël Krähemann
+  *
+  * This file is part of GSequencer.
+  *
+@@ -63,14 +63,14 @@
+ 			       guint lfo_osc_mode,
+ 			       gdouble lfo_freq, gdouble lfo_depth,
+ 			       gdouble tuning);
+-void ags_fm_synth_util_sin_float(float *buffer,
++void ags_fm_synth_util_sin_float(gfloat *buffer,
+ 				 gdouble freq, gdouble phase, gdouble volume,
+ 				 guint samplerate,
+ 				 guint offset, guint n_frames,
+ 				 guint lfo_osc_mode,
+ 				 gdouble lfo_freq, gdouble lfo_depth,
+ 				 gdouble tuning);
+-void ags_fm_synth_util_sin_double(double *buffer,
++void ags_fm_synth_util_sin_double(gdouble *buffer,
+ 				  gdouble freq, gdouble phase, gdouble volume,
+ 				  guint samplerate,
+ 				  guint offset, guint n_frames,
+@@ -121,14 +121,14 @@
+ 				    guint lfo_osc_mode,
+ 				    gdouble lfo_freq, gdouble lfo_depth,
+ 				    gdouble tuning);
+-void ags_fm_synth_util_sawtooth_float(float *buffer,
++void ags_fm_synth_util_sawtooth_float(gfloat *buffer,
+ 				      gdouble freq, gdouble phase, gdouble volume,
+ 				      guint samplerate,
+ 				      guint offset, guint n_frames,
+ 				      guint lfo_osc_mode,
+ 				      gdouble lfo_freq, gdouble lfo_depth,
+ 				      gdouble tuning);
+-void ags_fm_synth_util_sawtooth_double(double *buffer,
++void ags_fm_synth_util_sawtooth_double(gdouble *buffer,
+ 				       gdouble freq, gdouble phase, gdouble volume,
+ 				       guint samplerate,
+ 				       guint offset, guint n_frames,
+@@ -179,14 +179,14 @@
+ 				    guint lfo_osc_mode,
+ 				    gdouble lfo_freq, gdouble lfo_depth,
+ 				    gdouble tuning);
+-void ags_fm_synth_util_triangle_float(float *buffer,
++void ags_fm_synth_util_triangle_float(gfloat *buffer,
+ 				      gdouble freq, gdouble phase, gdouble volume,
+ 				      guint samplerate,
+ 				      guint offset, guint n_frames,
+ 				      guint lfo_osc_mode,
+ 				      gdouble lfo_freq, gdouble lfo_depth,
+ 				      gdouble tuning);
+-void ags_fm_synth_util_triangle_double(double *buffer,
++void ags_fm_synth_util_triangle_double(gdouble *buffer,
+ 				       gdouble freq, gdouble phase, gdouble volume,
+ 				       guint samplerate,
+ 				       guint offset, guint n_frames,
+@@ -237,14 +237,14 @@
+ 				  guint lfo_osc_mode,
+ 				  gdouble lfo_freq, gdouble lfo_depth,
+ 				  gdouble tuning);
+-void ags_fm_synth_util_square_float(float *buffer,
++void ags_fm_synth_util_square_float(gfloat *buffer,
+ 				    gdouble freq, gdouble phase, gdouble volume,
+ 				    guint samplerate,
+ 				    guint offset, guint n_frames,
+ 				    guint lfo_osc_mode,
+ 				    gdouble lfo_freq, gdouble lfo_depth,
+ 				    gdouble tuning);
+-void ags_fm_synth_util_square_double(double *buffer,
++void ags_fm_synth_util_square_double(gdouble *buffer,
+ 				     gdouble freq, gdouble phase, gdouble volume,
+ 				     guint samplerate,
+ 				     guint offset, guint n_frames,
+@@ -295,14 +295,14 @@
+ 				   guint lfo_osc_mode,
+ 				   gdouble lfo_freq, gdouble lfo_depth,
+ 				   gdouble tuning);
+-void ags_fm_synth_util_impulse_float(float *buffer,
++void ags_fm_synth_util_impulse_float(gfloat *buffer,
+ 				     gdouble freq, gdouble phase, gdouble volume,
+ 				     guint samplerate,
+ 				     guint offset, guint n_frames,
+ 				     guint lfo_osc_mode,
+ 				     gdouble lfo_freq, gdouble lfo_depth,
+ 				     gdouble tuning);
+-void ags_fm_synth_util_impulse_double(double *buffer,
++void ags_fm_synth_util_impulse_double(gdouble *buffer,
+ 				      gdouble freq, gdouble phase, gdouble volume,
+ 				      guint samplerate,
+ 				      guint offset, guint n_frames,
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_fourier_transform_util-h.diff gsequencer-3.7.44/debian/patches/patch-ags_fourier_transform_util-h.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_fourier_transform_util-h.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_fourier_transform_util-h.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,138 @@
+Description: fix complex type in ags_fourier_transform_util.c
+ ags_fourier_transform_util.c did use wrong complex data type.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/ags_fourier_transform_util.h
++++ b/ags/audio/ags_fourier_transform_util.h
+@@ -30,7 +30,7 @@
+ 
+ G_BEGIN_DECLS
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S8_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S8_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_h;							\
+     gdouble l_k;							\
+     gdouble l_r;							\
+@@ -46,7 +46,7 @@
+     									\
+     ags_complex_set(x_retval[0], l_z); }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S16_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval)  { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S16_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval)  { double _Complex l_z; \
+     gdouble l_h;							\
+     gdouble l_k;							\
+     gdouble l_r;							\
+@@ -62,7 +62,7 @@
+     									\
+     ags_complex_set(x_retval[0], l_z); }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S24_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S24_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_h;							\
+     gdouble l_k;							\
+     gdouble l_r;							\
+@@ -78,7 +78,7 @@
+     									\
+     ags_complex_set(x_retval[0], l_z); }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S32_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S32_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_h;							\
+     gdouble l_k;							\
+     gdouble l_r;							\
+@@ -94,7 +94,7 @@
+     									\
+     ags_complex_set(x_retval[0], l_z); }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S64_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S64_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_h;							\
+     gdouble l_k;							\
+     gdouble l_r;							\
+@@ -110,7 +110,7 @@
+     									\
+     ags_complex_set(x_retval[0], l_z); }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_FLOAT_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_FLOAT_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_h;							\
+     gdouble l_k;							\
+     gdouble l_r;							\
+@@ -124,7 +124,7 @@
+     									\
+     ags_complex_set(x_retval[0], l_z); }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_DOUBLE_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_DOUBLE_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_h;							\
+     gdouble l_k;							\
+     gdouble l_r;							\
+@@ -138,7 +138,7 @@
+     									\
+     ags_complex_set(x_retval[0], l_z); }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S8_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S8_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_k;							\
+     gdouble l_y;							\
+ 									\
+@@ -152,7 +152,7 @@
+ 									\
+     x_retval[0][0] = scale * l_y; }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S16_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S16_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_k;							\
+     gdouble l_y;							\
+ 									\
+@@ -166,7 +166,7 @@
+ 									\
+     x_retval[0][0] = scale * l_y; }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S24_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S24_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_k;							\
+     gdouble l_y;							\
+ 									\
+@@ -180,7 +180,7 @@
+ 									\
+     x_retval[0][0] = scale * l_y; }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S32_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S32_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_k;							\
+     gdouble l_y;							\
+ 									\
+@@ -194,7 +194,7 @@
+ 									\
+     x_retval[0][0] = scale * l_y; }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S64_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S64_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_k;							\
+     gdouble l_y;							\
+ 									\
+@@ -208,7 +208,7 @@
+ 									\
+     x_retval[0][0] = scale * l_y; }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_FLOAT_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_FLOAT_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_k;							\
+     gdouble l_y;							\
+ 									\
+@@ -220,7 +220,7 @@
+ 									\
+     x_retval[0][0] = l_y / M_PI; }
+ 
+-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_DOUBLE_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_DOUBLE_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
+     gdouble l_k;							\
+     gdouble l_y;							\
+ 									\
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_lfo_synth_util-ch.diff gsequencer-3.7.44/debian/patches/patch-ags_lfo_synth_util-ch.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_lfo_synth_util-ch.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_lfo_synth_util-ch.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,822 @@
+Description: check if buffer is NULL and corrected floating point number type
+ ags_lfo_synth_util.[ch] was using wrong floating point number types and check
+ if buffer NULL.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/ags_lfo_synth_util.c
++++ b/ags/audio/ags_lfo_synth_util.c
+@@ -60,6 +60,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (gint8) (0xff & (gint16) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth)));
+   }
+@@ -90,6 +94,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (gint16) (0xffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth)));
+   }
+@@ -120,6 +128,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (gint32) (0xffffffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth)));
+   }
+@@ -150,6 +162,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (gint32) (0xffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth)));
+   }
+@@ -180,6 +196,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (gint64) (0xffffffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth)));
+   }
+@@ -201,7 +221,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_lfo_synth_util_sin_float(float *buffer,
++ags_lfo_synth_util_sin_float(gfloat *buffer,
+ 			     gdouble freq, gdouble phase,
+ 			     gdouble depth,
+ 			     gdouble tuning,
+@@ -210,6 +230,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (float) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth));
+   }
+@@ -231,7 +255,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_lfo_synth_util_sin_double(double *buffer,
++ags_lfo_synth_util_sin_double(gdouble *buffer,
+ 			      gdouble freq, gdouble phase,
+ 			      gdouble depth,
+ 			      gdouble tuning,
+@@ -240,6 +264,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (double) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth));
+   }
+@@ -272,13 +300,17 @@
+   AgsComplex *c_ptr;
+   AgsComplex **c_ptr_ptr;
+ 
+-  double *y_ptr;
+-  double y;
++  gdouble *y_ptr;
++  gdouble y;
+   double _Complex z0, z1;
+ 
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   c_ptr = &c;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -326,6 +358,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -359,6 +395,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -392,6 +432,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -425,6 +469,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -458,6 +506,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -482,7 +534,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_lfo_synth_util_sawtooth_float(float *buffer,
++ags_lfo_synth_util_sawtooth_float(gfloat *buffer,
+ 				  gdouble freq, gdouble phase,
+ 				  gdouble depth,
+ 				  gdouble tuning,
+@@ -491,6 +543,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -515,7 +571,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_lfo_synth_util_sawtooth_double(double *buffer,
++ags_lfo_synth_util_sawtooth_double(gdouble *buffer,
+ 				   gdouble freq, gdouble phase,
+ 				   gdouble depth,
+ 				   gdouble tuning,
+@@ -524,6 +580,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -559,13 +619,17 @@
+   AgsComplex *c_ptr;
+   AgsComplex **c_ptr_ptr;
+ 
+-  double *y_ptr;
+-  double y;
++  gdouble *y_ptr;
++  gdouble y;
+   double _Complex z0, z1;
+ 
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -616,6 +680,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -649,6 +717,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -682,6 +754,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -715,6 +791,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -748,6 +828,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -772,7 +856,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_lfo_synth_util_triangle_float(float *buffer,
++ags_lfo_synth_util_triangle_float(gfloat *buffer,
+ 				  gdouble freq, gdouble phase,
+ 				  gdouble depth,
+ 				  gdouble tuning,
+@@ -781,6 +865,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -805,7 +893,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_lfo_synth_util_triangle_double(double *buffer,
++ags_lfo_synth_util_triangle_double(gdouble *buffer,
+ 				   gdouble freq, gdouble phase,
+ 				   gdouble depth,
+ 				   gdouble tuning,
+@@ -814,6 +902,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -849,13 +941,17 @@
+   AgsComplex *c_ptr;
+   AgsComplex **c_ptr_ptr;
+ 
+-  double *y_ptr;
+-  double y;
++  gdouble *y_ptr;
++  gdouble y;
+   double _Complex z0, z1;
+ 
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -906,6 +1002,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (gint8) (0xff & (gint16) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
+@@ -940,6 +1040,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (gint16) (0xffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
+@@ -974,6 +1078,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (gint32) (0xffffffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
+@@ -1008,6 +1116,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (gint32) (0xffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
+@@ -1042,6 +1154,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (gint64) (0xffffffffffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
+@@ -1067,7 +1183,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_lfo_synth_util_square_float(float *buffer,
++ags_lfo_synth_util_square_float(gfloat *buffer,
+ 				gdouble freq, gdouble phase,
+ 				gdouble depth,
+ 				gdouble tuning,
+@@ -1076,6 +1192,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (buffer[i] * (tuning / 1200.0 + 1.0 * depth));
+@@ -1101,7 +1221,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_lfo_synth_util_square_double(double *buffer,
++ags_lfo_synth_util_square_double(gdouble *buffer,
+ 				 gdouble freq, gdouble phase,
+ 				 gdouble depth,
+ 				 gdouble tuning,
+@@ -1110,6 +1230,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (buffer[i] * (tuning / 1200.0 + 1.0 * depth));
+@@ -1146,13 +1270,17 @@
+   AgsComplex *c_ptr;
+   AgsComplex **c_ptr_ptr;
+ 
+-  double *y_ptr;
+-  double y;
++  gdouble *y_ptr;
++  gdouble y;
+   double _Complex z0, z1;
+ 
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   c_ptr = &c;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -1204,6 +1332,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (gint8) (0xff & (gint16) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
+@@ -1238,6 +1370,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (gint16) (0xffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
+@@ -1272,6 +1408,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (gint32) (0xffffffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
+@@ -1306,6 +1446,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (gint32) (0xffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
+@@ -1340,6 +1484,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (gint64) (0xffffffffffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
+@@ -1365,7 +1513,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_lfo_synth_util_impulse_float(float *buffer,
++ags_lfo_synth_util_impulse_float(gfloat *buffer,
+ 				 gdouble freq, gdouble phase,
+ 				 gdouble depth,
+ 				 gdouble tuning,
+@@ -1374,6 +1522,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (buffer[i] * (tuning / 1200.0 + 1.0 * depth));
+@@ -1399,7 +1551,7 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_lfo_synth_util_impulse_double(double *buffer,
++ags_lfo_synth_util_impulse_double(gdouble *buffer,
+ 				  gdouble freq, gdouble phase,
+ 				  gdouble depth,
+ 				  gdouble tuning,
+@@ -1408,6 +1560,10 @@
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (buffer[i] * (tuning / 1200.0 + 1.0 * depth));
+@@ -1444,13 +1600,17 @@
+   AgsComplex *c_ptr;
+   AgsComplex **c_ptr_ptr;
+ 
+-  double *y_ptr;
+-  double y;
++  gdouble *y_ptr;
++  gdouble y;
+   double _Complex z0, z1;
+ 
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   c_ptr = &c;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -1501,6 +1661,10 @@
+ 		       guint samplerate, guint audio_buffer_util_format,
+ 		       guint offset, guint n_frames)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -1554,7 +1718,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_lfo_synth_util_sin_float((float *) buffer,
++    ags_lfo_synth_util_sin_float((gfloat *) buffer,
+ 				 freq, phase,
+ 				 depth,
+ 				 tuning,
+@@ -1564,7 +1728,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_lfo_synth_util_sin_double((double *) buffer,
++    ags_lfo_synth_util_sin_double((gdouble *) buffer,
+ 				  freq, phase,
+ 				  depth,
+ 				  tuning,
+@@ -1613,6 +1777,10 @@
+ 			    guint samplerate, guint audio_buffer_util_format,
+ 			    guint offset, guint n_frames)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -1666,7 +1834,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_lfo_synth_util_sawtooth_float((float *) buffer,
++    ags_lfo_synth_util_sawtooth_float((gfloat *) buffer,
+ 				      freq, phase,
+ 				      depth,
+ 				      tuning,
+@@ -1676,7 +1844,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_lfo_synth_util_sawtooth_double((double *) buffer,
++    ags_lfo_synth_util_sawtooth_double((gdouble *) buffer,
+ 				       freq, phase,
+ 				       depth,
+ 				       tuning,
+@@ -1725,6 +1893,10 @@
+ 			    guint samplerate, guint audio_buffer_util_format,
+ 			    guint offset, guint n_frames)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -1778,7 +1950,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_lfo_synth_util_triangle_float((float *) buffer,
++    ags_lfo_synth_util_triangle_float((gfloat *) buffer,
+ 				      freq, phase,
+ 				      depth,
+ 				      tuning,
+@@ -1788,7 +1960,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_lfo_synth_util_triangle_double((double *) buffer,
++    ags_lfo_synth_util_triangle_double((gdouble *) buffer,
+ 				       freq, phase,
+ 				       depth,
+ 				       tuning,
+@@ -1837,6 +2009,10 @@
+ 			  guint samplerate, guint audio_buffer_util_format,
+ 			  guint offset, guint n_frames)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -1890,7 +2066,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_lfo_synth_util_square_float((float *) buffer,
++    ags_lfo_synth_util_square_float((gfloat *) buffer,
+ 				    freq, phase,
+ 				    depth,
+ 				    tuning,
+@@ -1900,7 +2076,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_lfo_synth_util_square_double((double *) buffer,
++    ags_lfo_synth_util_square_double((gdouble *) buffer,
+ 				     freq, phase,
+ 				     depth,
+ 				     tuning,
+@@ -1949,6 +2125,10 @@
+ 			   guint samplerate, guint audio_buffer_util_format,
+ 			   guint offset, guint n_frames)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -2002,7 +2182,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_lfo_synth_util_impulse_float((float *) buffer,
++    ags_lfo_synth_util_impulse_float((gfloat *) buffer,
+ 				     freq, phase,
+ 				     depth,
+ 				     tuning,
+@@ -2012,7 +2192,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_lfo_synth_util_impulse_double((double *) buffer,
++    ags_lfo_synth_util_impulse_double((gdouble *) buffer,
+ 				      freq, phase,
+ 				      depth,
+ 				      tuning,
+--- a/ags/audio/ags_lfo_synth_util.h
++++ b/ags/audio/ags_lfo_synth_util.h
+@@ -1,5 +1,5 @@
+ /* GSequencer - Advanced GTK Sequencer
+- * Copyright (C) 2005-2019 Joël Krähemann
++ * Copyright (C) 2005-2021 Joël Krähemann
+  *
+  * This file is part of GSequencer.
+  *
+@@ -58,13 +58,13 @@
+ 				gdouble tuning,
+ 				guint samplerate,
+ 				guint offset, guint n_frames);
+-void ags_lfo_synth_util_sin_float(float *buffer,
++void ags_lfo_synth_util_sin_float(gfloat *buffer,
+ 				  gdouble freq, gdouble phase,
+ 				  gdouble depth,
+ 				  gdouble tuning,
+ 				  guint samplerate,
+ 				  guint offset, guint n_frames);
+-void ags_lfo_synth_util_sin_double(double *buffer,
++void ags_lfo_synth_util_sin_double(gdouble *buffer,
+ 				   gdouble freq, gdouble phase,
+ 				   gdouble depth,
+ 				   gdouble tuning,
+@@ -108,13 +108,13 @@
+ 				     gdouble tuning,
+ 				     guint samplerate,
+ 				     guint offset, guint n_frames);
+-void ags_lfo_synth_util_sawtooth_float(float *buffer,
++void ags_lfo_synth_util_sawtooth_float(gfloat *buffer,
+ 				       gdouble freq, gdouble phase,
+ 				       gdouble depth,
+ 				       gdouble tuning,
+ 				       guint samplerate,
+ 				       guint offset, guint n_frames);
+-void ags_lfo_synth_util_sawtooth_double(double *buffer,
++void ags_lfo_synth_util_sawtooth_double(gdouble *buffer,
+ 					gdouble freq, gdouble phase,
+ 					gdouble depth,
+ 					gdouble tuning,
+@@ -158,13 +158,13 @@
+ 				     gdouble tuning,
+ 				     guint samplerate,
+ 				     guint offset, guint n_frames);
+-void ags_lfo_synth_util_triangle_float(float *buffer,
++void ags_lfo_synth_util_triangle_float(gfloat *buffer,
+ 				       gdouble freq, gdouble phase,
+ 				       gdouble depth,
+ 				       gdouble tuning,
+ 				       guint samplerate,
+ 				       guint offset, guint n_frames);
+-void ags_lfo_synth_util_triangle_double(double *buffer,
++void ags_lfo_synth_util_triangle_double(gdouble *buffer,
+ 					gdouble freq, gdouble phase,
+ 					gdouble depth,
+ 					gdouble tuning,
+@@ -208,13 +208,13 @@
+ 				   gdouble tuning,
+ 				   guint samplerate,
+ 				   guint offset, guint n_frames);
+-void ags_lfo_synth_util_square_float(float *buffer,
++void ags_lfo_synth_util_square_float(gfloat *buffer,
+ 				     gdouble freq, gdouble phase,
+ 				     gdouble depth,
+ 				     gdouble tuning,
+ 				     guint samplerate,
+ 				     guint offset, guint n_frames);
+-void ags_lfo_synth_util_square_double(double *buffer,
++void ags_lfo_synth_util_square_double(gdouble *buffer,
+ 				      gdouble freq, gdouble phase,
+ 				      gdouble depth,
+ 				      gdouble tuning,
+@@ -258,13 +258,13 @@
+ 				    gdouble tuning,
+ 				    guint samplerate,
+ 				    guint offset, guint n_frames);
+-void ags_lfo_synth_util_impulse_float(float *buffer,
++void ags_lfo_synth_util_impulse_float(gfloat *buffer,
+ 				      gdouble freq, gdouble phase,
+ 				      gdouble depth,
+ 				      gdouble tuning,
+ 				      guint samplerate,
+ 				      guint offset, guint n_frames);
+-void ags_lfo_synth_util_impulse_double(double *buffer,
++void ags_lfo_synth_util_impulse_double(gdouble *buffer,
+ 				       gdouble freq, gdouble phase,
+ 				       gdouble depth,
+ 				       gdouble tuning,
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_midi_buffer_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_midi_buffer_util-c.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_midi_buffer_util-c.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_midi_buffer_util-c.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,536 @@
+Description: fix undefined behavior in ags_midi_buffer_util.c
+ ags_midi_buffer_util.c didn't set output variables if buffer is NULL.
+ GCC might complain about maybe-unitialized and with appropriate flags
+ compilation will fail.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-03
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/midi/ags_midi_buffer_util.c
++++ b/ags/audio/midi/ags_midi_buffer_util.c
+@@ -132,6 +132,10 @@
+   char c;
+ 
+   if(buffer == NULL){
++    if(varlength != NULL){
++      *varlength = 0;
++    }
++    
+     return(0);
+   }
+ 
+@@ -192,6 +196,10 @@
+   glong tmp;
+ 
+   if(buffer == NULL){
++    if(val != NULL){
++      *val = 0;
++    }
++    
+     return;
+   }
+ 
+@@ -241,6 +249,10 @@
+   glong tmp;
+ 
+   if(buffer == NULL){
++    if(val != NULL){
++      *val = 0;
++    }
++
+     return;
+   }
+   
+@@ -292,6 +304,10 @@
+   glong tmp;
+ 
+   if(buffer == NULL){
++    if(val != NULL){
++      *val = 0;
++    }
++
+     return;
+   }
+   
+@@ -369,9 +385,26 @@
+ {
+   static gchar header[] = "MThd";
+ 
+-  if(g_ascii_strncasecmp(buffer,
+-			 header,
+-			 4)){
++  if(buffer == NULL ||
++     (!g_ascii_strncasecmp(buffer,
++			   header,
++			   4)) == FALSE){
++    if(offset != NULL){
++      *offset = 0;
++    }
++    
++    if(format != NULL){
++      *format = 0;
++    }
++
++    if(track_count != NULL){
++      *track_count = 0;
++    }
++
++    if(division != NULL){
++      *division = 0;
++    }
++    
+     return(0);
+   }
+   
+@@ -438,13 +471,14 @@
+ {
+   static gchar track[] = "MTrk";
+ 
+-  if(buffer == NULL){
+-    return(0);
+-  }
+-  
+-  if(g_ascii_strncasecmp(buffer,
+-			 track,
+-			 4)){
++  if(buffer == NULL ||
++     (!g_ascii_strncasecmp(buffer,
++			   track,
++			   4)) == FALSE){
++    if(offset != NULL){
++      *offset = 0;
++    }
++
+     return(0);
+   }
+ 
+@@ -520,6 +554,22 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(channel != NULL){
++      *channel = 0;
++    }
++
++    if(key != NULL){
++      *key = 0;
++    }
++
++    if(velocity != NULL){
++      *velocity = 0;
++    }
++    
+     return(0);
+   }
+ 
+@@ -615,6 +665,22 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(channel != NULL){
++      *channel = 0;
++    }
++
++    if(key != NULL){
++      *key = 0;
++    }
++
++    if(velocity != NULL){
++      *velocity = 0;
++    }
++
+     return(0);
+   }
+ 
+@@ -710,6 +776,22 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(channel != NULL){
++      *channel = 0;
++    }
++
++    if(key != NULL){
++      *key = 0;
++    }
++
++    if(pressure != NULL){
++      *pressure = 0;
++    }
++
+     return(0);
+   }
+ 
+@@ -805,6 +887,22 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(channel != NULL){
++      *channel = 0;
++    }
++
++    if(control != NULL){
++      *control = 0;
++    }
++
++    if(value != NULL){
++      *value = 0;
++    }
++
+     return(0);
+   }
+ 
+@@ -900,6 +998,22 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(channel != NULL){
++      *channel = 0;
++    }
++
++    if(pitch != NULL){
++      *pitch = 0;
++    }
++
++    if(transmitter != NULL){
++      *transmitter = 0;
++    }
++
+     return(0);
+   }
+ 
+@@ -988,6 +1102,18 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(channel != NULL){
++      *channel = 0;
++    }
++
++    if(program != NULL){
++      *program = 0;
++    }
++
+     return(0);
+   }
+ 
+@@ -1071,6 +1197,18 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(channel != NULL){
++      *channel = 0;
++    }
++
++    if(pressure != NULL){
++      *pressure = 0;
++    }
++
+     return(0);
+   }
+ 
+@@ -1157,6 +1295,18 @@
+   guint i;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(data != NULL){
++      *data = NULL;
++    }
++
++    if(length != NULL){
++      *length = 0;
++    }
++
+     return(0);
+   }
+   
+@@ -1249,6 +1399,18 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(message_type != NULL){
++      *message_type = 0;
++    }
++
++    if(values != NULL){
++      *values = 0;
++    }
++
+     return(0);
+   }
+   
+@@ -1326,6 +1488,14 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(song_position != NULL){
++      *song_position = 0;
++    }
++
+     return(0);
+   }
+ 
+@@ -1400,6 +1570,14 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(song_select != NULL){
++      *song_select = 0;
++    }
++
+     return(0);
+   }
+   
+@@ -1465,6 +1643,10 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
+     return(0);
+   }
+   
+@@ -1540,6 +1722,14 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(sequence != NULL){
++      *sequence = 0;
++    }
++
+     return(0);
+   }
+   
+@@ -1640,6 +1830,30 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(rr != NULL){
++      *rr = 0;
++    }
++
++    if(hr != NULL){
++      *hr = 0;
++    }
++
++    if(mn != NULL){
++      *mn = 0;
++    }
++
++    if(se != NULL){
++      *se = 0;
++    }
++
++    if(fr != NULL){
++      *fr = 0;
++    }
++
+     return(0);
+   }
+   
+@@ -1740,6 +1954,14 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(tempo != NULL){
++      *tempo = 0;
++    }
++
+     return(0);
+   }
+   
+@@ -1833,6 +2055,26 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(nn != NULL){
++      *nn = 0;
++    }
++
++    if(dd != NULL){
++      *dd = 0;
++    }
++
++    if(cc != NULL){
++      *cc = 0;
++    }
++
++    if(bb != NULL){
++      *bb = 0;
++    }
++
+     return(0);
+   }
+   
+@@ -1932,6 +2174,18 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(sf != NULL){
++      *sf = 0;
++    }
++
++    if(mi != NULL){
++      *mi = 0;
++    }
++
+     return(0);
+   }
+   
+@@ -2033,6 +2287,22 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(len != NULL){
++      *len = 0;
++    }
++
++    if(id != NULL){
++      *id = 0;
++    }
++
++    if(data != NULL){
++      *data = 0;
++    }
++
+     return(0);
+   }
+   
+@@ -2134,6 +2404,18 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
++    if(text != NULL){
++      *text = NULL;
++    }
++
++    if(length != NULL){
++      *length = 0;
++    }
++    
+     return(0);
+   }
+   
+@@ -2214,6 +2496,10 @@
+   guint delta_time_size;
+   
+   if(buffer == NULL){
++    if(delta_time != NULL){
++      *delta_time = 0;
++    }
++
+     return(0);
+   }
+ 
+@@ -2250,7 +2536,7 @@
+ 
+   guchar *offset;
+   
+-  glong current_delta_time;
++  glong current_delta_time, tmp_delta_time;
+   glong next_delta_time;
+   guint delta_time_size;
+   guchar status, prev_status;
+@@ -2291,8 +2577,14 @@
+     }
+ 
+     /* read delta time */
++    tmp_delta_time = 0;
++    
+     delta_time_size = ags_midi_buffer_util_get_varlength(offset,
+-							 &current_delta_time);
++							 &tmp_delta_time);
++
++    if(delta_time_size > 0){
++      current_delta_time = tmp_delta_time;
++    }
+     
+     /* read status byte */
+     status = offset[delta_time_size];
+@@ -2365,6 +2657,8 @@
+       offset += n;
+ 
+       /* check if status is omitted */
++      next_delta_time = 0;
++      
+       delta_time_size = ags_midi_buffer_util_get_varlength(offset,
+ 							   &next_delta_time);
+       
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_osc_buffer_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_osc_buffer_util-c.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_osc_buffer_util-c.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_osc_buffer_util-c.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,211 @@
+Description: fix undefined behavior in ags_osc_buffer_util.c
+ ags_osc_buffer_util.c didn't set output variables if buffer is NULL.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/osc/ags_osc_buffer_util.c
++++ b/ags/audio/osc/ags_osc_buffer_util.c
+@@ -79,6 +79,10 @@
+   gint32 tmp;
+   
+   if(buffer == NULL){
++    if(val != NULL){
++      val[0] = 0;
++    }
++    
+     return;
+   }
+ 
+@@ -144,6 +148,18 @@
+   gint32 tmp;
+   
+   if(buffer == NULL){
++    if(tv_secs != NULL){
++      tv_secs[0] = -1;
++    }
++
++    if(tv_fraction != NULL){
++      tv_fraction[0] = -1;
++    }
++
++    if(immediately != NULL){
++      immediately[0] = FALSE;
++    }
++    
+     return;
+   }
+ 
+@@ -223,6 +239,10 @@
+   }data;
+ 
+   if(buffer == NULL){
++    if(val != NULL){
++      val[0] = 0.0;
++    }
++    
+     return;
+   }
+ 
+@@ -285,6 +305,14 @@
+   gsize count;
+   
+   if(buffer == NULL){
++    if(str != NULL){
++      str[0] = NULL;
++    }
++    
++    if(length != NULL){
++      length[0] = 0;
++    }
++    
+     return;
+   }
+ 
+@@ -366,6 +394,14 @@
+   gint32 tmp;
+   
+   if(buffer == NULL){
++    if(data_size != NULL){
++      data_size[0] = 0;
++    }
++    
++    if(data != NULL){
++      data[0] = NULL;
++    }
++    
+     return;
+   }
+ 
+@@ -433,6 +469,10 @@
+   gint64 tmp;
+   
+   if(buffer == NULL){
++    if(val != NULL){
++      val[0] = 0;
++    }
++    
+     return;
+   }
+ 
+@@ -503,6 +543,10 @@
+   }data;
+ 
+   if(buffer == NULL){
++    if(val != NULL){
++      val[0] = 0.0;
++    }
++
+     return;
+   }
+ 
+@@ -559,6 +603,10 @@
+   gint32 tmp;
+   
+   if(buffer == NULL){
++    if(val != NULL){
++      val[0] = '\0';
++    }
++    
+     return;
+   }
+ 
+@@ -612,6 +660,22 @@
+ 			     guint8 *r, guint8 *g, guint8 *b, guint8 *a)
+ {  
+   if(buffer == NULL){
++    if(r != NULL){
++      r[0] = 0;
++    }
++    
++    if(g != NULL){
++      g[0] = 0;
++    }
++    
++    if(b != NULL){
++      b[0] = 0;
++    }
++
++    if(a != NULL){
++      a[0] = 0;
++    }
++
+     return;
+   }
+  
+@@ -675,6 +739,22 @@
+ 			     guint8 *port, guint8 *status_byte, guint8 *data0, guint8 *data1)
+ {
+   if(buffer == NULL){
++    if(port != NULL){
++      *port = 0x0;
++    }
++
++    if(status_byte != NULL){
++      *status_byte = 0x0;
++    }
++
++    if(data0 != NULL){
++      *data0 = 0x0;
++    }
++
++    if(data1 != NULL){
++      *data1 = 0x0;
++    }
++    
+     return;
+   }
+  
+@@ -754,6 +834,14 @@
+   gint32 tmp;
+ 
+   if(buffer == NULL){
++    if(packet_size != NULL){
++      packet_size[0] = 0;
++    }
++
++    if(packet != NULL){
++      packet[0] = NULL;
++    }
++    
+     return;
+   }
+ 
+@@ -874,6 +962,14 @@
+   gsize length;
+   
+   if(buffer == NULL){
++    if(address_pattern != NULL){
++      address_pattern[0] = NULL;
++    }
++
++    if(type_tag != NULL){
++      type_tag[0] = NULL;
++    }
++
+     return;
+   }
+ 
+@@ -961,6 +1057,18 @@
+   gboolean success;
+   
+   if(buffer == NULL){
++    if(tv_secs != NULL){
++      *tv_secs = -1;
++    }
++
++    if(tv_fraction != NULL){
++      *tv_fraction = -1;
++    }
++
++    if(immediately != NULL){
++      *immediately = FALSE;
++    }
++
+     return;
+   }
+   
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_sf2_synth_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_sf2_synth_util-c.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_sf2_synth_util-c.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_sf2_synth_util-c.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,137 @@
+Description: ags_sf2_synth_util.c check if buffer is NULL
+ ags_sf2_synth_util.c didn't check if buffer is NULL or valid AgsIpatchSample
+ instance.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/ags_sf2_synth_util.c
++++ b/ags/audio/ags_sf2_synth_util.c
+@@ -1,5 +1,5 @@
+ /* GSequencer - Advanced GTK Sequencer
+- * Copyright (C) 2005-2020 Joël Krähemann
++ * Copyright (C) 2005-2021 Joël Krähemann
+  *
+  * This file is part of GSequencer.
+  *
+@@ -265,6 +265,12 @@
+   gboolean success;
+   gboolean pong_copy;
+ 
++  if(buffer == NULL ||
++     ipatch_sample == NULL ||
++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
++    return;
++  }
++  
+   source_frame_count = 0;
+ 
+   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
+@@ -534,6 +540,12 @@
+   gboolean success;
+   gboolean pong_copy;
+ 
++  if(buffer == NULL ||
++     ipatch_sample == NULL ||
++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
++    return;
++  }
++
+   source_frame_count = 0;
+ 
+   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
+@@ -802,6 +814,12 @@
+   guint i0, i1, i2;
+   gboolean success;
+   gboolean pong_copy;
++
++  if(buffer == NULL ||
++     ipatch_sample == NULL ||
++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
++    return;
++  }
+   
+   source_frame_count = 0;
+ 
+@@ -1071,6 +1089,12 @@
+   guint i0, i1, i2;
+   gboolean success;
+   gboolean pong_copy;
++
++  if(buffer == NULL ||
++     ipatch_sample == NULL ||
++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
++    return;
++  }
+   
+   source_frame_count = 0;
+ 
+@@ -1340,6 +1364,12 @@
+   guint i0, i1, i2;
+   gboolean success;
+   gboolean pong_copy;
++
++  if(buffer == NULL ||
++     ipatch_sample == NULL ||
++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
++    return;
++  }
+   
+   source_frame_count = 0;
+ 
+@@ -1609,6 +1639,12 @@
+   guint i0, i1, i2;
+   gboolean success;
+   gboolean pong_copy;
++
++  if(buffer == NULL ||
++     ipatch_sample == NULL ||
++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
++    return;
++  }
+   
+   source_frame_count = 0;
+ 
+@@ -1878,6 +1914,12 @@
+   guint i0, i1, i2;
+   gboolean success;
+   gboolean pong_copy;
++
++  if(buffer == NULL ||
++     ipatch_sample == NULL ||
++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
++    return;
++  }
+   
+   source_frame_count = 0;
+ 
+@@ -2147,6 +2189,12 @@
+   guint i0, i1, i2;
+   gboolean success;
+   gboolean pong_copy;
++
++  if(buffer == NULL ||
++     ipatch_sample == NULL ||
++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
++    return;
++  }
+   
+   source_frame_count = 0;
+ 
+@@ -2400,6 +2448,12 @@
+ 			guint loop_mode,
+ 			gint loop_start, gint loop_end)
+ {
++  if(buffer == NULL ||
++     ipatch_sample == NULL ||
++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_sfz_synth_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_sfz_synth_util-c.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_sfz_synth_util-c.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_sfz_synth_util-c.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,136 @@
+Description: ags_sfz_synth_util.c check if buffer is NULL
+ ags_sfz_synth_util.c didn't check if buffer is NULL.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/ags_sfz_synth_util.c
++++ b/ags/audio/ags_sfz_synth_util.c
+@@ -1,5 +1,5 @@
+ /* GSequencer - Advanced GTK Sequencer
+- * Copyright (C) 2005-2020 Joël Krähemann
++ * Copyright (C) 2005-2021 Joël Krähemann
+  *
+  * This file is part of GSequencer.
+  *
+@@ -100,6 +100,12 @@
+   guint i0, i1, i2;
+   gboolean success;
+   gboolean pong_copy;
++
++  if(buffer == NULL ||
++     sfz_sample == NULL ||
++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
++    return;
++  }
+   
+   source_frame_count = 0;
+ 
+@@ -367,6 +373,12 @@
+   gboolean success;
+   gboolean pong_copy;
+ 
++  if(buffer == NULL ||
++     sfz_sample == NULL ||
++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
++    return;
++  }
++
+   source_frame_count = 0;
+ 
+   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
+@@ -633,6 +645,12 @@
+   gboolean success;
+   gboolean pong_copy;
+ 
++  if(buffer == NULL ||
++     sfz_sample == NULL ||
++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
++    return;
++  }
++
+   source_frame_count = 0;
+ 
+   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
+@@ -898,6 +916,12 @@
+   guint i0, i1, i2;
+   gboolean success;
+   gboolean pong_copy;
++
++  if(buffer == NULL ||
++     sfz_sample == NULL ||
++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
++    return;
++  }
+   
+   source_frame_count = 0;
+ 
+@@ -1165,6 +1189,12 @@
+   gboolean success;
+   gboolean pong_copy;
+ 
++  if(buffer == NULL ||
++     sfz_sample == NULL ||
++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
++    return;
++  }
++
+   source_frame_count = 0;
+ 
+   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
+@@ -1431,6 +1461,12 @@
+   gboolean success;
+   gboolean pong_copy;
+ 
++  if(buffer == NULL ||
++     sfz_sample == NULL ||
++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
++    return;
++  }
++
+   source_frame_count = 0;
+ 
+   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
+@@ -1696,6 +1732,12 @@
+   guint i0, i1, i2;
+   gboolean success;
+   gboolean pong_copy;
++
++  if(buffer == NULL ||
++     sfz_sample == NULL ||
++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
++    return;
++  }
+     
+   source_frame_count = 0;
+ 
+@@ -1963,6 +2005,12 @@
+   gboolean success;
+   gboolean pong_copy;
+ 
++  if(buffer == NULL ||
++     sfz_sample == NULL ||
++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
++    return;
++  }
++
+   source_frame_count = 0;
+ 
+   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
+@@ -2209,6 +2257,12 @@
+ 			guint loop_mode,
+ 			gint loop_start, gint loop_end)
+ {
++  if(buffer == NULL ||
++     sfz_sample == NULL ||
++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_soundcard_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_soundcard_util-c.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_soundcard_util-c.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_soundcard_util-c.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,31 @@
+Description: ags_soundcard_util.c check if soundcard is NULL
+ ags_soundcard_util.c didn't check soundcard is NULL
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/ags_soundcard_util.c
++++ b/ags/audio/ags_soundcard_util.c
+@@ -1,5 +1,5 @@
+ /* GSequencer - Advanced GTK Sequencer
+- * Copyright (C) 2005-2020 Joël Krähemann
++ * Copyright (C) 2005-2021 Joël Krähemann
+  *
+  * This file is part of GSequencer.
+  *
+@@ -125,6 +125,11 @@
+ 
+   GRecMutex *obj_mutex;
+ 
++  if(soundcard == NULL ||
++     !AGS_IS_SOUNDCARD(soundcard)){
++    return;
++  }
++  
+   obj_mutex = ags_soundcard_util_get_obj_mutex(soundcard);
+   
+   /* get some initial values */
diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_synth_util-ch.diff gsequencer-3.7.44/debian/patches/patch-ags_synth_util-ch.diff
--- gsequencer-3.7.44/debian/patches/patch-ags_synth_util-ch.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-ags_synth_util-ch.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,906 @@
+Description: ags_synth_util.[ch] floating point number type and buffer NULL
+ ags_synth_util.[ch] didn't check if buffer is NULL and fixed floating point
+ number type.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ags/audio/ags_synth_util.c
++++ b/ags/audio/ags_synth_util.c
+@@ -1,5 +1,5 @@
+ /* GSequencer - Advanced GTK Sequencer
+- * Copyright (C) 2005-2020 Joël Krähemann
++ * Copyright (C) 2005-2021 Joël Krähemann
+  *
+  * This file is part of GSequencer.
+  *
+@@ -53,6 +53,10 @@
+   guint count;
+   guint i;
+   gboolean negative;
++
++  if(buffer == NULL){
++    return(0);
++  }
+   
+   count = 0;
+ 
+@@ -97,6 +101,10 @@
+   guint count;
+   guint i;
+   gboolean negative;
++
++  if(buffer == NULL){
++    return(0);
++  }
+   
+   count = 0;
+ 
+@@ -141,6 +149,10 @@
+   guint count;
+   guint i;
+   gboolean negative;
++
++  if(buffer == NULL){
++    return(0);
++  }
+   
+   count = 0;
+ 
+@@ -185,6 +197,10 @@
+   guint count;
+   guint i;
+   gboolean negative;
++
++  if(buffer == NULL){
++    return(0);
++  }
+   
+   count = 0;
+ 
+@@ -229,6 +245,10 @@
+   guint count;
+   guint i;
+   gboolean negative;
++
++  if(buffer == NULL){
++    return(0);
++  }
+   
+   count = 0;
+ 
+@@ -267,12 +287,16 @@
+  * Since: 3.0.0
+  */
+ guint
+-ags_synth_util_get_xcross_count_float(float *buffer,
++ags_synth_util_get_xcross_count_float(gfloat *buffer,
+ 				      guint buffer_size)
+ {
+   guint count;
+   guint i;
+   gboolean negative;
++
++  if(buffer == NULL){
++    return(0);
++  }
+   
+   count = 0;
+ 
+@@ -311,13 +335,17 @@
+  * Since: 3.0.0
+  */
+ guint
+-ags_synth_util_get_xcross_count_double(double *buffer,
++ags_synth_util_get_xcross_count_double(gdouble *buffer,
+ 				       guint buffer_size)
+ {
+   guint count;
+ 
+   guint i;
+   gboolean negative;
++
++  if(buffer == NULL){
++    return(0);
++  }
+   
+   count = 0;
+ 
+@@ -368,6 +396,10 @@
+   
+   guint i;
+   gboolean negative;
++
++  if(buffer == NULL){
++    return(0);
++  }
+   
+   count = 0;
+ 
+@@ -424,6 +456,10 @@
+ {
+   guint count;
+ 
++  if(buffer == NULL){
++    return(0);
++  }
++
+   count = 0;
+ 
+   switch(audio_buffer_util_format){
+@@ -459,13 +495,13 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    count = ags_synth_util_get_xcross_count_float((float *) buffer,
++    count = ags_synth_util_get_xcross_count_float((gfloat *) buffer,
+ 						  buffer_size);
+   }
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    count = ags_synth_util_get_xcross_count_double((double *) buffer,
++    count = ags_synth_util_get_xcross_count_double((gdouble *) buffer,
+ 						   buffer_size);
+   }
+   break;
+@@ -507,6 +543,10 @@
+   static const gdouble scale = 127.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (gint8) (0xff & ((gint16) buffer[i] + (gint16) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume)));
+   }
+@@ -535,6 +575,10 @@
+   static const gdouble scale = 32767.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (gint16) (0xffff & ((gint32) buffer[i] + (gint32) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume)));
+   }
+@@ -563,6 +607,10 @@
+   static const gdouble scale = 8388607.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (gint32) (0xffffffff & ((gint32) buffer[i] + (gint32) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume)));
+   }
+@@ -591,6 +639,10 @@
+   static const gdouble scale = 214748363.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (gint32) (0xffffffff & ((gint64) buffer[i] + (gint64) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume)));
+   }
+@@ -619,6 +671,10 @@
+   static const gdouble scale = 9223372036854775807.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (gint64) (0xffffffffffff & ((gint64) buffer[i] + (gint64) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume)));
+   }
+@@ -639,13 +695,17 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_synth_util_sin_float(float *buffer,
++ags_synth_util_sin_float(gfloat *buffer,
+ 			 gdouble freq, gdouble phase, gdouble volume,
+ 			 guint samplerate,
+ 			 guint offset, guint n_frames)
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (float) ((gdouble) buffer[i] + (gdouble) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * volume));
+   }
+@@ -666,13 +726,17 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_synth_util_sin_double(double *buffer,
++ags_synth_util_sin_double(gdouble *buffer,
+ 			  gdouble freq, gdouble phase, gdouble volume,
+ 			  guint samplerate,
+ 			  guint offset, guint n_frames)
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     buffer[i] = (double) ((gdouble) buffer[i] + (gdouble) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * volume));
+   }
+@@ -706,6 +770,10 @@
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   c_ptr = buffer;
+   c_ptr_ptr = &c_ptr;
+   
+@@ -741,6 +809,10 @@
+   static const gdouble scale = 127.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -772,6 +844,10 @@
+   static const gdouble scale = 32767.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -803,6 +879,10 @@
+   static const gdouble scale = 8388607.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -834,6 +914,10 @@
+   static const gdouble scale = 214748363.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -865,6 +949,10 @@
+   static const gdouble scale = 9223372036854775807.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -888,13 +976,17 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_synth_util_sawtooth_float(float *buffer,
++ags_synth_util_sawtooth_float(gfloat *buffer,
+ 			      gdouble freq, gdouble phase, gdouble volume,
+ 			      guint samplerate,
+ 			      guint offset, guint n_frames)
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -918,13 +1010,17 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_synth_util_sawtooth_double(double *buffer,
++ags_synth_util_sawtooth_double(gdouble *buffer,
+ 			       gdouble freq, gdouble phase, gdouble volume,
+ 			       guint samplerate,
+ 			       guint offset, guint n_frames)
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -961,6 +1057,10 @@
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -999,6 +1099,10 @@
+   static const gdouble scale = 127.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1030,6 +1134,10 @@
+   static const gdouble scale = 32767.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1061,6 +1169,10 @@
+   static const gdouble scale = 8388607.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1092,6 +1204,10 @@
+   static const gdouble scale = 214748363.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1123,6 +1239,10 @@
+   static const gdouble scale = 9223372036854775807.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1146,13 +1266,17 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_synth_util_triangle_float(float *buffer,
++ags_synth_util_triangle_float(gfloat *buffer,
+ 			      gdouble freq, gdouble phase, gdouble volume,
+ 			      guint samplerate,
+ 			      guint offset, guint n_frames)
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1176,13 +1300,17 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_synth_util_triangle_double(double *buffer,
++ags_synth_util_triangle_double(gdouble *buffer,
+ 			       gdouble freq, gdouble phase, gdouble volume,
+ 			       guint samplerate,
+ 			       guint offset, guint n_frames)
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1219,6 +1347,10 @@
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   phase = (int) ceil(phase) % (int) ceil(freq);
+   phase = ceil(phase / freq) * ceil(samplerate / freq);
+ 
+@@ -1257,6 +1389,10 @@
+   static const gdouble scale = 127.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (gint8) (0xff & ((gint16) buffer[i] + (gint16) (1.0 * scale * volume)));
+@@ -1289,6 +1425,10 @@
+   static const gdouble scale = 32767.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (gint16) (0xffff & ((gint32) buffer[i] + (gint32) (1.0 * scale * volume)));
+@@ -1321,6 +1461,10 @@
+   static const gdouble scale = 8388607.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (gint32) (0xffffffff & ((gint32) buffer[i] + (gint32) (1.0 * scale * volume)));
+@@ -1353,6 +1497,10 @@
+   static const gdouble scale = 214748363.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (gint32) (0xffffffff & ((gint64) buffer[i] + (gint64) (1.0 * scale * volume)));
+@@ -1385,6 +1533,10 @@
+   static const gdouble scale = 9223372036854775807.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (gint64) (0xffffffffffffffff & ((gint64) buffer[i] + (gint64) (1.0 * scale * volume)));
+@@ -1409,13 +1561,17 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_synth_util_square_float(float *buffer,
++ags_synth_util_square_float(gfloat *buffer,
+ 			    gdouble freq, gdouble phase, gdouble volume,
+ 			    guint samplerate,
+ 			    guint offset, guint n_frames)
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (buffer[i] + (1.0 * volume));
+@@ -1440,13 +1596,17 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_synth_util_square_double(double *buffer,
++ags_synth_util_square_double(gdouble *buffer,
+ 			     gdouble freq, gdouble phase, gdouble volume,
+ 			     guint samplerate,
+ 			     guint offset, guint n_frames)
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
+       buffer[i] = (buffer[i] + (1.0 * volume));
+@@ -1484,6 +1644,10 @@
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   c_ptr = buffer;
+   c_ptr_ptr = &c_ptr;
+ 
+@@ -1523,6 +1687,10 @@
+   static const gdouble scale = 127.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (gint8) (0xff & ((gint16) buffer[i] + (gint16) (1.0 * scale * volume)));
+@@ -1555,6 +1723,10 @@
+   static const gdouble scale = 32767.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (gint16) (0xffff & ((gint32) buffer[i] + (gint32) (1.0 * scale * volume)));
+@@ -1587,6 +1759,10 @@
+   static const gdouble scale = 8388607.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (gint32) (0xffffffff & ((gint32) buffer[i] + (gint32) (1.0 * scale * volume)));
+@@ -1619,6 +1795,10 @@
+   static const gdouble scale = 214748363.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (gint32) (0xffffffff & ((gint64) buffer[i] + (gint64) (1.0 * scale * volume)));
+@@ -1651,6 +1831,10 @@
+   static const gdouble scale = 9223372036854775807.0;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (gint64) (0xffffffffffffffff & ((gint64) buffer[i] + (gint64) (1.0 * scale * volume)));
+@@ -1675,13 +1859,17 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_synth_util_impulse_float(float *buffer,
++ags_synth_util_impulse_float(gfloat *buffer,
+ 			     gdouble freq, gdouble phase, gdouble volume,
+ 			     guint samplerate,
+ 			     guint offset, guint n_frames)
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (buffer[i] + (1.0 * volume));
+@@ -1706,13 +1894,17 @@
+  * Since: 3.0.0
+  */
+ void
+-ags_synth_util_impulse_double(double *buffer,
++ags_synth_util_impulse_double(gdouble *buffer,
+ 			      gdouble freq, gdouble phase, gdouble volume,
+ 			      guint samplerate,
+ 			      guint offset, guint n_frames)
+ {
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   for(i = offset; i < offset + n_frames; i++){
+     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
+       buffer[i] = (buffer[i] + (1.0 * volume));
+@@ -1750,6 +1942,10 @@
+   guint i_stop;
+   guint i;
+ 
++  if(buffer == NULL){
++    return;
++  }
++
+   c_ptr = buffer;
+   c_ptr_ptr = &c_ptr;
+ 
+@@ -1787,6 +1983,10 @@
+ 		   guint samplerate, guint audio_buffer_util_format,
+ 		   guint offset, guint n_frames)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -1830,7 +2030,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_synth_util_sin_float((float *) buffer,
++    ags_synth_util_sin_float((gfloat *) buffer,
+ 			     freq, phase, volume,
+ 			     samplerate,
+ 			     offset, n_frames);
+@@ -1838,7 +2038,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_synth_util_sin_double((double *) buffer,
++    ags_synth_util_sin_double((gdouble *) buffer,
+ 			      freq, phase, volume,
+ 			      samplerate,
+ 			      offset, n_frames);
+@@ -1880,6 +2080,10 @@
+ 			guint samplerate, guint audio_buffer_util_format,
+ 			guint offset, guint n_frames)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -1923,7 +2127,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_synth_util_sawtooth_float((float *) buffer,
++    ags_synth_util_sawtooth_float((gfloat *) buffer,
+ 				  freq, phase, volume,
+ 				  samplerate,
+ 				  offset, n_frames);
+@@ -1931,7 +2135,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_synth_util_sawtooth_double((double *) buffer,
++    ags_synth_util_sawtooth_double((gdouble *) buffer,
+ 				   freq, phase, volume,
+ 				   samplerate,
+ 				   offset, n_frames);
+@@ -1973,6 +2177,10 @@
+ 			guint samplerate, guint audio_buffer_util_format,
+ 			guint offset, guint n_frames)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -2016,7 +2224,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_synth_util_triangle_float((float *) buffer,
++    ags_synth_util_triangle_float((gfloat *) buffer,
+ 				  freq, phase, volume,
+ 				  samplerate,
+ 				  offset, n_frames);
+@@ -2024,7 +2232,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_synth_util_triangle_double((double *) buffer,
++    ags_synth_util_triangle_double((gdouble *) buffer,
+ 				   freq, phase, volume,
+ 				   samplerate,
+ 				   offset, n_frames);
+@@ -2066,6 +2274,10 @@
+ 		      guint samplerate, guint audio_buffer_util_format,
+ 		      guint offset, guint n_frames)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -2109,7 +2321,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_synth_util_square_float((float *) buffer,
++    ags_synth_util_square_float((gfloat *) buffer,
+ 				freq, phase, volume,
+ 				samplerate,
+ 				offset, n_frames);
+@@ -2117,7 +2329,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_synth_util_square_double((double *) buffer,
++    ags_synth_util_square_double((gdouble *) buffer,
+ 				 freq, phase, volume,
+ 				 samplerate,
+ 				 offset, n_frames);
+@@ -2159,6 +2371,10 @@
+ 		       guint samplerate, guint audio_buffer_util_format,
+ 		       guint offset, guint n_frames)
+ {
++  if(buffer == NULL){
++    return;
++  }
++
+   switch(audio_buffer_util_format){
+   case AGS_AUDIO_BUFFER_UTIL_S8:
+   {
+@@ -2202,7 +2418,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
+   {
+-    ags_synth_util_impulse_float((float *) buffer,
++    ags_synth_util_impulse_float((gfloat *) buffer,
+ 				 freq, phase, volume,
+ 				 samplerate,
+ 				 offset, n_frames);
+@@ -2210,7 +2426,7 @@
+   break;
+   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
+   {
+-    ags_synth_util_impulse_double((double *) buffer,
++    ags_synth_util_impulse_double((gdouble *) buffer,
+ 				  freq, phase, volume,
+ 				  samplerate,
+ 				  offset, n_frames);
+--- a/ags/audio/ags_synth_util.h
++++ b/ags/audio/ags_synth_util.h
+@@ -1,5 +1,5 @@
+ /* GSequencer - Advanced GTK Sequencer
+- * Copyright (C) 2005-2019 Joël Krähemann
++ * Copyright (C) 2005-2021 Joël Krähemann
+  *
+  * This file is part of GSequencer.
+  *
+@@ -38,9 +38,9 @@
+ 					  guint buffer_size);
+ guint ags_synth_util_get_xcross_count_s64(gint64 *buffer,
+ 					  guint buffer_size);
+-guint ags_synth_util_get_xcross_count_float(float *buffer,
++guint ags_synth_util_get_xcross_count_float(gfloat *buffer,
+ 					    guint buffer_size);
+-guint ags_synth_util_get_xcross_count_double(double *buffer,
++guint ags_synth_util_get_xcross_count_double(gdouble *buffer,
+ 					     guint buffer_size);
+ guint ags_synth_util_get_xcross_count_complex(AgsComplex *buffer,
+ 					      guint buffer_size);
+@@ -70,11 +70,11 @@
+ 			    gdouble freq, gdouble phase, gdouble volume,
+ 			    guint samplerate,
+ 			    guint offset, guint n_frames);
+-void ags_synth_util_sin_float(float *buffer,
++void ags_synth_util_sin_float(gfloat *buffer,
+ 			      gdouble freq, gdouble phase, gdouble volume,
+ 			      guint samplerate,
+ 			      guint offset, guint n_frames);
+-void ags_synth_util_sin_double(double *buffer,
++void ags_synth_util_sin_double(gdouble *buffer,
+ 			       gdouble freq, gdouble phase, gdouble volume,
+ 			       guint samplerate,
+ 			       guint offset, guint n_frames);
+@@ -104,11 +104,11 @@
+ 				 gdouble freq, gdouble phase, gdouble volume,
+ 				 guint samplerate,
+ 				 guint offset, guint n_frames);
+-void ags_synth_util_sawtooth_float(float *buffer,
++void ags_synth_util_sawtooth_float(gfloat *buffer,
+ 				   gdouble freq, gdouble phase, gdouble volume,
+ 				   guint samplerate,
+ 				   guint offset, guint n_frames);
+-void ags_synth_util_sawtooth_double(double *buffer,
++void ags_synth_util_sawtooth_double(gdouble *buffer,
+ 				    gdouble freq, gdouble phase, gdouble volume,
+ 				    guint samplerate,
+ 				    guint offset, guint n_frames);
+@@ -138,11 +138,11 @@
+ 				 gdouble freq, gdouble phase, gdouble volume,
+ 				 guint samplerate,
+ 				 guint offset, guint n_frames);
+-void ags_synth_util_triangle_float(float *buffer,
++void ags_synth_util_triangle_float(gfloat *buffer,
+ 				   gdouble freq, gdouble phase, gdouble volume,
+ 				   guint samplerate,
+ 				   guint offset, guint n_frames);
+-void ags_synth_util_triangle_double(double *buffer,
++void ags_synth_util_triangle_double(gdouble *buffer,
+ 				    gdouble freq, gdouble phase, gdouble volume,
+ 				    guint samplerate,
+ 				    guint offset, guint n_frames);
+@@ -172,11 +172,11 @@
+ 			       gdouble freq, gdouble phase, gdouble volume,
+ 			       guint samplerate,
+ 			       guint offset, guint n_frames);
+-void ags_synth_util_square_float(float *buffer,
++void ags_synth_util_square_float(gfloat *buffer,
+ 				 gdouble freq, gdouble phase, gdouble volume,
+ 				 guint samplerate,
+ 				 guint offset, guint n_frames);
+-void ags_synth_util_square_double(double *buffer,
++void ags_synth_util_square_double(gdouble *buffer,
+ 				  gdouble freq, gdouble phase, gdouble volume,
+ 				  guint samplerate,
+ 				  guint offset, guint n_frames);
+@@ -206,11 +206,11 @@
+ 				gdouble freq, gdouble phase, gdouble volume,
+ 				guint samplerate,
+ 				guint offset, guint n_frames);
+-void ags_synth_util_impulse_float(float *buffer,
++void ags_synth_util_impulse_float(gfloat *buffer,
+ 				  gdouble freq, gdouble phase, gdouble volume,
+ 				  guint samplerate,
+ 				  guint offset, guint n_frames);
+-void ags_synth_util_impulse_double(double *buffer,
++void ags_synth_util_impulse_double(gdouble *buffer,
+ 				   gdouble freq, gdouble phase, gdouble volume,
+ 				   guint samplerate,
+ 				   guint offset, guint n_frames);
diff -Nru gsequencer-3.7.44/debian/patches/patch-users-doc-chap2-xml.diff gsequencer-3.7.44/debian/patches/patch-users-doc-chap2-xml.diff
--- gsequencer-3.7.44/debian/patches/patch-users-doc-chap2-xml.diff	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/patch-users-doc-chap2-xml.diff	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,367 @@
+Description: complete missing descriptions in user's handbook
+ Some controls were not documented, this patch fixes it.
+Author: Joël Krähemann <jkraehemann@gmail.com>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=c0351c5120647668388092b343cb4b85a09eb9bd
+Reviewed-by: <name and email of a reviewer, optional>
+Last-Update: 2021-03-08
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/docs/usersBook/chap2.xml
++++ b/docs/usersBook/chap2.xml
+@@ -38,16 +38,28 @@
+     </listitem>
+     <listitem>
+       <para>
++	To remove an engine open context menu and activate &quot;destroy&quot; entry.
++      </para>
++    </listitem>
++    <listitem>
++      <para>
+ 	To rename an engine open context menu and activate &quot;rename&quot; entry.
+       </para>
+     </listitem>
+     <listitem>
+       <para>
+-	To remove an engine open context menu and activate &quot;destroy&quot; entry.
++	To remove an audio object open context menu and activate &quot;rename audio&quot; entry.
++	This name can be used by the OSC Server to address the audio object.
+       </para>
+     </listitem>
+     <listitem>
+       <para>
++	To reposition an audio object open context menu and activate &quot;reposition audio&quot; entry.
++	This position can be used by the OSC Server to address the audio object.
++      </para>
++    </listitem>    
++    <listitem>
++      <para>
+ 	To open properties dialog open context menu and activate &quot;properties&quot;
+ 	entry. There you might link, resize or asign LADSPA effects to channels.
+ 	NOTE for LADSPA sink or generators aren&apos;t supported, yet.
+@@ -68,9 +80,49 @@
+ 	  Copy pattern does convert your pattern bitmap into a pattern based notation suitable
+ 	  to paste in notation editor.
+ 	</listitem>
++      </itemizedlist>	  
++      <itemizedlist>
++	<listitem>
++	  Envelope opens a dialog with envelope editor, info and pattern editor tab. Allowing you to edit
++	  envelope presets and apply to selected notes.
++	</listitem>
+       </itemizedlist>
+ 	  
+     </listitem>
++    <listitem>
++      <para>
++	Connection gives you audio/MIDI options.
++      </para>
++      
++      <itemizedlist>
++	<listitem>
++	  Audio connection allows you assign output or input soundcards.
++	</listitem>
++      </itemizedlist>	  
++      <itemizedlist>
++	<listitem>
++	  Midi dialog allows you to assign MIDI sequencers to an instrument.
++	</listitem>
++      </itemizedlist>
++	  
++    </listitem>
++    <listitem>
++      <para>
++	Export gives you audio exporting options.
++      </para>
++      
++      <itemizedlist>
++	<listitem>
++	  Audio export does export your wave data into an audio file without any effect processing.
++	</listitem>
++      </itemizedlist>	  
++	  
++    </listitem>    
++    <listitem>
++      <para>
++	To adjust many input controls at once open context menu and activate &quot;sticky controls&quot; entry.
++      </para>
++    </listitem>
+   </itemizedlist>
+ 
+   <sect1>
+@@ -265,9 +317,15 @@
+     <title>Envelope dialog</title>
+     <para>
+       The envelope dialog allows you to edit envelope information as presets. These presets
+-      can be assigned to a specific note.
++      can be assigned to a specific note. Selection is done with select tool of notation editor and
++      selecting notes of active audio channel.
+     </para>
+ 
++    <para>
++      The enelope's width matches with x length 1.0 the audio signal's length. The magnitude has normal
++      volume with value 1.0.
++    </para>
++    
+     <sect2>
+       <title>Envelope editor</title>
+       <mediaobject>
+@@ -282,8 +340,34 @@
+       </mediaobject>
+       
+       <para>
+-	Modify or create presets and apply it to selected notes.
+-      </para>    
++	Modify or create presets and apply it to selected notes. Selection is performed within notation
++	editor.
++      </para>
++
++      <para>
++	Add new or remove unwanted presets.
++      </para>
++
++      <para>
++	Attack is the initial x length and y magnitude.
++      </para>
++
++      <para>
++	Decay is the second x length and y magnitude.
++      </para>
++
++      <para>
++	Sustain is the third x length and y magnitude.
++      </para>
++
++      <para>
++	Release is the last x length and y magnitude.
++      </para>      
++
++      <para>
++	Ratio increase/decrease the entire envelope's magnitude.
++      </para>
++
+     </sect2>
+ 
+     <sect2>
+@@ -300,8 +384,29 @@
+       </mediaobject>
+       
+       <para>
+-	Show envelope information of selected notes.
++	Show envelope information of selected notes. There are 5 columns with information of the
++	specific selection. The selection itself is presented by the list view.
+       </para>    
++
++      <para>
++	Plot enables plotting of the matching note's envelope information.
++      </para>
++
++      <para>
++	Audio channel is the selected note's audio channel.
++      </para>
++
++      <para>
++	Note x0 is the selected note's x0 offset.
++      </para>
++
++      <para>
++	Note x1 is the selected note's x1 offset.
++      </para>
++
++      <para>
++	Note y is the selected note's y key.
++      </para>
+     </sect2>
+ 
+     <sect2>
+@@ -318,8 +423,53 @@
+       </mediaobject>
+       
+       <para>
+-	Modify and create pattern related envelope presets.
++	Modify and create pattern related envelope presets. There are 9 columns with information of
++	the pattern's region to apply the envelope preset.
+       </para>    
++
++      <para>
++	Edit means modify the matchin preset.
++      </para>      
++
++      <para>
++	Plot enables plotting of the matching envelope preset information.
++      </para>
++
++      <para>
++	Preset is the preset's name.
++      </para>
++
++      <para>
++	Audio channel start the preset's start audio channel.
++      </para>
++
++      <para>
++	Audio channel end the preset's end audio channel.	
++      </para>
++
++      <para>
++	Pad start the preset's start pad.
++      </para>
++
++      <para>
++	Pad end the preset's end pad.
++      </para>
++      
++      <para>
++	X start the preset's x start offset.
++      </para>
++
++      <para>
++	X end the preset's x end offset.
++      </para>
++
++      <para>
++	There are the usual envelope editor controls.
++      </para>
++
++      <para>
++	Organize your presets with move up and move down. Or add new or remove unwanted presets.
++      </para>
+     </sect2>
+ 
+   </sect1>
+@@ -338,8 +488,10 @@
+ 	</caption>
+       </mediaobject>
+       <para>
+-	The MIDI dialog allows you to select the MIDI sequencer to assign of the current machine.
+-	You might want to perform start and end key. Further you can adjust the start and end channel.
++	The MIDI dialog allows you to select the MIDI sequencer to assign of the current machine. The MIDI
++	channel is the MIDI channel assigned to the MIDI device, useful with multiple devices. Upto 16
++	devices are allowed. You might want to perform start and end key. Further you can adjust the start
++	and end channel.
+       </para>    
+   </sect1>
+   
+@@ -717,9 +869,42 @@
+     </mediaobject>
+     <para>
+       Produce audio data using its oscillators. The count of oscillators depends on number of
+-      input lines. They are adjusted vertically. You have on the right the option to auto-update
+-      changes you do with the controls or do it manually by the update button.
++      input lines. They are adjusted vertically.
++    </para>
++
++    <para>
++      Wave is the actual oscillator either sine, sawtooth, square, triangle or impulse.
++    </para>
++
++    <para>
++     Attack is the first frame after key on to start output.
++    </para>
++
++    <para>
++      Length is the length of the output in frames.
+     </para>
++
++    <para>
++      Phase is the initial phase as x offset within oscillator's algorithm.
++    </para>
++
++    <para>
++      Frequency is the lower range key's frequency.
++    </para>
++
++    <para>
++      Volume is the output volume of the oscillator.
++    </para>
++
++    <para>
++      Sync allows you reset the phase with 3 times a tuple of x offset and new x offset of phase.
++    </para>
++    
++    <para>
++      You have on the right the option to auto-update changes you do with the controls or do it
++      manually by the update button. Lower is the very first y key.
++    </para>
++    
+   </sect1>
+ 
+   <sect1>
+@@ -739,6 +924,27 @@
+       input lines. They are adjusted vertically. You have on the right the option to auto-update
+       changes you do with the controls or do it manually by the update button.
+     </para>
++
++    <para>
++      FM Synth has additional controls than Synth for its oscillators to control. The controls
++      are related to the Low Frequency Oscillator that does the actual Frequency Modulation.
++    </para>
++
++    <para>
++      LFO wave use specific function to modulate frequency.
++    </para>
++
++    <para>
++      LFO frequency use specific frequency to modulate frequency.
++    </para>
++
++    <para>
++      LFO depth is the depth of the frequency modulation.
++    </para>
++
++    <para>
++      LFO tuning tunes by cents.
++    </para>
+   </sect1>
+ 
+   <sect1>
+@@ -759,6 +965,10 @@
+       update button. Loop start and loop end allows you to specify what region of the audio data shall be looped
+       in order to get the desired note length.
+     </para>
++
++    <para>
++      The Syncsynth has the very same oscillators as Synth.
++    </para>
+   </sect1>
+ 
+   <sect1>
+@@ -779,6 +989,10 @@
+       update button. Loop start and loop end allows you to specify what region of the audio data shall be looped
+       in order to get the desired note length.
+     </para>
++
++    <para>
++      The FM Syncsynth has the very same oscillators as FM Synth.
++    </para>
+   </sect1>
+ 
+   <sect1>
+@@ -798,6 +1012,11 @@
+       controls, preset and instrument to navigate within container format and a open button to
+       read Soundfont2 files and assign the selected instrument to the input.
+     </para>
++
++    <para>
++      Synth generator can be enabled to pitch missing keys from lower upto specific key count.
++    </para>
++    
+     <para>
+       The ffplayer contains recently the bridge widget. You can add plugins in bulk mode by
+       click Add or Remove within AgsFFPlayer&apos;s bridge, what you can collapse/expand. To add an effect
+@@ -821,8 +1040,13 @@
+       Produce audio data by opening SFZ audio file container format. There is a open button to read SFZ
+       files and assign it to the input.
+     </para>
++
++    <para>
++      Synth generator can be enabled to pitch missing keys from lower upto specific key count.
++    </para>
++
+     <para>
+-      There is a LFO enable control allowing you make adjustments to LFO amplification:
++      There is a LFO enable control allowing you make adjustments to LFO amplification (currently defunctional):
+     </para>
+ 
+     <itemizedlist mark="bullet">
diff -Nru gsequencer-3.7.44/debian/patches/series gsequencer-3.7.44/debian/patches/series
--- gsequencer-3.7.44/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ gsequencer-3.7.44/debian/patches/series	2021-03-08 18:44:04.000000000 +0100
@@ -0,0 +1,15 @@
+patch-ags_midi_buffer_util-c.diff
+patch-ags_audio_buffer_util-c.diff
+patch-ags_buffer_util-c.diff
+patch-ags_char_buffer_util-ch.diff
+patch-ags_fast_pitch_util-c.diff
+patch-ags_filter_util-c.diff
+patch-ags_fm_synth_util-ch.diff
+patch-ags_fourier_transform_util-h.diff
+patch-ags_lfo_synth_util-ch.diff
+patch-ags_osc_buffer_util-c.diff
+patch-ags_sf2_synth_util-c.diff
+patch-ags_sfz_synth_util-c.diff
+patch-ags_soundcard_util-c.diff
+patch-ags_synth_util-ch.diff
+patch-users-doc-chap2-xml.diff

--- End Message ---
--- Begin Message ---
Control: tag -1 wontfix

This is not an appropriate change to make during a freeze, sorry.

Cheers,
Julien

On Thu, Mar 11, 2021 at 04:38:40PM +0100, Joël Krähemann wrote:
> Package: release.debian.org
> Severity: normal
> User: release.debian.org@packages.debian.org
> Usertags: unblock
> 
> Please unblock package gsequencer
> 
> [ Reason ]
> The upstream of gsequencer (this is actually me) provided some
> patches to improve security of the library's provided utility
> functions.
> 
> Some versions of GCC complain about may-be unitialized after
> return from utility functions. The provided patches fixes this.
> 
> Since hardening options are recommended, see here:
> 
> https://wiki.debian.org/Hardening
> 
> Further, there are some problems with not unified floating
> point number types. Actually there are no implications,
> because these types are defined as follows:
> 
> typedef float gfloat;
> typedef double gdouble;
> 
> But, if you want to change this you get some real problems,
> especially since the gsequencer libraries have some
> conversion functions to store floats in a char buffer.
> 
> http://git.savannah.nongnu.org/cgit/gsequencer.git/tree/ags/audio/ags_char_buffer_util.h?h=3.7.x
> 
> And finally, there were some remains of using complex macro
> as type, this should be unified as double _Comples, too.
> 
> There is a bug related to maybe-unitialized available:
> 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983868
> 
> At last, I would love to patch the user's manual chapter 2.
> The information there are incomplete and were not updated
> as extending the UI of gsequencer. It might cause confusion,
> as explaining the menus and not cover every item or control.
> 
> I strongly recommend to patch.
> 
> [ Impact ]
> The user of the gsequencer binary doesn't recognized anything,
> except if you consider developers as users of the libraries. 
> 
> Developers, might end in some memory corruption if the code
> does SIGSEGV.
> 
> The Advanced Gtk+ Sequencer framework, opens various file
> handles for sockets or alike, if configured so.
> 
> [ Tests ]
> GSequencer comes with unit-tests and a functional integration
> test suite. Running in debian-ci.
> 
> I did some manual tests, too. Like to ensure AgsFFPlayer
> and AgsPitchSampler work as desired. They are related
> to:
> 
> ags_audio_buffer_util.c
> ags_sf2_synth_util.c
> ags_sfz_synth_util.c
> 
> Other manual tested machines are AgsPanel, AgsMixer, AgsDrum,
> AgsMatrix and AgsFMSynth.
> 
> [ Risks ]
> The changes are trivial, if a function returns where it shouldn't
> it would just be silence. So no additional processing is performed.
> 
> (Discussion of the risks involved. E.g. code is trivial or
> complex, key package vs leaf package, alternatives available.)
> 
> [ Checklist ]
>   [x] all changes are documented in the d/changelog
>   [x] I reviewed all changes and I approve them
>   [x] attach debdiff against the package in testing
> 
> [ Other info ]
> The Advanced Gtk+ Sequencer provides you 2 different flavors of
> OSC (Open Sound Control) service. One without any authentication
> running in local network. The SLIP encoded UDP/TCP packages using
> IPv4/IPv6 is not routable. Can be started by providing suitable
> configuration file.
> 
> Another flavor, is the AGS-OSC-OVER-XMLRPC which encapsules the
> OSC messages by the HTTP and WebSockets protocol, is actually
> routable but only with valid Basic HTTP authentication. Only,
> available for developers.
> 
> unblock gsequencer/3.7.44-2

> diff -Nru gsequencer-3.7.44/debian/changelog gsequencer-3.7.44/debian/changelog
> --- gsequencer-3.7.44/debian/changelog	2021-02-27 19:16:33.000000000 +0100
> +++ gsequencer-3.7.44/debian/changelog	2021-03-08 18:44:04.000000000 +0100
> @@ -1,4 +1,13 @@
> -gsequencer (3.7.44-1) UNRELEASED; urgency=medium
> +gsequencer (3.7.44-2) unstable; urgency=medium
> +
> +  * add patch to fix undefined behavior or missing return if buffer NULL in
> +    utility functions
> +  * add patch to fix floating point number types
> +  * add patch to update chapter 2 of user manual
> +
> + -- Joël Krähemann <jkraehemann@gmail.com>  Mon, 08 Mar 2021 18:44:04 +0100
> +
> +gsequencer (3.7.44-1) unstable; urgency=medium
>  
>    * New upstream version 3.7.44
>  
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_audio_buffer_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_audio_buffer_util-c.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_audio_buffer_util-c.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_audio_buffer_util-c.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,1652 @@
> +Description: fix undefined behavior in ags_audio_buffer_util.c
> + ags_audio_buffer_util.c didn't set output variables if buffer is NULL.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/ags_audio_buffer_util.c
> ++++ b/ags/audio/ags_audio_buffer_util.c
> +@@ -475,6 +475,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++  
> +   i = 0;
> +   
> +   /* unrolled function */
> +@@ -523,6 +527,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> +   /* unrolled function */
> +@@ -571,6 +579,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> +   /* unrolled function */
> +@@ -618,6 +630,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> +   /* unrolled function */
> +@@ -760,6 +776,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(1.0);
> ++  }
> ++
> +   start_volume = current_volume;
> +   i = 0;
> +   
> +@@ -891,6 +911,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(1.0);
> ++  }
> ++
> +   start_volume = current_volume;
> +   i = 0;
> +   
> +@@ -1022,6 +1046,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(1.0);
> ++  }
> ++
> +   start_volume = current_volume;
> +   i = 0;
> +   
> +@@ -1153,6 +1181,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(1.0);
> ++  }
> ++
> +   start_volume = current_volume;
> +   i = 0;
> +   
> +@@ -1284,6 +1316,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(1.0);
> ++  }
> ++
> +   start_volume = current_volume;
> +   i = 0;
> +   
> +@@ -1415,6 +1451,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(1.0);
> ++  }
> ++
> +   start_volume = current_volume;
> +   i = 0;
> +   
> +@@ -1550,6 +1590,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(1.0);
> ++  }
> ++
> +   start_volume = current_volume;
> +   i = 0;
> +   
> +@@ -1681,6 +1725,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(1.0);
> ++  }
> ++
> +   start_volume = current_volume;
> +   i = 0;
> + 
> +@@ -1724,6 +1772,10 @@
> + {
> +   gdouble retval;
> + 
> ++  if(buffer == NULL){
> ++    return(1.0);
> ++  }
> ++
> +   retval = 0.0;
> +   
> +   switch(format){
> +@@ -1818,6 +1870,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -1943,6 +1999,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -2068,6 +2128,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -2193,6 +2257,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -2318,6 +2386,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -2443,6 +2515,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -2568,6 +2644,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -2693,6 +2773,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> +   //TODO:JK: improve me
> +@@ -2726,6 +2810,10 @@
> + 			     guint buffer_length,
> + 			     gdouble volume)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +     {
> +@@ -2815,6 +2903,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(0.0);
> ++  }
> ++
> +   /* calculate average value */
> +   current_value = 0.0;
> + 
> +@@ -3119,6 +3211,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(0.0);
> ++  }
> ++
> +   /* calculate average value */
> +   current_value = 0.0;
> + 
> +@@ -3423,6 +3519,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(0.0);
> ++  }
> ++
> +   /* calculate average value */
> +   current_value = 0.0;
> + 
> +@@ -3727,6 +3827,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(0.0);
> ++  }
> ++
> +   /* calculate average value */
> +   current_value = 0.0;
> + 
> +@@ -4031,6 +4135,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(0.0);
> ++  }
> ++
> +   /* calculate average value */
> +   current_value = 0.0;
> + 
> +@@ -4335,6 +4443,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(0.0);
> ++  }
> ++
> +   /* calculate average value */
> +   current_value = 0.0;
> + 
> +@@ -4633,6 +4745,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(0.0);
> ++  }
> ++
> +   /* calculate average value */
> +   current_value = 0.0;
> + 
> +@@ -4932,6 +5048,10 @@
> +   guint current_channel;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return(0.0);
> ++  }
> ++
> +   i = 0;
> +   
> +   /* calculate average value */
> +@@ -4985,6 +5105,10 @@
> + {
> +   gdouble current_value;
> + 
> ++  if(buffer == NULL){
> ++    return(0.0);
> ++  }
> ++
> +   current_value = 0.0;
> +   
> +   switch(format){
> +@@ -5091,6 +5215,10 @@
> + 
> +   gint8 *ret_buffer;
> + 
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5144,6 +5272,10 @@
> + 
> +   gint16 *ret_buffer;
> + 
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5197,6 +5329,10 @@
> + 
> +   gint32 *ret_buffer;
> + 
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5250,6 +5386,10 @@
> + 
> +   gint32 *ret_buffer;
> + 
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5303,6 +5443,10 @@
> + 
> +   gint64 *ret_buffer;
> + 
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5356,6 +5500,10 @@
> + 
> +   gfloat *ret_buffer;
> + 
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   //FIXME:JK: lost precision
> + 
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> +@@ -5412,6 +5560,10 @@
> + 
> +   gdouble *ret_buffer;
> + 
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   //FIXME:JK: lost precision
> + 
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> +@@ -5480,6 +5632,10 @@
> +   guint output_frames;
> +   guint i, n;
> + 
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   delay_factor = 1.0 / (gdouble) target_samplerate * (gdouble) samplerate;
> +   
> +   output_frames = ceil((gdouble) buffer_length / (gdouble) samplerate * (gdouble) target_samplerate);
> +@@ -5544,6 +5700,10 @@
> + {
> +   void *retval;
> + 
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   retval = NULL;
> +   
> +   switch(format){
> +@@ -5642,6 +5802,11 @@
> + {
> +   SRC_DATA secret_rabbit;
> + 
> ++  if(buffer == NULL ||
> ++     target_buffer == NULL){
> ++    return;
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5691,6 +5856,11 @@
> + {
> +   SRC_DATA secret_rabbit;
> + 
> ++  if(buffer == NULL ||
> ++     target_buffer == NULL){
> ++    return;
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5740,6 +5910,11 @@
> + {
> +   SRC_DATA secret_rabbit;
> + 
> ++  if(buffer == NULL ||
> ++     target_buffer == NULL){
> ++    return;
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5789,6 +5964,11 @@
> + {
> +   SRC_DATA secret_rabbit;
> + 
> ++  if(buffer == NULL ||
> ++     target_buffer == NULL){
> ++    return;
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5838,6 +6018,11 @@
> + {
> +   SRC_DATA secret_rabbit;
> + 
> ++  if(buffer == NULL ||
> ++     target_buffer == NULL){
> ++    return;
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5887,6 +6072,11 @@
> + {
> +   SRC_DATA secret_rabbit;
> + 
> ++  if(buffer == NULL ||
> ++     target_buffer == NULL){
> ++    return;
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5931,6 +6121,11 @@
> + {
> +   SRC_DATA secret_rabbit;
> + 
> ++  if(buffer == NULL ||
> ++     target_buffer == NULL){
> ++    return;
> ++  }
> ++
> +   secret_rabbit.src_ratio = target_samplerate / samplerate;
> + 
> +   secret_rabbit.input_frames = buffer_length;
> +@@ -5993,6 +6188,11 @@
> +   guint output_frames;
> +   guint i, n;
> + 
> ++  if(buffer == NULL ||
> ++     target_buffer == NULL){
> ++    return;
> ++  }
> ++
> +   delay_factor = 1.0 / (gdouble) target_samplerate * (gdouble) samplerate;
> +   
> +   output_frames = ceil((gdouble) buffer_length / (gdouble) samplerate * (gdouble) target_samplerate);
> +@@ -6053,6 +6253,11 @@
> + 					   guint target_buffer_length,
> + 					   void *target_buffer)
> + {
> ++  if(buffer == NULL ||
> ++     target_buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +     {
> +@@ -6160,6 +6365,11 @@
> +   gint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -6319,6 +6529,11 @@
> +   gint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -6477,6 +6692,11 @@
> +   gint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -6636,6 +6856,11 @@
> +   gint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -6792,6 +7017,11 @@
> +   gint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;  
> + 
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -6951,6 +7181,11 @@
> +   gint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -7107,6 +7342,11 @@
> +   gint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -7264,6 +7504,11 @@
> + {
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> +   for(; i < count; i++){
> +@@ -7298,6 +7543,11 @@
> + 			   void *source, guint schannels,
> + 			   guint count, guint format)
> + {
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   switch(format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +     {
> +@@ -7381,6 +7631,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -7542,6 +7797,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -7707,6 +7967,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -7872,6 +8137,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -8037,6 +8307,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -8203,6 +8478,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -8369,6 +8649,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -8534,6 +8819,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -8697,6 +8987,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -8857,6 +9152,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -9022,6 +9322,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -9187,6 +9492,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -9353,6 +9663,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -9519,6 +9834,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -9684,6 +10004,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -9849,6 +10174,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -10012,6 +10342,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -10173,6 +10508,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -10338,6 +10678,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -10504,6 +10849,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -10670,6 +11020,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -10835,6 +11190,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -11000,6 +11360,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -11165,6 +11530,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -11328,6 +11698,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -11486,6 +11861,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -11652,6 +12032,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -11818,6 +12203,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -11983,6 +12373,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -12148,6 +12543,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -12313,6 +12713,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -12478,6 +12883,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -12641,6 +13051,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;  
> + 
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -12803,6 +13218,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -12969,6 +13389,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -13134,6 +13559,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -13299,6 +13729,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -13464,6 +13899,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -13629,6 +14069,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -13794,6 +14239,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -13957,6 +14407,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -14113,6 +14568,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -14271,6 +14731,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -14436,6 +14901,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -14601,6 +15071,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -14766,6 +15241,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -14931,6 +15411,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -15094,6 +15579,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -15253,6 +15743,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -15416,6 +15911,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -15582,6 +16082,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -15748,6 +16253,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -15914,6 +16424,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -16080,6 +16595,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -16243,6 +16763,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -16399,6 +16924,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -16555,6 +17085,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -16713,6 +17248,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -16878,6 +17418,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -17043,6 +17588,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -17208,6 +17758,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -17373,6 +17928,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -17536,6 +18096,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -17692,6 +18257,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> + #if defined(AGS_VECTORIZED_BUILTIN_FUNCTIONS)
> +@@ -17853,6 +18423,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = &c_value;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -17899,6 +18474,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = &c_value;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -17945,6 +18525,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = &c_value;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -17991,6 +18576,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = &c_value;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -18037,6 +18627,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = &c_value;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -18083,6 +18678,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = &c_value;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -18129,6 +18729,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = &c_value;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -18179,6 +18784,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = &c_value;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -18226,6 +18836,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> +   for(; i < count; i++){
> +@@ -18266,6 +18881,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> +   
> +   ptr = &value;
> +@@ -18304,6 +18924,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> +   ptr = &value;    
> +@@ -18342,6 +18967,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> +   ptr = &value;    
> +@@ -18380,6 +19010,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> +   ptr = &value;    
> +@@ -18418,6 +19053,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> +   ptr = &value;    
> +@@ -18456,6 +19096,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> +   ptr = &value;    
> +@@ -18494,6 +19139,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> +   ptr = &value;    
> +@@ -18533,6 +19183,11 @@
> +   guint current_dchannel, current_schannel;
> +   guint i;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   i = 0;
> + 
> +   ptr = &value;    
> +@@ -18568,6 +19223,11 @@
> + 					    void *source, guint schannels, guint soffset,
> + 					    guint count, guint mode)
> + {
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++
> +   switch(mode){
> +   case AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S8:
> +     {
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_buffer_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_buffer_util-c.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_buffer_util-c.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_buffer_util-c.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,375 @@
> +Description: fix undefined behavior in ags_buffer_util.c
> + ags_buffer_util.c didn't set output variables if buffer is NULL.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/lib/ags_buffer_util.c
> ++++ b/ags/lib/ags_buffer_util.c
> +@@ -54,6 +54,10 @@
> + 
> +   guint limit;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> +   
> +   start_cbuffer = 
> +     cbuffer = (guchar *) malloc(buffer_length * sizeof(guchar));
> +@@ -107,6 +111,10 @@
> + 
> +   guint limit;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> +   
> +   start_cbuffer = 
> +     cbuffer = (guchar *) malloc((2 * buffer_length) * sizeof(guchar));
> +@@ -176,6 +184,10 @@
> + 
> +   guint limit;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> +   
> +   start_cbuffer = 
> +     cbuffer = (guchar *) malloc((4 * buffer_length) * sizeof(guchar));
> +@@ -263,6 +275,10 @@
> + 
> +   guint limit;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> +   
> +   start_cbuffer = 
> +     cbuffer = (guchar *) malloc((4 * buffer_length) * sizeof(guchar));
> +@@ -350,6 +366,10 @@
> + 
> +   guint limit;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> +   
> +   start_cbuffer = 
> +     cbuffer = (guchar *) malloc((8 * buffer_length) * sizeof(guchar));
> +@@ -470,6 +490,10 @@
> + 				     guint buffer_length)
> + {
> +   guchar *cbuffer, *start_cbuffer;
> ++
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> +   
> +   start_cbuffer = 
> +     cbuffer = (guchar *) malloc((buffer_length * sizeof(gfloat)) * sizeof(guchar));
> +@@ -496,6 +520,10 @@
> + {
> +   guchar *cbuffer, *start_cbuffer;
> + 
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   start_cbuffer = 
> +     cbuffer = (guchar *) malloc((buffer_length * sizeof(gdouble)) * sizeof(guchar));
> + 
> +@@ -521,6 +549,10 @@
> + {
> +   guchar *cbuffer, *start_cbuffer;
> + 
> ++  if(buffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   start_cbuffer = 
> +     cbuffer = (guchar *) malloc((buffer_length * sizeof(AgsComplex)) * sizeof(guchar));
> + 
> +@@ -549,6 +581,10 @@
> +   guint limit;
> +   guint i;
> + 
> ++  if(cbuffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   start_buffer = 
> +     buffer = (gint8 *) malloc(buffer_size * sizeof(gint8));
> +   memset(buffer, 0, buffer_size * sizeof(gint8));
> +@@ -603,6 +639,10 @@
> +   guint limit;
> +   guint i;
> + 
> ++  if(cbuffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   start_buffer = 
> +     buffer = (gint16 *) malloc((buffer_size / 2) * sizeof(gint16));
> +   memset(buffer, 0, (buffer_size / 2) * sizeof(gint16));
> +@@ -675,6 +715,10 @@
> +   guint limit;
> +   guint i;
> + 
> ++  if(cbuffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   start_buffer = 
> +     buffer = (gint32 *) malloc((buffer_size / 4) * sizeof(gint32));
> +   memset(buffer, 0, (buffer_size / 4) * sizeof(gint32));
> +@@ -765,6 +809,10 @@
> +   guint limit;
> +   guint i;
> +   
> ++  if(cbuffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   start_buffer = 
> +     buffer = (gint32 *) malloc((buffer_size / 4) * sizeof(gint32));
> +   memset(buffer, 0, (buffer_size / 4) * sizeof(gint32));
> +@@ -855,6 +903,10 @@
> +   guint limit;
> +   guint i;
> + 
> ++  if(cbuffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   start_buffer = 
> +     buffer = (gint64 *) malloc((buffer_size / 8) * sizeof(gint64));
> +   memset(buffer, 0, (buffer_size / 8) * sizeof(gint64));
> +@@ -978,6 +1030,10 @@
> + {
> +   gfloat *buffer, *start_buffer;
> +   
> ++  if(cbuffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   start_buffer = 
> +     buffer = (gfloat *) malloc((buffer_size / sizeof(gfloat)) * sizeof(gfloat));
> + 
> +@@ -1005,6 +1061,10 @@
> + {
> +   gdouble *buffer, *start_buffer;
> +   
> ++  if(cbuffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   start_buffer = 
> +     buffer = (gdouble *) malloc((buffer_size / sizeof(gdouble)) * sizeof(gdouble));
> + 
> +@@ -1032,6 +1092,10 @@
> + {
> +   AgsComplex *buffer, *start_buffer;
> +   
> ++  if(cbuffer == NULL){
> ++    return(NULL);
> ++  }
> ++
> +   start_buffer = 
> +     buffer = (AgsComplex *) malloc((buffer_size / sizeof(AgsComplex)) * sizeof(AgsComplex));
> + 
> +@@ -1059,6 +1123,10 @@
> + {
> +   gint8 val;
> + 
> ++  if(cbuffer == NULL){
> ++    return(0);
> ++  }
> ++
> +   val = 0;
> +   val |= cbuffer[0];
> + 
> +@@ -1082,6 +1150,10 @@
> + {
> +   gint16 val;
> + 
> ++  if(cbuffer == NULL){
> ++    return(0);
> ++  }
> ++
> +   val = 0;
> +   
> +   if(byte_order == AGS_BYTE_ORDER_BE){
> +@@ -1112,6 +1184,10 @@
> + {
> +   gint32 val;
> + 
> ++  if(cbuffer == NULL){
> ++    return(0);
> ++  }
> ++
> +   val = 0;
> +   
> +   if(byte_order == AGS_BYTE_ORDER_BE){
> +@@ -1144,6 +1220,10 @@
> + {
> +   gint32 val;
> + 
> ++  if(cbuffer == NULL){
> ++    return(0);
> ++  }
> ++
> +   val = 0;
> +   
> +   if(byte_order == AGS_BYTE_ORDER_BE){
> +@@ -1178,6 +1258,10 @@
> + {
> +   gint64 val;
> + 
> ++  if(cbuffer == NULL){
> ++    return(0);
> ++  }
> ++
> +   val = 0;
> +   
> +   if(byte_order == AGS_BYTE_ORDER_BE){
> +@@ -1222,6 +1306,10 @@
> +     guint32 val;
> +     GFloatIEEE754 ieee_float;
> +   }data;
> ++
> ++  if(cbuffer == NULL){
> ++    return(0.0);
> ++  }
> +   
> +   data.val = 0;
> +   
> +@@ -1260,6 +1348,10 @@
> +     GDoubleIEEE754 ieee_double;
> +   }data;
> + 
> ++  if(cbuffer == NULL){
> ++    return(0.0);
> ++  }
> ++
> +   data.val = 0;
> +   
> +   if(byte_order == AGS_BYTE_ORDER_BE){
> +@@ -1306,6 +1398,10 @@
> +   }data;
> + 
> +   guint i;
> ++
> ++  if(cbuffer == NULL){
> ++    return(NULL);
> ++  }
> +   
> +   for(i = 0; i < sizeof(AgsComplex); i++){
> +     if(byte_order == AGS_BYTE_ORDER_BE){
> +@@ -1333,6 +1429,10 @@
> + 				     gint8 value,
> + 				     guint byte_order)
> + {
> ++  if(cbuffer == NULL){
> ++    return;
> ++  }
> ++  
> +   cbuffer[0] = value;
> + }
> + 
> +@@ -1351,6 +1451,10 @@
> + 				      gint16 value,
> + 				      guint byte_order)
> + {
> ++  if(cbuffer == NULL){
> ++    return;
> ++  }
> ++
> +   if(byte_order == AGS_BYTE_ORDER_BE){
> +     cbuffer[0] = (0xff & value);
> +     cbuffer[1] = (0xff00 & value) >> 8;
> +@@ -1375,6 +1479,10 @@
> + 				      gint32 value,
> + 				      guint byte_order)
> + {
> ++  if(cbuffer == NULL){
> ++    return;
> ++  }
> ++
> +   if(byte_order == AGS_BYTE_ORDER_BE){
> +     cbuffer[0] = (0xff & value);
> +     cbuffer[1] = (0xff00 & value) >> 8;
> +@@ -1401,6 +1509,10 @@
> + 				      gint32 value,
> + 				      guint byte_order)
> + {
> ++  if(cbuffer == NULL){
> ++    return;
> ++  }
> ++
> +   if(byte_order == AGS_BYTE_ORDER_BE){
> +     cbuffer[0] = (0xff & value);
> +     cbuffer[1] = (0xff00 & value) >> 8;
> +@@ -1429,6 +1541,10 @@
> + 				      gint64 value,
> + 				      guint byte_order)
> + {
> ++  if(cbuffer == NULL){
> ++    return;
> ++  }
> ++
> +   if(byte_order == AGS_BYTE_ORDER_BE){
> +     cbuffer[0] = (0xff & value);
> +     cbuffer[1] = (0xff00 & value) >> 8;
> +@@ -1470,6 +1586,10 @@
> +     GFloatIEEE754 ieee_float;
> +   }data;
> + 
> ++  if(cbuffer == NULL){
> ++    return;
> ++  }
> ++
> +   data.ieee_float.v_float = value;
> +   
> +   if(byte_order == AGS_BYTE_ORDER_BE){
> +@@ -1505,6 +1625,10 @@
> +     GDoubleIEEE754 ieee_double;
> +   }data;
> + 
> ++  if(cbuffer == NULL){
> ++    return;
> ++  }
> ++
> +   data.ieee_double.v_double = value;
> + 
> +   if(byte_order == AGS_BYTE_ORDER_BE){
> +@@ -1550,6 +1674,10 @@
> + 
> +   guint i;
> + 
> ++  if(cbuffer == NULL){
> ++    return;
> ++  }
> ++
> +   ags_complex_set(&(data.c_val),
> + 		  ags_complex_get(value));
> + 
> +@@ -1581,6 +1709,10 @@
> +     
> +   guint i, j;
> + 
> ++  if(cbuffer == NULL){
> ++    return;
> ++  }
> ++
> +   if(word_size <= 1){
> +     return;
> +   }
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_char_buffer_util-ch.diff gsequencer-3.7.44/debian/patches/patch-ags_char_buffer_util-ch.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_char_buffer_util-ch.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_char_buffer_util-ch.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,303 @@
> +Description: fix undefined behavior in ags_char_buffer_util.c
> + ags_char_buffer_util.c didn't set output variables if buffer is NULL. This
> + patch fixes some type safety problems with floating point numbers.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/ags_char_buffer_util.c
> ++++ b/ags/audio/ags_char_buffer_util.c
> +@@ -1,5 +1,5 @@
> + /* GSequencer - Advanced GTK Sequencer
> +- * Copyright (C) 2005-2019 Joël Krähemann
> ++ * Copyright (C) 2005-2021 Joël Krähemann
> +  *
> +  * This file is part of GSequencer.
> +  *
> +@@ -53,6 +53,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1) / G_MAXINT8;
> +   
> +   swap_bytes = FALSE;
> +@@ -193,6 +198,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1) / G_MAXINT16;
> +   
> +   swap_bytes = FALSE;
> +@@ -333,6 +343,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1) / ((1 << 23) - 1);
> +   
> +   swap_bytes = FALSE;
> +@@ -473,6 +488,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1) / G_MAXINT32;
> +   
> +   swap_bytes = FALSE;
> +@@ -613,6 +633,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1) / G_MAXINT64;
> +   
> +   swap_bytes = FALSE;
> +@@ -746,13 +771,18 @@
> +  */
> + void
> + ags_char_buffer_util_copy_float_to_cbuffer(guchar *destination, guint word_size, guint dchannels,
> +-					   float *source, guint schannels,
> ++					   gfloat *source, guint schannels,
> + 					   guint frame_count, guint byte_order)
> + {
> +   gdouble scale_factor;
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1);
> +   
> +   swap_bytes = FALSE;
> +@@ -890,13 +920,18 @@
> +  */
> + void
> + ags_char_buffer_util_copy_double_to_cbuffer(guchar *destination, guint word_size, guint dchannels,
> +-					    double *source, guint schannels,
> ++					    gdouble *source, guint schannels,
> + 					    guint frame_count, guint byte_order)
> + {
> +   gdouble scale_factor;
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = (((guint64) 1 << (word_size * 8 - 1)) - 1);
> +   
> +   swap_bytes = FALSE;
> +@@ -1041,6 +1076,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = G_MAXINT8 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
> +   
> +   swap_bytes = FALSE;
> +@@ -1175,6 +1215,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = G_MAXINT16 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
> +   
> +   swap_bytes = FALSE;
> +@@ -1309,6 +1354,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = ((1 << 23) - 1) / (((guint64) 1 << (word_size * 8 - 1)) - 1);
> +   
> +   swap_bytes = FALSE;
> +@@ -1443,6 +1493,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = G_MAXINT32 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
> +   
> +   swap_bytes = FALSE;
> +@@ -1577,6 +1632,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = G_MAXINT64 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
> +   
> +   swap_bytes = FALSE;
> +@@ -1703,7 +1763,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_char_buffer_util_copy_cbuffer_to_float(float *destination, guint dchannels,
> ++ags_char_buffer_util_copy_cbuffer_to_float(gfloat *destination, guint dchannels,
> + 					   gint8 *source, guint word_size, guint schannels,
> + 					   guint frame_count, guint byte_order)
> + {
> +@@ -1711,6 +1771,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = 1.0 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
> +   
> +   swap_bytes = FALSE;
> +@@ -1837,7 +1902,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_char_buffer_util_copy_cbuffer_to_double(double *destination, guint dchannels,
> ++ags_char_buffer_util_copy_cbuffer_to_double(gdouble *destination, guint dchannels,
> + 					    guchar *source, guint word_size, guint schannels,
> + 					    guint frame_count, guint byte_order)
> + {
> +@@ -1845,6 +1910,11 @@
> +   guint i;
> +   gboolean swap_bytes;
> + 
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   scale_factor = 1.0 / (((guint64) 1 << (word_size * 8 - 1)) - 1);
> +   
> +   swap_bytes = FALSE;
> +@@ -1977,6 +2047,11 @@
> + 					   guint frame_count, guint byte_order,
> + 					   guint word_size, guint mode)
> + {
> ++  if(destination == NULL ||
> ++     source == NULL){
> ++    return;
> ++  }
> ++  
> +   switch(mode){
> +   case AGS_CHAR_BUFFER_UTIL_COPY_S8_TO_CBUFFER:
> +     {
> +@@ -2016,14 +2091,14 @@
> +   case AGS_CHAR_BUFFER_UTIL_COPY_FLOAT_TO_CBUFFER:
> +     {
> +       ags_char_buffer_util_copy_float_to_cbuffer(((guchar *) destination) + (doffset * word_size), word_size, dchannels,
> +-						 ((float *) source) + soffset, schannels,
> ++						 ((gfloat *) source) + soffset, schannels,
> + 						 frame_count, byte_order);
> +     }
> +     break;
> +   case AGS_CHAR_BUFFER_UTIL_COPY_DOUBLE_TO_CBUFFER:
> +     {
> +       ags_char_buffer_util_copy_double_to_cbuffer(((guchar *) destination) + (doffset * word_size), word_size, dchannels,
> +-						  ((double *) source) + soffset, schannels,
> ++						  ((gdouble *) source) + soffset, schannels,
> + 						  frame_count, byte_order);
> +     }
> +     break;
> +@@ -2064,14 +2139,14 @@
> +     break;
> +   case AGS_CHAR_BUFFER_UTIL_COPY_CBUFFER_TO_FLOAT:
> +     {
> +-      ags_char_buffer_util_copy_cbuffer_to_float(((float *) destination) + doffset, dchannels,
> ++      ags_char_buffer_util_copy_cbuffer_to_float(((gfloat *) destination) + doffset, dchannels,
> + 						 ((guchar *) source) + (soffset * word_size), word_size, schannels,
> + 						 frame_count, byte_order);
> +     }
> +     break;
> +   case AGS_CHAR_BUFFER_UTIL_COPY_CBUFFER_TO_DOUBLE:
> +     {
> +-      ags_char_buffer_util_copy_cbuffer_to_double(((double *) destination) + doffset, dchannels,
> ++      ags_char_buffer_util_copy_cbuffer_to_double(((gdouble *) destination) + doffset, dchannels,
> + 						  ((guchar *) source) + (soffset * word_size), word_size, schannels,
> + 						  frame_count, byte_order);
> +     }
> +--- a/ags/audio/ags_char_buffer_util.h
> ++++ b/ags/audio/ags_char_buffer_util.h
> +@@ -1,5 +1,5 @@
> + /* GSequencer - Advanced GTK Sequencer
> +- * Copyright (C) 2005-2020 Joël Krähemann
> ++ * Copyright (C) 2005-2021 Joël Krähemann
> +  *
> +  * This file is part of GSequencer.
> +  *
> +@@ -80,10 +80,10 @@
> + 					      gint64 *source, guint schannels,
> + 					      guint frame_count, guint byte_order);
> + void ags_char_buffer_util_copy_float_to_cbuffer(guchar *destination, guint word_size, guint dchannels,
> +-						float *source, guint schannels,
> ++						gfloat *source, guint schannels,
> + 						guint frame_count, guint byte_order);
> + void ags_char_buffer_util_copy_double_to_cbuffer(guchar *destination, guint word_size, guint dchannels,
> +-						 double *source, guint schannels,
> ++						 gdouble *source, guint schannels,
> + 						 guint frame_count, guint byte_order);
> + 
> + /* copy from cbuffer */
> +@@ -102,10 +102,10 @@
> + void ags_char_buffer_util_copy_cbuffer_to_s64(gint64 *destination, guint dchannels,
> + 					      guchar *source, guint word_size, guint schannels,
> + 					      guint frame_count, guint byte_order);
> +-void ags_char_buffer_util_copy_cbuffer_to_float(float *destination, guint dchannels,
> ++void ags_char_buffer_util_copy_cbuffer_to_float(gfloat *destination, guint dchannels,
> + 						gint8 *source, guint word_size, guint schannels,
> + 						guint frame_count, guint byte_order);
> +-void ags_char_buffer_util_copy_cbuffer_to_double(double *destination, guint dchannels,
> ++void ags_char_buffer_util_copy_cbuffer_to_double(gdouble *destination, guint dchannels,
> + 						 guchar *source, guint word_size, guint schannels,
> + 						 guint frame_count, guint byte_order);
> + 
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_fast_pitch_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_fast_pitch_util-c.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_fast_pitch_util-c.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_fast_pitch_util-c.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,100 @@
> +Description: fix undefined behavior in ags_fast_pitch_util.c
> + ags_fast_pitch_util.c check buffer is NULL.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/ags_fast_pitch_util.c
> ++++ b/ags/audio/ags_fast_pitch_util.c
> +@@ -66,6 +66,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i, j;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -379,6 +383,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i, j;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -692,6 +700,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i, j;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -1005,6 +1017,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i, j;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -1318,6 +1334,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i, j;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -1627,6 +1647,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i, j;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -1940,6 +1964,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i, j;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -2253,6 +2281,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i, j;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_filter_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_filter_util-c.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_filter_util-c.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_filter_util-c.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,100 @@
> +Description: fix undefined behavior in ags_filter_util.c
> + ags_filter_util.c check buffer is NULL.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/ags_filter_util.c
> ++++ b/ags/audio/ags_filter_util.c
> +@@ -66,6 +66,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -368,6 +372,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -670,6 +678,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -972,6 +984,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -1274,6 +1290,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -1576,6 +1596,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -1878,6 +1902,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> +@@ -2180,6 +2208,10 @@
> +   gdouble freq_period, im_freq_period, low_freq_period, new_freq_period;
> +   gdouble t;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   /* frequency */
> +   base_freq = exp2((base_key) / 12.0) * 440.0;
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_fm_synth_util-ch.diff gsequencer-3.7.44/debian/patches/patch-ags_fm_synth_util-ch.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_fm_synth_util-ch.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_fm_synth_util-ch.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,789 @@
> +Description: fix undefined behavior in ags_fm_synth_util.c
> + ags_fm_synth_util.c checkk if buffer is NULL. This patch fixes some type
> + safety problems with floating point numbers.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/ags_fm_synth_util.c
> ++++ b/ags/audio/ags_fm_synth_util.c
> +@@ -1,5 +1,5 @@
> + /* GSequencer - Advanced GTK Sequencer
> +- * Copyright (C) 2005-2020 Joël Krähemann
> ++ * Copyright (C) 2005-2021 Joël Krähemann
> +  *
> +  * This file is part of GSequencer.
> +  *
> +@@ -65,6 +65,10 @@
> +   static const gdouble scale = 127.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -133,6 +137,10 @@
> + {
> +   static const gdouble scale = 32767.0;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +     
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +@@ -203,6 +211,10 @@
> +   static const gdouble scale = 8388607.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -272,6 +284,10 @@
> +   static const gdouble scale = 214748363.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -341,6 +357,10 @@
> +   static const gdouble scale = 9223372036854775807.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -399,7 +419,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_fm_synth_util_sin_float(float *buffer,
> ++ags_fm_synth_util_sin_float(gfloat *buffer,
> + 			    gdouble freq, gdouble phase, gdouble volume,
> + 			    guint samplerate,
> + 			    guint offset, guint n_frames,
> +@@ -409,6 +429,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -467,7 +491,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_fm_synth_util_sin_double(double *buffer,
> ++ags_fm_synth_util_sin_double(gdouble *buffer,
> + 			     gdouble freq, gdouble phase, gdouble volume,
> + 			     guint samplerate,
> + 			     guint offset, guint n_frames,
> +@@ -477,6 +501,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -551,6 +579,10 @@
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = buffer;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -635,6 +667,10 @@
> +   static const gdouble scale = 127.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -707,6 +743,10 @@
> +   static const gdouble scale = 32767.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -779,6 +819,10 @@
> +   static const gdouble scale = 8388607.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -851,6 +895,10 @@
> +   static const gdouble scale = 214748363.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -923,6 +971,10 @@
> +   static const gdouble scale = 9223372036854775807.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -984,7 +1036,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_fm_synth_util_sawtooth_float(float *buffer,
> ++ags_fm_synth_util_sawtooth_float(gfloat *buffer,
> + 				 gdouble freq, gdouble phase, gdouble volume,
> + 				 guint samplerate,
> + 				 guint offset, guint n_frames,
> +@@ -994,6 +1046,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1055,7 +1111,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_fm_synth_util_sawtooth_double(double *buffer,
> ++ags_fm_synth_util_sawtooth_double(gdouble *buffer,
> + 				  gdouble freq, gdouble phase, gdouble volume,
> + 				  guint samplerate,
> + 				  guint offset, guint n_frames,
> +@@ -1065,6 +1121,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1142,6 +1202,10 @@
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1229,6 +1293,10 @@
> +   static const gdouble scale = 127.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1301,6 +1369,10 @@
> +   static const gdouble scale = 32767.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1374,6 +1446,10 @@
> +   gdouble current_freq;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1445,6 +1521,10 @@
> + {
> +   static const gdouble scale = 214748363.0;
> +   guint i;
> ++
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> +   
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> +@@ -1518,6 +1598,10 @@
> +   static const gdouble scale = 9223372036854775807.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1579,7 +1663,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_fm_synth_util_triangle_float(float *buffer,
> ++ags_fm_synth_util_triangle_float(gfloat *buffer,
> + 				 gdouble freq, gdouble phase, gdouble volume,
> + 				 guint samplerate,
> + 				 guint offset, guint n_frames,
> +@@ -1589,6 +1673,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1650,7 +1738,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_fm_synth_util_triangle_double(double *buffer,
> ++ags_fm_synth_util_triangle_double(gdouble *buffer,
> + 				  gdouble freq, gdouble phase, gdouble volume,
> + 				  guint samplerate,
> + 				  guint offset, guint n_frames,
> +@@ -1660,6 +1748,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1737,6 +1829,10 @@
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1824,6 +1920,10 @@
> +   static const gdouble scale = 127.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -1913,6 +2013,10 @@
> +   static const gdouble scale = 32767.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -2002,6 +2106,10 @@
> +   static const gdouble scale = 8388607.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -2091,6 +2199,10 @@
> +   static const gdouble scale = 214748363.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -2180,6 +2292,10 @@
> +   static const gdouble scale = 9223372036854775807.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -2258,7 +2374,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_fm_synth_util_square_float(float *buffer,
> ++ags_fm_synth_util_square_float(gfloat *buffer,
> + 			       gdouble freq, gdouble phase, gdouble volume,
> + 			       guint samplerate,
> + 			       guint offset, guint n_frames,
> +@@ -2268,6 +2384,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -2346,7 +2466,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_fm_synth_util_square_double(double *buffer,
> ++ags_fm_synth_util_square_double(gdouble *buffer,
> + 				gdouble freq, gdouble phase, gdouble volume,
> + 				guint samplerate,
> + 				guint offset, guint n_frames,
> +@@ -2356,6 +2476,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -2451,6 +2575,10 @@
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = buffer;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -2555,6 +2683,10 @@
> +   static const gdouble scale = 127.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -2644,6 +2776,10 @@
> +   static const gdouble scale = 32767.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -2733,6 +2869,10 @@
> +   static const gdouble scale = 8388607.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -2822,6 +2962,10 @@
> +   static const gdouble scale = 214748363.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -2911,6 +3055,10 @@
> +   static const gdouble scale = 9223372036854775807.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -2989,7 +3137,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_fm_synth_util_impulse_float(float *buffer,
> ++ags_fm_synth_util_impulse_float(gfloat *buffer,
> + 				gdouble freq, gdouble phase, gdouble volume,
> + 				guint samplerate,
> + 				guint offset, guint n_frames,
> +@@ -2999,6 +3147,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -3077,7 +3229,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_fm_synth_util_impulse_double(double *buffer,
> ++ags_fm_synth_util_impulse_double(gdouble *buffer,
> + 				 gdouble freq, gdouble phase, gdouble volume,
> + 				 guint samplerate,
> + 				 guint offset, guint n_frames,
> +@@ -3087,6 +3239,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(lfo_osc_mode){
> +   case AGS_SYNTH_OSCILLATOR_SIN:
> +   {
> +@@ -3181,6 +3337,10 @@
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = buffer;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -3283,6 +3443,10 @@
> + 		      gdouble lfo_freq, gdouble lfo_depth,
> + 		      gdouble tuning)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -3341,7 +3505,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_fm_synth_util_sin_float((float *) buffer,
> ++    ags_fm_synth_util_sin_float((gfloat *) buffer,
> + 				freq, phase, volume,
> + 				samplerate,
> + 				offset, n_frames,
> +@@ -3352,7 +3516,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_fm_synth_util_sin_double((double *) buffer,
> ++    ags_fm_synth_util_sin_double((gdouble *) buffer,
> + 				 freq, phase, volume,
> + 				 samplerate,
> + 				 offset, n_frames,
> +@@ -3407,6 +3571,10 @@
> + 			   gdouble lfo_freq, gdouble lfo_depth,
> + 			   gdouble tuning)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -3465,7 +3633,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_fm_synth_util_sawtooth_float((float *) buffer,
> ++    ags_fm_synth_util_sawtooth_float((gfloat *) buffer,
> + 				     freq, phase, volume,
> + 				     samplerate,
> + 				     offset, n_frames,
> +@@ -3476,7 +3644,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_fm_synth_util_sawtooth_double((double *) buffer,
> ++    ags_fm_synth_util_sawtooth_double((gdouble *) buffer,
> + 				      freq, phase, volume,
> + 				      samplerate,
> + 				      offset, n_frames,
> +@@ -3531,6 +3699,10 @@
> + 			   gdouble lfo_freq, gdouble lfo_depth,
> + 			   gdouble tuning)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -3589,7 +3761,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_fm_synth_util_triangle_float((float *) buffer,
> ++    ags_fm_synth_util_triangle_float((gfloat *) buffer,
> + 				     freq, phase, volume,
> + 				     samplerate,
> + 				     offset, n_frames,
> +@@ -3600,7 +3772,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_fm_synth_util_triangle_double((double *) buffer,
> ++    ags_fm_synth_util_triangle_double((gdouble *) buffer,
> + 				      freq, phase, volume,
> + 				      samplerate,
> + 				      offset, n_frames,
> +@@ -3655,6 +3827,10 @@
> + 			 gdouble lfo_freq, gdouble lfo_depth,
> + 			 gdouble tuning)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -3713,7 +3889,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_fm_synth_util_square_float((float *) buffer,
> ++    ags_fm_synth_util_square_float((gfloat *) buffer,
> + 				   freq, phase, volume,
> + 				   samplerate,
> + 				   offset, n_frames,
> +@@ -3724,7 +3900,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_fm_synth_util_square_double((double *) buffer,
> ++    ags_fm_synth_util_square_double((gdouble *) buffer,
> + 				    freq, phase, volume,
> + 				    samplerate,
> + 				    offset, n_frames,
> +@@ -3779,6 +3955,10 @@
> + 			  gdouble lfo_freq, gdouble lfo_depth,
> + 			  gdouble tuning)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -3837,7 +4017,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_fm_synth_util_impulse_float((float *) buffer,
> ++    ags_fm_synth_util_impulse_float((gfloat *) buffer,
> + 				    freq, phase, volume,
> + 				    samplerate,
> + 				    offset, n_frames,
> +@@ -3848,7 +4028,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_fm_synth_util_impulse_double((double *) buffer,
> ++    ags_fm_synth_util_impulse_double((gdouble *) buffer,
> + 				     freq, phase, volume,
> + 				     samplerate,
> + 				     offset, n_frames,
> +--- a/ags/audio/ags_fm_synth_util.h
> ++++ b/ags/audio/ags_fm_synth_util.h
> +@@ -1,5 +1,5 @@
> + /* GSequencer - Advanced GTK Sequencer
> +- * Copyright (C) 2005-2019 Joël Krähemann
> ++ * Copyright (C) 2005-2021 Joël Krähemann
> +  *
> +  * This file is part of GSequencer.
> +  *
> +@@ -63,14 +63,14 @@
> + 			       guint lfo_osc_mode,
> + 			       gdouble lfo_freq, gdouble lfo_depth,
> + 			       gdouble tuning);
> +-void ags_fm_synth_util_sin_float(float *buffer,
> ++void ags_fm_synth_util_sin_float(gfloat *buffer,
> + 				 gdouble freq, gdouble phase, gdouble volume,
> + 				 guint samplerate,
> + 				 guint offset, guint n_frames,
> + 				 guint lfo_osc_mode,
> + 				 gdouble lfo_freq, gdouble lfo_depth,
> + 				 gdouble tuning);
> +-void ags_fm_synth_util_sin_double(double *buffer,
> ++void ags_fm_synth_util_sin_double(gdouble *buffer,
> + 				  gdouble freq, gdouble phase, gdouble volume,
> + 				  guint samplerate,
> + 				  guint offset, guint n_frames,
> +@@ -121,14 +121,14 @@
> + 				    guint lfo_osc_mode,
> + 				    gdouble lfo_freq, gdouble lfo_depth,
> + 				    gdouble tuning);
> +-void ags_fm_synth_util_sawtooth_float(float *buffer,
> ++void ags_fm_synth_util_sawtooth_float(gfloat *buffer,
> + 				      gdouble freq, gdouble phase, gdouble volume,
> + 				      guint samplerate,
> + 				      guint offset, guint n_frames,
> + 				      guint lfo_osc_mode,
> + 				      gdouble lfo_freq, gdouble lfo_depth,
> + 				      gdouble tuning);
> +-void ags_fm_synth_util_sawtooth_double(double *buffer,
> ++void ags_fm_synth_util_sawtooth_double(gdouble *buffer,
> + 				       gdouble freq, gdouble phase, gdouble volume,
> + 				       guint samplerate,
> + 				       guint offset, guint n_frames,
> +@@ -179,14 +179,14 @@
> + 				    guint lfo_osc_mode,
> + 				    gdouble lfo_freq, gdouble lfo_depth,
> + 				    gdouble tuning);
> +-void ags_fm_synth_util_triangle_float(float *buffer,
> ++void ags_fm_synth_util_triangle_float(gfloat *buffer,
> + 				      gdouble freq, gdouble phase, gdouble volume,
> + 				      guint samplerate,
> + 				      guint offset, guint n_frames,
> + 				      guint lfo_osc_mode,
> + 				      gdouble lfo_freq, gdouble lfo_depth,
> + 				      gdouble tuning);
> +-void ags_fm_synth_util_triangle_double(double *buffer,
> ++void ags_fm_synth_util_triangle_double(gdouble *buffer,
> + 				       gdouble freq, gdouble phase, gdouble volume,
> + 				       guint samplerate,
> + 				       guint offset, guint n_frames,
> +@@ -237,14 +237,14 @@
> + 				  guint lfo_osc_mode,
> + 				  gdouble lfo_freq, gdouble lfo_depth,
> + 				  gdouble tuning);
> +-void ags_fm_synth_util_square_float(float *buffer,
> ++void ags_fm_synth_util_square_float(gfloat *buffer,
> + 				    gdouble freq, gdouble phase, gdouble volume,
> + 				    guint samplerate,
> + 				    guint offset, guint n_frames,
> + 				    guint lfo_osc_mode,
> + 				    gdouble lfo_freq, gdouble lfo_depth,
> + 				    gdouble tuning);
> +-void ags_fm_synth_util_square_double(double *buffer,
> ++void ags_fm_synth_util_square_double(gdouble *buffer,
> + 				     gdouble freq, gdouble phase, gdouble volume,
> + 				     guint samplerate,
> + 				     guint offset, guint n_frames,
> +@@ -295,14 +295,14 @@
> + 				   guint lfo_osc_mode,
> + 				   gdouble lfo_freq, gdouble lfo_depth,
> + 				   gdouble tuning);
> +-void ags_fm_synth_util_impulse_float(float *buffer,
> ++void ags_fm_synth_util_impulse_float(gfloat *buffer,
> + 				     gdouble freq, gdouble phase, gdouble volume,
> + 				     guint samplerate,
> + 				     guint offset, guint n_frames,
> + 				     guint lfo_osc_mode,
> + 				     gdouble lfo_freq, gdouble lfo_depth,
> + 				     gdouble tuning);
> +-void ags_fm_synth_util_impulse_double(double *buffer,
> ++void ags_fm_synth_util_impulse_double(gdouble *buffer,
> + 				      gdouble freq, gdouble phase, gdouble volume,
> + 				      guint samplerate,
> + 				      guint offset, guint n_frames,
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_fourier_transform_util-h.diff gsequencer-3.7.44/debian/patches/patch-ags_fourier_transform_util-h.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_fourier_transform_util-h.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_fourier_transform_util-h.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,138 @@
> +Description: fix complex type in ags_fourier_transform_util.c
> + ags_fourier_transform_util.c did use wrong complex data type.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/ags_fourier_transform_util.h
> ++++ b/ags/audio/ags_fourier_transform_util.h
> +@@ -30,7 +30,7 @@
> + 
> + G_BEGIN_DECLS
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S8_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S8_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_h;							\
> +     gdouble l_k;							\
> +     gdouble l_r;							\
> +@@ -46,7 +46,7 @@
> +     									\
> +     ags_complex_set(x_retval[0], l_z); }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S16_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval)  { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S16_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval)  { double _Complex l_z; \
> +     gdouble l_h;							\
> +     gdouble l_k;							\
> +     gdouble l_r;							\
> +@@ -62,7 +62,7 @@
> +     									\
> +     ags_complex_set(x_retval[0], l_z); }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S24_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S24_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_h;							\
> +     gdouble l_k;							\
> +     gdouble l_r;							\
> +@@ -78,7 +78,7 @@
> +     									\
> +     ags_complex_set(x_retval[0], l_z); }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S32_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S32_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_h;							\
> +     gdouble l_k;							\
> +     gdouble l_r;							\
> +@@ -94,7 +94,7 @@
> +     									\
> +     ags_complex_set(x_retval[0], l_z); }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S64_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_S64_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_h;							\
> +     gdouble l_k;							\
> +     gdouble l_r;							\
> +@@ -110,7 +110,7 @@
> +     									\
> +     ags_complex_set(x_retval[0], l_z); }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_FLOAT_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_FLOAT_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_h;							\
> +     gdouble l_k;							\
> +     gdouble l_r;							\
> +@@ -124,7 +124,7 @@
> +     									\
> +     ags_complex_set(x_retval[0], l_z); }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_DOUBLE_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_COMPUTE_STFT_DOUBLE_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_h;							\
> +     gdouble l_k;							\
> +     gdouble l_r;							\
> +@@ -138,7 +138,7 @@
> +     									\
> +     ags_complex_set(x_retval[0], l_z); }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S8_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S8_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_k;							\
> +     gdouble l_y;							\
> + 									\
> +@@ -152,7 +152,7 @@
> + 									\
> +     x_retval[0][0] = scale * l_y; }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S16_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S16_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_k;							\
> +     gdouble l_y;							\
> + 									\
> +@@ -166,7 +166,7 @@
> + 									\
> +     x_retval[0][0] = scale * l_y; }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S24_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S24_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_k;							\
> +     gdouble l_y;							\
> + 									\
> +@@ -180,7 +180,7 @@
> + 									\
> +     x_retval[0][0] = scale * l_y; }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S32_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S32_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_k;							\
> +     gdouble l_y;							\
> + 									\
> +@@ -194,7 +194,7 @@
> + 									\
> +     x_retval[0][0] = scale * l_y; }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S64_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_S64_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_k;							\
> +     gdouble l_y;							\
> + 									\
> +@@ -208,7 +208,7 @@
> + 									\
> +     x_retval[0][0] = scale * l_y; }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_FLOAT_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_FLOAT_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_k;							\
> +     gdouble l_y;							\
> + 									\
> +@@ -220,7 +220,7 @@
> + 									\
> +     x_retval[0][0] = l_y / M_PI; }
> + 
> +-#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_DOUBLE_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { complex l_z; \
> ++#define AGS_FOURIER_TRANSFORM_UTIL_INVERSE_STFT_DOUBLE_FRAME(x_buffer, x_channels, x_n, x_buffer_length, x_retval) { double _Complex l_z; \
> +     gdouble l_k;							\
> +     gdouble l_y;							\
> + 									\
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_lfo_synth_util-ch.diff gsequencer-3.7.44/debian/patches/patch-ags_lfo_synth_util-ch.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_lfo_synth_util-ch.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_lfo_synth_util-ch.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,822 @@
> +Description: check if buffer is NULL and corrected floating point number type
> + ags_lfo_synth_util.[ch] was using wrong floating point number types and check
> + if buffer NULL.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=405d244a87da20bf8a83ed070551094b3e538cf0
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/ags_lfo_synth_util.c
> ++++ b/ags/audio/ags_lfo_synth_util.c
> +@@ -60,6 +60,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (gint8) (0xff & (gint16) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth)));
> +   }
> +@@ -90,6 +94,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (gint16) (0xffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth)));
> +   }
> +@@ -120,6 +128,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (gint32) (0xffffffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth)));
> +   }
> +@@ -150,6 +162,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (gint32) (0xffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth)));
> +   }
> +@@ -180,6 +196,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (gint64) (0xffffffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth)));
> +   }
> +@@ -201,7 +221,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_lfo_synth_util_sin_float(float *buffer,
> ++ags_lfo_synth_util_sin_float(gfloat *buffer,
> + 			     gdouble freq, gdouble phase,
> + 			     gdouble depth,
> + 			     gdouble tuning,
> +@@ -210,6 +230,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (float) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth));
> +   }
> +@@ -231,7 +255,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_lfo_synth_util_sin_double(double *buffer,
> ++ags_lfo_synth_util_sin_double(gdouble *buffer,
> + 			      gdouble freq, gdouble phase,
> + 			      gdouble depth,
> + 			      gdouble tuning,
> +@@ -240,6 +264,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (double) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * depth));
> +   }
> +@@ -272,13 +300,17 @@
> +   AgsComplex *c_ptr;
> +   AgsComplex **c_ptr_ptr;
> + 
> +-  double *y_ptr;
> +-  double y;
> ++  gdouble *y_ptr;
> ++  gdouble y;
> +   double _Complex z0, z1;
> + 
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = &c;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -326,6 +358,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -359,6 +395,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -392,6 +432,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -425,6 +469,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -458,6 +506,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -482,7 +534,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_lfo_synth_util_sawtooth_float(float *buffer,
> ++ags_lfo_synth_util_sawtooth_float(gfloat *buffer,
> + 				  gdouble freq, gdouble phase,
> + 				  gdouble depth,
> + 				  gdouble tuning,
> +@@ -491,6 +543,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -515,7 +571,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_lfo_synth_util_sawtooth_double(double *buffer,
> ++ags_lfo_synth_util_sawtooth_double(gdouble *buffer,
> + 				   gdouble freq, gdouble phase,
> + 				   gdouble depth,
> + 				   gdouble tuning,
> +@@ -524,6 +580,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -559,13 +619,17 @@
> +   AgsComplex *c_ptr;
> +   AgsComplex **c_ptr_ptr;
> + 
> +-  double *y_ptr;
> +-  double y;
> ++  gdouble *y_ptr;
> ++  gdouble y;
> +   double _Complex z0, z1;
> + 
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -616,6 +680,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -649,6 +717,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -682,6 +754,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -715,6 +791,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -748,6 +828,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -772,7 +856,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_lfo_synth_util_triangle_float(float *buffer,
> ++ags_lfo_synth_util_triangle_float(gfloat *buffer,
> + 				  gdouble freq, gdouble phase,
> + 				  gdouble depth,
> + 				  gdouble tuning,
> +@@ -781,6 +865,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -805,7 +893,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_lfo_synth_util_triangle_double(double *buffer,
> ++ags_lfo_synth_util_triangle_double(gdouble *buffer,
> + 				   gdouble freq, gdouble phase,
> + 				   gdouble depth,
> + 				   gdouble tuning,
> +@@ -814,6 +902,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -849,13 +941,17 @@
> +   AgsComplex *c_ptr;
> +   AgsComplex **c_ptr_ptr;
> + 
> +-  double *y_ptr;
> +-  double y;
> ++  gdouble *y_ptr;
> ++  gdouble y;
> +   double _Complex z0, z1;
> + 
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -906,6 +1002,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (gint8) (0xff & (gint16) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
> +@@ -940,6 +1040,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (gint16) (0xffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
> +@@ -974,6 +1078,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (gint32) (0xffffffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
> +@@ -1008,6 +1116,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (gint32) (0xffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
> +@@ -1042,6 +1154,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (gint64) (0xffffffffffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
> +@@ -1067,7 +1183,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_lfo_synth_util_square_float(float *buffer,
> ++ags_lfo_synth_util_square_float(gfloat *buffer,
> + 				gdouble freq, gdouble phase,
> + 				gdouble depth,
> + 				gdouble tuning,
> +@@ -1076,6 +1192,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (buffer[i] * (tuning / 1200.0 + 1.0 * depth));
> +@@ -1101,7 +1221,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_lfo_synth_util_square_double(double *buffer,
> ++ags_lfo_synth_util_square_double(gdouble *buffer,
> + 				 gdouble freq, gdouble phase,
> + 				 gdouble depth,
> + 				 gdouble tuning,
> +@@ -1110,6 +1230,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (buffer[i] * (tuning / 1200.0 + 1.0 * depth));
> +@@ -1146,13 +1270,17 @@
> +   AgsComplex *c_ptr;
> +   AgsComplex **c_ptr_ptr;
> + 
> +-  double *y_ptr;
> +-  double y;
> ++  gdouble *y_ptr;
> ++  gdouble y;
> +   double _Complex z0, z1;
> + 
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = &c;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -1204,6 +1332,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (gint8) (0xff & (gint16) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
> +@@ -1238,6 +1370,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (gint16) (0xffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
> +@@ -1272,6 +1408,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (gint32) (0xffffffff & (gint32) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
> +@@ -1306,6 +1446,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (gint32) (0xffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
> +@@ -1340,6 +1484,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (gint64) (0xffffffffffffffff & (gint64) ((gdouble) buffer[i] * (gdouble) (tuning / 1200.0 + 1.0 * depth)));
> +@@ -1365,7 +1513,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_lfo_synth_util_impulse_float(float *buffer,
> ++ags_lfo_synth_util_impulse_float(gfloat *buffer,
> + 				 gdouble freq, gdouble phase,
> + 				 gdouble depth,
> + 				 gdouble tuning,
> +@@ -1374,6 +1522,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (buffer[i] * (tuning / 1200.0 + 1.0 * depth));
> +@@ -1399,7 +1551,7 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_lfo_synth_util_impulse_double(double *buffer,
> ++ags_lfo_synth_util_impulse_double(gdouble *buffer,
> + 				  gdouble freq, gdouble phase,
> + 				  gdouble depth,
> + 				  gdouble tuning,
> +@@ -1408,6 +1560,10 @@
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (buffer[i] * (tuning / 1200.0 + 1.0 * depth));
> +@@ -1444,13 +1600,17 @@
> +   AgsComplex *c_ptr;
> +   AgsComplex **c_ptr_ptr;
> + 
> +-  double *y_ptr;
> +-  double y;
> ++  gdouble *y_ptr;
> ++  gdouble y;
> +   double _Complex z0, z1;
> + 
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = &c;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -1501,6 +1661,10 @@
> + 		       guint samplerate, guint audio_buffer_util_format,
> + 		       guint offset, guint n_frames)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -1554,7 +1718,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_lfo_synth_util_sin_float((float *) buffer,
> ++    ags_lfo_synth_util_sin_float((gfloat *) buffer,
> + 				 freq, phase,
> + 				 depth,
> + 				 tuning,
> +@@ -1564,7 +1728,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_lfo_synth_util_sin_double((double *) buffer,
> ++    ags_lfo_synth_util_sin_double((gdouble *) buffer,
> + 				  freq, phase,
> + 				  depth,
> + 				  tuning,
> +@@ -1613,6 +1777,10 @@
> + 			    guint samplerate, guint audio_buffer_util_format,
> + 			    guint offset, guint n_frames)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -1666,7 +1834,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_lfo_synth_util_sawtooth_float((float *) buffer,
> ++    ags_lfo_synth_util_sawtooth_float((gfloat *) buffer,
> + 				      freq, phase,
> + 				      depth,
> + 				      tuning,
> +@@ -1676,7 +1844,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_lfo_synth_util_sawtooth_double((double *) buffer,
> ++    ags_lfo_synth_util_sawtooth_double((gdouble *) buffer,
> + 				       freq, phase,
> + 				       depth,
> + 				       tuning,
> +@@ -1725,6 +1893,10 @@
> + 			    guint samplerate, guint audio_buffer_util_format,
> + 			    guint offset, guint n_frames)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -1778,7 +1950,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_lfo_synth_util_triangle_float((float *) buffer,
> ++    ags_lfo_synth_util_triangle_float((gfloat *) buffer,
> + 				      freq, phase,
> + 				      depth,
> + 				      tuning,
> +@@ -1788,7 +1960,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_lfo_synth_util_triangle_double((double *) buffer,
> ++    ags_lfo_synth_util_triangle_double((gdouble *) buffer,
> + 				       freq, phase,
> + 				       depth,
> + 				       tuning,
> +@@ -1837,6 +2009,10 @@
> + 			  guint samplerate, guint audio_buffer_util_format,
> + 			  guint offset, guint n_frames)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -1890,7 +2066,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_lfo_synth_util_square_float((float *) buffer,
> ++    ags_lfo_synth_util_square_float((gfloat *) buffer,
> + 				    freq, phase,
> + 				    depth,
> + 				    tuning,
> +@@ -1900,7 +2076,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_lfo_synth_util_square_double((double *) buffer,
> ++    ags_lfo_synth_util_square_double((gdouble *) buffer,
> + 				     freq, phase,
> + 				     depth,
> + 				     tuning,
> +@@ -1949,6 +2125,10 @@
> + 			   guint samplerate, guint audio_buffer_util_format,
> + 			   guint offset, guint n_frames)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -2002,7 +2182,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_lfo_synth_util_impulse_float((float *) buffer,
> ++    ags_lfo_synth_util_impulse_float((gfloat *) buffer,
> + 				     freq, phase,
> + 				     depth,
> + 				     tuning,
> +@@ -2012,7 +2192,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_lfo_synth_util_impulse_double((double *) buffer,
> ++    ags_lfo_synth_util_impulse_double((gdouble *) buffer,
> + 				      freq, phase,
> + 				      depth,
> + 				      tuning,
> +--- a/ags/audio/ags_lfo_synth_util.h
> ++++ b/ags/audio/ags_lfo_synth_util.h
> +@@ -1,5 +1,5 @@
> + /* GSequencer - Advanced GTK Sequencer
> +- * Copyright (C) 2005-2019 Joël Krähemann
> ++ * Copyright (C) 2005-2021 Joël Krähemann
> +  *
> +  * This file is part of GSequencer.
> +  *
> +@@ -58,13 +58,13 @@
> + 				gdouble tuning,
> + 				guint samplerate,
> + 				guint offset, guint n_frames);
> +-void ags_lfo_synth_util_sin_float(float *buffer,
> ++void ags_lfo_synth_util_sin_float(gfloat *buffer,
> + 				  gdouble freq, gdouble phase,
> + 				  gdouble depth,
> + 				  gdouble tuning,
> + 				  guint samplerate,
> + 				  guint offset, guint n_frames);
> +-void ags_lfo_synth_util_sin_double(double *buffer,
> ++void ags_lfo_synth_util_sin_double(gdouble *buffer,
> + 				   gdouble freq, gdouble phase,
> + 				   gdouble depth,
> + 				   gdouble tuning,
> +@@ -108,13 +108,13 @@
> + 				     gdouble tuning,
> + 				     guint samplerate,
> + 				     guint offset, guint n_frames);
> +-void ags_lfo_synth_util_sawtooth_float(float *buffer,
> ++void ags_lfo_synth_util_sawtooth_float(gfloat *buffer,
> + 				       gdouble freq, gdouble phase,
> + 				       gdouble depth,
> + 				       gdouble tuning,
> + 				       guint samplerate,
> + 				       guint offset, guint n_frames);
> +-void ags_lfo_synth_util_sawtooth_double(double *buffer,
> ++void ags_lfo_synth_util_sawtooth_double(gdouble *buffer,
> + 					gdouble freq, gdouble phase,
> + 					gdouble depth,
> + 					gdouble tuning,
> +@@ -158,13 +158,13 @@
> + 				     gdouble tuning,
> + 				     guint samplerate,
> + 				     guint offset, guint n_frames);
> +-void ags_lfo_synth_util_triangle_float(float *buffer,
> ++void ags_lfo_synth_util_triangle_float(gfloat *buffer,
> + 				       gdouble freq, gdouble phase,
> + 				       gdouble depth,
> + 				       gdouble tuning,
> + 				       guint samplerate,
> + 				       guint offset, guint n_frames);
> +-void ags_lfo_synth_util_triangle_double(double *buffer,
> ++void ags_lfo_synth_util_triangle_double(gdouble *buffer,
> + 					gdouble freq, gdouble phase,
> + 					gdouble depth,
> + 					gdouble tuning,
> +@@ -208,13 +208,13 @@
> + 				   gdouble tuning,
> + 				   guint samplerate,
> + 				   guint offset, guint n_frames);
> +-void ags_lfo_synth_util_square_float(float *buffer,
> ++void ags_lfo_synth_util_square_float(gfloat *buffer,
> + 				     gdouble freq, gdouble phase,
> + 				     gdouble depth,
> + 				     gdouble tuning,
> + 				     guint samplerate,
> + 				     guint offset, guint n_frames);
> +-void ags_lfo_synth_util_square_double(double *buffer,
> ++void ags_lfo_synth_util_square_double(gdouble *buffer,
> + 				      gdouble freq, gdouble phase,
> + 				      gdouble depth,
> + 				      gdouble tuning,
> +@@ -258,13 +258,13 @@
> + 				    gdouble tuning,
> + 				    guint samplerate,
> + 				    guint offset, guint n_frames);
> +-void ags_lfo_synth_util_impulse_float(float *buffer,
> ++void ags_lfo_synth_util_impulse_float(gfloat *buffer,
> + 				      gdouble freq, gdouble phase,
> + 				      gdouble depth,
> + 				      gdouble tuning,
> + 				      guint samplerate,
> + 				      guint offset, guint n_frames);
> +-void ags_lfo_synth_util_impulse_double(double *buffer,
> ++void ags_lfo_synth_util_impulse_double(gdouble *buffer,
> + 				       gdouble freq, gdouble phase,
> + 				       gdouble depth,
> + 				       gdouble tuning,
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_midi_buffer_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_midi_buffer_util-c.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_midi_buffer_util-c.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_midi_buffer_util-c.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,536 @@
> +Description: fix undefined behavior in ags_midi_buffer_util.c
> + ags_midi_buffer_util.c didn't set output variables if buffer is NULL.
> + GCC might complain about maybe-unitialized and with appropriate flags
> + compilation will fail.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-03
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/midi/ags_midi_buffer_util.c
> ++++ b/ags/audio/midi/ags_midi_buffer_util.c
> +@@ -132,6 +132,10 @@
> +   char c;
> + 
> +   if(buffer == NULL){
> ++    if(varlength != NULL){
> ++      *varlength = 0;
> ++    }
> ++    
> +     return(0);
> +   }
> + 
> +@@ -192,6 +196,10 @@
> +   glong tmp;
> + 
> +   if(buffer == NULL){
> ++    if(val != NULL){
> ++      *val = 0;
> ++    }
> ++    
> +     return;
> +   }
> + 
> +@@ -241,6 +249,10 @@
> +   glong tmp;
> + 
> +   if(buffer == NULL){
> ++    if(val != NULL){
> ++      *val = 0;
> ++    }
> ++
> +     return;
> +   }
> +   
> +@@ -292,6 +304,10 @@
> +   glong tmp;
> + 
> +   if(buffer == NULL){
> ++    if(val != NULL){
> ++      *val = 0;
> ++    }
> ++
> +     return;
> +   }
> +   
> +@@ -369,9 +385,26 @@
> + {
> +   static gchar header[] = "MThd";
> + 
> +-  if(g_ascii_strncasecmp(buffer,
> +-			 header,
> +-			 4)){
> ++  if(buffer == NULL ||
> ++     (!g_ascii_strncasecmp(buffer,
> ++			   header,
> ++			   4)) == FALSE){
> ++    if(offset != NULL){
> ++      *offset = 0;
> ++    }
> ++    
> ++    if(format != NULL){
> ++      *format = 0;
> ++    }
> ++
> ++    if(track_count != NULL){
> ++      *track_count = 0;
> ++    }
> ++
> ++    if(division != NULL){
> ++      *division = 0;
> ++    }
> ++    
> +     return(0);
> +   }
> +   
> +@@ -438,13 +471,14 @@
> + {
> +   static gchar track[] = "MTrk";
> + 
> +-  if(buffer == NULL){
> +-    return(0);
> +-  }
> +-  
> +-  if(g_ascii_strncasecmp(buffer,
> +-			 track,
> +-			 4)){
> ++  if(buffer == NULL ||
> ++     (!g_ascii_strncasecmp(buffer,
> ++			   track,
> ++			   4)) == FALSE){
> ++    if(offset != NULL){
> ++      *offset = 0;
> ++    }
> ++
> +     return(0);
> +   }
> + 
> +@@ -520,6 +554,22 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(channel != NULL){
> ++      *channel = 0;
> ++    }
> ++
> ++    if(key != NULL){
> ++      *key = 0;
> ++    }
> ++
> ++    if(velocity != NULL){
> ++      *velocity = 0;
> ++    }
> ++    
> +     return(0);
> +   }
> + 
> +@@ -615,6 +665,22 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(channel != NULL){
> ++      *channel = 0;
> ++    }
> ++
> ++    if(key != NULL){
> ++      *key = 0;
> ++    }
> ++
> ++    if(velocity != NULL){
> ++      *velocity = 0;
> ++    }
> ++
> +     return(0);
> +   }
> + 
> +@@ -710,6 +776,22 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(channel != NULL){
> ++      *channel = 0;
> ++    }
> ++
> ++    if(key != NULL){
> ++      *key = 0;
> ++    }
> ++
> ++    if(pressure != NULL){
> ++      *pressure = 0;
> ++    }
> ++
> +     return(0);
> +   }
> + 
> +@@ -805,6 +887,22 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(channel != NULL){
> ++      *channel = 0;
> ++    }
> ++
> ++    if(control != NULL){
> ++      *control = 0;
> ++    }
> ++
> ++    if(value != NULL){
> ++      *value = 0;
> ++    }
> ++
> +     return(0);
> +   }
> + 
> +@@ -900,6 +998,22 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(channel != NULL){
> ++      *channel = 0;
> ++    }
> ++
> ++    if(pitch != NULL){
> ++      *pitch = 0;
> ++    }
> ++
> ++    if(transmitter != NULL){
> ++      *transmitter = 0;
> ++    }
> ++
> +     return(0);
> +   }
> + 
> +@@ -988,6 +1102,18 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(channel != NULL){
> ++      *channel = 0;
> ++    }
> ++
> ++    if(program != NULL){
> ++      *program = 0;
> ++    }
> ++
> +     return(0);
> +   }
> + 
> +@@ -1071,6 +1197,18 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(channel != NULL){
> ++      *channel = 0;
> ++    }
> ++
> ++    if(pressure != NULL){
> ++      *pressure = 0;
> ++    }
> ++
> +     return(0);
> +   }
> + 
> +@@ -1157,6 +1295,18 @@
> +   guint i;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(data != NULL){
> ++      *data = NULL;
> ++    }
> ++
> ++    if(length != NULL){
> ++      *length = 0;
> ++    }
> ++
> +     return(0);
> +   }
> +   
> +@@ -1249,6 +1399,18 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(message_type != NULL){
> ++      *message_type = 0;
> ++    }
> ++
> ++    if(values != NULL){
> ++      *values = 0;
> ++    }
> ++
> +     return(0);
> +   }
> +   
> +@@ -1326,6 +1488,14 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(song_position != NULL){
> ++      *song_position = 0;
> ++    }
> ++
> +     return(0);
> +   }
> + 
> +@@ -1400,6 +1570,14 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(song_select != NULL){
> ++      *song_select = 0;
> ++    }
> ++
> +     return(0);
> +   }
> +   
> +@@ -1465,6 +1643,10 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> +     return(0);
> +   }
> +   
> +@@ -1540,6 +1722,14 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(sequence != NULL){
> ++      *sequence = 0;
> ++    }
> ++
> +     return(0);
> +   }
> +   
> +@@ -1640,6 +1830,30 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(rr != NULL){
> ++      *rr = 0;
> ++    }
> ++
> ++    if(hr != NULL){
> ++      *hr = 0;
> ++    }
> ++
> ++    if(mn != NULL){
> ++      *mn = 0;
> ++    }
> ++
> ++    if(se != NULL){
> ++      *se = 0;
> ++    }
> ++
> ++    if(fr != NULL){
> ++      *fr = 0;
> ++    }
> ++
> +     return(0);
> +   }
> +   
> +@@ -1740,6 +1954,14 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(tempo != NULL){
> ++      *tempo = 0;
> ++    }
> ++
> +     return(0);
> +   }
> +   
> +@@ -1833,6 +2055,26 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(nn != NULL){
> ++      *nn = 0;
> ++    }
> ++
> ++    if(dd != NULL){
> ++      *dd = 0;
> ++    }
> ++
> ++    if(cc != NULL){
> ++      *cc = 0;
> ++    }
> ++
> ++    if(bb != NULL){
> ++      *bb = 0;
> ++    }
> ++
> +     return(0);
> +   }
> +   
> +@@ -1932,6 +2174,18 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(sf != NULL){
> ++      *sf = 0;
> ++    }
> ++
> ++    if(mi != NULL){
> ++      *mi = 0;
> ++    }
> ++
> +     return(0);
> +   }
> +   
> +@@ -2033,6 +2287,22 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(len != NULL){
> ++      *len = 0;
> ++    }
> ++
> ++    if(id != NULL){
> ++      *id = 0;
> ++    }
> ++
> ++    if(data != NULL){
> ++      *data = 0;
> ++    }
> ++
> +     return(0);
> +   }
> +   
> +@@ -2134,6 +2404,18 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> ++    if(text != NULL){
> ++      *text = NULL;
> ++    }
> ++
> ++    if(length != NULL){
> ++      *length = 0;
> ++    }
> ++    
> +     return(0);
> +   }
> +   
> +@@ -2214,6 +2496,10 @@
> +   guint delta_time_size;
> +   
> +   if(buffer == NULL){
> ++    if(delta_time != NULL){
> ++      *delta_time = 0;
> ++    }
> ++
> +     return(0);
> +   }
> + 
> +@@ -2250,7 +2536,7 @@
> + 
> +   guchar *offset;
> +   
> +-  glong current_delta_time;
> ++  glong current_delta_time, tmp_delta_time;
> +   glong next_delta_time;
> +   guint delta_time_size;
> +   guchar status, prev_status;
> +@@ -2291,8 +2577,14 @@
> +     }
> + 
> +     /* read delta time */
> ++    tmp_delta_time = 0;
> ++    
> +     delta_time_size = ags_midi_buffer_util_get_varlength(offset,
> +-							 &current_delta_time);
> ++							 &tmp_delta_time);
> ++
> ++    if(delta_time_size > 0){
> ++      current_delta_time = tmp_delta_time;
> ++    }
> +     
> +     /* read status byte */
> +     status = offset[delta_time_size];
> +@@ -2365,6 +2657,8 @@
> +       offset += n;
> + 
> +       /* check if status is omitted */
> ++      next_delta_time = 0;
> ++      
> +       delta_time_size = ags_midi_buffer_util_get_varlength(offset,
> + 							   &next_delta_time);
> +       
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_osc_buffer_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_osc_buffer_util-c.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_osc_buffer_util-c.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_osc_buffer_util-c.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,211 @@
> +Description: fix undefined behavior in ags_osc_buffer_util.c
> + ags_osc_buffer_util.c didn't set output variables if buffer is NULL.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/osc/ags_osc_buffer_util.c
> ++++ b/ags/audio/osc/ags_osc_buffer_util.c
> +@@ -79,6 +79,10 @@
> +   gint32 tmp;
> +   
> +   if(buffer == NULL){
> ++    if(val != NULL){
> ++      val[0] = 0;
> ++    }
> ++    
> +     return;
> +   }
> + 
> +@@ -144,6 +148,18 @@
> +   gint32 tmp;
> +   
> +   if(buffer == NULL){
> ++    if(tv_secs != NULL){
> ++      tv_secs[0] = -1;
> ++    }
> ++
> ++    if(tv_fraction != NULL){
> ++      tv_fraction[0] = -1;
> ++    }
> ++
> ++    if(immediately != NULL){
> ++      immediately[0] = FALSE;
> ++    }
> ++    
> +     return;
> +   }
> + 
> +@@ -223,6 +239,10 @@
> +   }data;
> + 
> +   if(buffer == NULL){
> ++    if(val != NULL){
> ++      val[0] = 0.0;
> ++    }
> ++    
> +     return;
> +   }
> + 
> +@@ -285,6 +305,14 @@
> +   gsize count;
> +   
> +   if(buffer == NULL){
> ++    if(str != NULL){
> ++      str[0] = NULL;
> ++    }
> ++    
> ++    if(length != NULL){
> ++      length[0] = 0;
> ++    }
> ++    
> +     return;
> +   }
> + 
> +@@ -366,6 +394,14 @@
> +   gint32 tmp;
> +   
> +   if(buffer == NULL){
> ++    if(data_size != NULL){
> ++      data_size[0] = 0;
> ++    }
> ++    
> ++    if(data != NULL){
> ++      data[0] = NULL;
> ++    }
> ++    
> +     return;
> +   }
> + 
> +@@ -433,6 +469,10 @@
> +   gint64 tmp;
> +   
> +   if(buffer == NULL){
> ++    if(val != NULL){
> ++      val[0] = 0;
> ++    }
> ++    
> +     return;
> +   }
> + 
> +@@ -503,6 +543,10 @@
> +   }data;
> + 
> +   if(buffer == NULL){
> ++    if(val != NULL){
> ++      val[0] = 0.0;
> ++    }
> ++
> +     return;
> +   }
> + 
> +@@ -559,6 +603,10 @@
> +   gint32 tmp;
> +   
> +   if(buffer == NULL){
> ++    if(val != NULL){
> ++      val[0] = '\0';
> ++    }
> ++    
> +     return;
> +   }
> + 
> +@@ -612,6 +660,22 @@
> + 			     guint8 *r, guint8 *g, guint8 *b, guint8 *a)
> + {  
> +   if(buffer == NULL){
> ++    if(r != NULL){
> ++      r[0] = 0;
> ++    }
> ++    
> ++    if(g != NULL){
> ++      g[0] = 0;
> ++    }
> ++    
> ++    if(b != NULL){
> ++      b[0] = 0;
> ++    }
> ++
> ++    if(a != NULL){
> ++      a[0] = 0;
> ++    }
> ++
> +     return;
> +   }
> +  
> +@@ -675,6 +739,22 @@
> + 			     guint8 *port, guint8 *status_byte, guint8 *data0, guint8 *data1)
> + {
> +   if(buffer == NULL){
> ++    if(port != NULL){
> ++      *port = 0x0;
> ++    }
> ++
> ++    if(status_byte != NULL){
> ++      *status_byte = 0x0;
> ++    }
> ++
> ++    if(data0 != NULL){
> ++      *data0 = 0x0;
> ++    }
> ++
> ++    if(data1 != NULL){
> ++      *data1 = 0x0;
> ++    }
> ++    
> +     return;
> +   }
> +  
> +@@ -754,6 +834,14 @@
> +   gint32 tmp;
> + 
> +   if(buffer == NULL){
> ++    if(packet_size != NULL){
> ++      packet_size[0] = 0;
> ++    }
> ++
> ++    if(packet != NULL){
> ++      packet[0] = NULL;
> ++    }
> ++    
> +     return;
> +   }
> + 
> +@@ -874,6 +962,14 @@
> +   gsize length;
> +   
> +   if(buffer == NULL){
> ++    if(address_pattern != NULL){
> ++      address_pattern[0] = NULL;
> ++    }
> ++
> ++    if(type_tag != NULL){
> ++      type_tag[0] = NULL;
> ++    }
> ++
> +     return;
> +   }
> + 
> +@@ -961,6 +1057,18 @@
> +   gboolean success;
> +   
> +   if(buffer == NULL){
> ++    if(tv_secs != NULL){
> ++      *tv_secs = -1;
> ++    }
> ++
> ++    if(tv_fraction != NULL){
> ++      *tv_fraction = -1;
> ++    }
> ++
> ++    if(immediately != NULL){
> ++      *immediately = FALSE;
> ++    }
> ++
> +     return;
> +   }
> +   
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_sf2_synth_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_sf2_synth_util-c.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_sf2_synth_util-c.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_sf2_synth_util-c.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,137 @@
> +Description: ags_sf2_synth_util.c check if buffer is NULL
> + ags_sf2_synth_util.c didn't check if buffer is NULL or valid AgsIpatchSample
> + instance.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/ags_sf2_synth_util.c
> ++++ b/ags/audio/ags_sf2_synth_util.c
> +@@ -1,5 +1,5 @@
> + /* GSequencer - Advanced GTK Sequencer
> +- * Copyright (C) 2005-2020 Joël Krähemann
> ++ * Copyright (C) 2005-2021 Joël Krähemann
> +  *
> +  * This file is part of GSequencer.
> +  *
> +@@ -265,6 +265,12 @@
> +   gboolean success;
> +   gboolean pong_copy;
> + 
> ++  if(buffer == NULL ||
> ++     ipatch_sample == NULL ||
> ++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
> ++    return;
> ++  }
> ++  
> +   source_frame_count = 0;
> + 
> +   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
> +@@ -534,6 +540,12 @@
> +   gboolean success;
> +   gboolean pong_copy;
> + 
> ++  if(buffer == NULL ||
> ++     ipatch_sample == NULL ||
> ++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
> ++    return;
> ++  }
> ++
> +   source_frame_count = 0;
> + 
> +   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
> +@@ -802,6 +814,12 @@
> +   guint i0, i1, i2;
> +   gboolean success;
> +   gboolean pong_copy;
> ++
> ++  if(buffer == NULL ||
> ++     ipatch_sample == NULL ||
> ++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
> ++    return;
> ++  }
> +   
> +   source_frame_count = 0;
> + 
> +@@ -1071,6 +1089,12 @@
> +   guint i0, i1, i2;
> +   gboolean success;
> +   gboolean pong_copy;
> ++
> ++  if(buffer == NULL ||
> ++     ipatch_sample == NULL ||
> ++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
> ++    return;
> ++  }
> +   
> +   source_frame_count = 0;
> + 
> +@@ -1340,6 +1364,12 @@
> +   guint i0, i1, i2;
> +   gboolean success;
> +   gboolean pong_copy;
> ++
> ++  if(buffer == NULL ||
> ++     ipatch_sample == NULL ||
> ++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
> ++    return;
> ++  }
> +   
> +   source_frame_count = 0;
> + 
> +@@ -1609,6 +1639,12 @@
> +   guint i0, i1, i2;
> +   gboolean success;
> +   gboolean pong_copy;
> ++
> ++  if(buffer == NULL ||
> ++     ipatch_sample == NULL ||
> ++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
> ++    return;
> ++  }
> +   
> +   source_frame_count = 0;
> + 
> +@@ -1878,6 +1914,12 @@
> +   guint i0, i1, i2;
> +   gboolean success;
> +   gboolean pong_copy;
> ++
> ++  if(buffer == NULL ||
> ++     ipatch_sample == NULL ||
> ++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
> ++    return;
> ++  }
> +   
> +   source_frame_count = 0;
> + 
> +@@ -2147,6 +2189,12 @@
> +   guint i0, i1, i2;
> +   gboolean success;
> +   gboolean pong_copy;
> ++
> ++  if(buffer == NULL ||
> ++     ipatch_sample == NULL ||
> ++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
> ++    return;
> ++  }
> +   
> +   source_frame_count = 0;
> + 
> +@@ -2400,6 +2448,12 @@
> + 			guint loop_mode,
> + 			gint loop_start, gint loop_end)
> + {
> ++  if(buffer == NULL ||
> ++     ipatch_sample == NULL ||
> ++     !AGS_IS_IPATCH_SAMPLE(ipatch_sample)){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_sfz_synth_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_sfz_synth_util-c.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_sfz_synth_util-c.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_sfz_synth_util-c.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,136 @@
> +Description: ags_sfz_synth_util.c check if buffer is NULL
> + ags_sfz_synth_util.c didn't check if buffer is NULL.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/ags_sfz_synth_util.c
> ++++ b/ags/audio/ags_sfz_synth_util.c
> +@@ -1,5 +1,5 @@
> + /* GSequencer - Advanced GTK Sequencer
> +- * Copyright (C) 2005-2020 Joël Krähemann
> ++ * Copyright (C) 2005-2021 Joël Krähemann
> +  *
> +  * This file is part of GSequencer.
> +  *
> +@@ -100,6 +100,12 @@
> +   guint i0, i1, i2;
> +   gboolean success;
> +   gboolean pong_copy;
> ++
> ++  if(buffer == NULL ||
> ++     sfz_sample == NULL ||
> ++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
> ++    return;
> ++  }
> +   
> +   source_frame_count = 0;
> + 
> +@@ -367,6 +373,12 @@
> +   gboolean success;
> +   gboolean pong_copy;
> + 
> ++  if(buffer == NULL ||
> ++     sfz_sample == NULL ||
> ++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
> ++    return;
> ++  }
> ++
> +   source_frame_count = 0;
> + 
> +   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
> +@@ -633,6 +645,12 @@
> +   gboolean success;
> +   gboolean pong_copy;
> + 
> ++  if(buffer == NULL ||
> ++     sfz_sample == NULL ||
> ++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
> ++    return;
> ++  }
> ++
> +   source_frame_count = 0;
> + 
> +   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
> +@@ -898,6 +916,12 @@
> +   guint i0, i1, i2;
> +   gboolean success;
> +   gboolean pong_copy;
> ++
> ++  if(buffer == NULL ||
> ++     sfz_sample == NULL ||
> ++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
> ++    return;
> ++  }
> +   
> +   source_frame_count = 0;
> + 
> +@@ -1165,6 +1189,12 @@
> +   gboolean success;
> +   gboolean pong_copy;
> + 
> ++  if(buffer == NULL ||
> ++     sfz_sample == NULL ||
> ++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
> ++    return;
> ++  }
> ++
> +   source_frame_count = 0;
> + 
> +   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
> +@@ -1431,6 +1461,12 @@
> +   gboolean success;
> +   gboolean pong_copy;
> + 
> ++  if(buffer == NULL ||
> ++     sfz_sample == NULL ||
> ++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
> ++    return;
> ++  }
> ++
> +   source_frame_count = 0;
> + 
> +   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
> +@@ -1696,6 +1732,12 @@
> +   guint i0, i1, i2;
> +   gboolean success;
> +   gboolean pong_copy;
> ++
> ++  if(buffer == NULL ||
> ++     sfz_sample == NULL ||
> ++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
> ++    return;
> ++  }
> +     
> +   source_frame_count = 0;
> + 
> +@@ -1963,6 +2005,12 @@
> +   gboolean success;
> +   gboolean pong_copy;
> + 
> ++  if(buffer == NULL ||
> ++     sfz_sample == NULL ||
> ++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
> ++    return;
> ++  }
> ++
> +   source_frame_count = 0;
> + 
> +   source_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE;
> +@@ -2209,6 +2257,12 @@
> + 			guint loop_mode,
> + 			gint loop_start, gint loop_end)
> + {
> ++  if(buffer == NULL ||
> ++     sfz_sample == NULL ||
> ++     !AGS_IS_SFZ_SAMPLE(sfz_sample)){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_soundcard_util-c.diff gsequencer-3.7.44/debian/patches/patch-ags_soundcard_util-c.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_soundcard_util-c.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_soundcard_util-c.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,31 @@
> +Description: ags_soundcard_util.c check if soundcard is NULL
> + ags_soundcard_util.c didn't check soundcard is NULL
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/ags_soundcard_util.c
> ++++ b/ags/audio/ags_soundcard_util.c
> +@@ -1,5 +1,5 @@
> + /* GSequencer - Advanced GTK Sequencer
> +- * Copyright (C) 2005-2020 Joël Krähemann
> ++ * Copyright (C) 2005-2021 Joël Krähemann
> +  *
> +  * This file is part of GSequencer.
> +  *
> +@@ -125,6 +125,11 @@
> + 
> +   GRecMutex *obj_mutex;
> + 
> ++  if(soundcard == NULL ||
> ++     !AGS_IS_SOUNDCARD(soundcard)){
> ++    return;
> ++  }
> ++  
> +   obj_mutex = ags_soundcard_util_get_obj_mutex(soundcard);
> +   
> +   /* get some initial values */
> diff -Nru gsequencer-3.7.44/debian/patches/patch-ags_synth_util-ch.diff gsequencer-3.7.44/debian/patches/patch-ags_synth_util-ch.diff
> --- gsequencer-3.7.44/debian/patches/patch-ags_synth_util-ch.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-ags_synth_util-ch.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,906 @@
> +Description: ags_synth_util.[ch] floating point number type and buffer NULL
> + ags_synth_util.[ch] didn't check if buffer is NULL and fixed floating point
> + number type.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=acec022a94a5949e74a8b763730ce1ba7ec94067
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-06
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/ags/audio/ags_synth_util.c
> ++++ b/ags/audio/ags_synth_util.c
> +@@ -1,5 +1,5 @@
> + /* GSequencer - Advanced GTK Sequencer
> +- * Copyright (C) 2005-2020 Joël Krähemann
> ++ * Copyright (C) 2005-2021 Joël Krähemann
> +  *
> +  * This file is part of GSequencer.
> +  *
> +@@ -53,6 +53,10 @@
> +   guint count;
> +   guint i;
> +   gboolean negative;
> ++
> ++  if(buffer == NULL){
> ++    return(0);
> ++  }
> +   
> +   count = 0;
> + 
> +@@ -97,6 +101,10 @@
> +   guint count;
> +   guint i;
> +   gboolean negative;
> ++
> ++  if(buffer == NULL){
> ++    return(0);
> ++  }
> +   
> +   count = 0;
> + 
> +@@ -141,6 +149,10 @@
> +   guint count;
> +   guint i;
> +   gboolean negative;
> ++
> ++  if(buffer == NULL){
> ++    return(0);
> ++  }
> +   
> +   count = 0;
> + 
> +@@ -185,6 +197,10 @@
> +   guint count;
> +   guint i;
> +   gboolean negative;
> ++
> ++  if(buffer == NULL){
> ++    return(0);
> ++  }
> +   
> +   count = 0;
> + 
> +@@ -229,6 +245,10 @@
> +   guint count;
> +   guint i;
> +   gboolean negative;
> ++
> ++  if(buffer == NULL){
> ++    return(0);
> ++  }
> +   
> +   count = 0;
> + 
> +@@ -267,12 +287,16 @@
> +  * Since: 3.0.0
> +  */
> + guint
> +-ags_synth_util_get_xcross_count_float(float *buffer,
> ++ags_synth_util_get_xcross_count_float(gfloat *buffer,
> + 				      guint buffer_size)
> + {
> +   guint count;
> +   guint i;
> +   gboolean negative;
> ++
> ++  if(buffer == NULL){
> ++    return(0);
> ++  }
> +   
> +   count = 0;
> + 
> +@@ -311,13 +335,17 @@
> +  * Since: 3.0.0
> +  */
> + guint
> +-ags_synth_util_get_xcross_count_double(double *buffer,
> ++ags_synth_util_get_xcross_count_double(gdouble *buffer,
> + 				       guint buffer_size)
> + {
> +   guint count;
> + 
> +   guint i;
> +   gboolean negative;
> ++
> ++  if(buffer == NULL){
> ++    return(0);
> ++  }
> +   
> +   count = 0;
> + 
> +@@ -368,6 +396,10 @@
> +   
> +   guint i;
> +   gboolean negative;
> ++
> ++  if(buffer == NULL){
> ++    return(0);
> ++  }
> +   
> +   count = 0;
> + 
> +@@ -424,6 +456,10 @@
> + {
> +   guint count;
> + 
> ++  if(buffer == NULL){
> ++    return(0);
> ++  }
> ++
> +   count = 0;
> + 
> +   switch(audio_buffer_util_format){
> +@@ -459,13 +495,13 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    count = ags_synth_util_get_xcross_count_float((float *) buffer,
> ++    count = ags_synth_util_get_xcross_count_float((gfloat *) buffer,
> + 						  buffer_size);
> +   }
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    count = ags_synth_util_get_xcross_count_double((double *) buffer,
> ++    count = ags_synth_util_get_xcross_count_double((gdouble *) buffer,
> + 						   buffer_size);
> +   }
> +   break;
> +@@ -507,6 +543,10 @@
> +   static const gdouble scale = 127.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (gint8) (0xff & ((gint16) buffer[i] + (gint16) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume)));
> +   }
> +@@ -535,6 +575,10 @@
> +   static const gdouble scale = 32767.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (gint16) (0xffff & ((gint32) buffer[i] + (gint32) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume)));
> +   }
> +@@ -563,6 +607,10 @@
> +   static const gdouble scale = 8388607.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (gint32) (0xffffffff & ((gint32) buffer[i] + (gint32) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume)));
> +   }
> +@@ -591,6 +639,10 @@
> +   static const gdouble scale = 214748363.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (gint32) (0xffffffff & ((gint64) buffer[i] + (gint64) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume)));
> +   }
> +@@ -619,6 +671,10 @@
> +   static const gdouble scale = 9223372036854775807.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (gint64) (0xffffffffffff & ((gint64) buffer[i] + (gint64) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume)));
> +   }
> +@@ -639,13 +695,17 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_synth_util_sin_float(float *buffer,
> ++ags_synth_util_sin_float(gfloat *buffer,
> + 			 gdouble freq, gdouble phase, gdouble volume,
> + 			 guint samplerate,
> + 			 guint offset, guint n_frames)
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (float) ((gdouble) buffer[i] + (gdouble) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * volume));
> +   }
> +@@ -666,13 +726,17 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_synth_util_sin_double(double *buffer,
> ++ags_synth_util_sin_double(gdouble *buffer,
> + 			  gdouble freq, gdouble phase, gdouble volume,
> + 			  guint samplerate,
> + 			  guint offset, guint n_frames)
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     buffer[i] = (double) ((gdouble) buffer[i] + (gdouble) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * volume));
> +   }
> +@@ -706,6 +770,10 @@
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = buffer;
> +   c_ptr_ptr = &c_ptr;
> +   
> +@@ -741,6 +809,10 @@
> +   static const gdouble scale = 127.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -772,6 +844,10 @@
> +   static const gdouble scale = 32767.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -803,6 +879,10 @@
> +   static const gdouble scale = 8388607.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -834,6 +914,10 @@
> +   static const gdouble scale = 214748363.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -865,6 +949,10 @@
> +   static const gdouble scale = 9223372036854775807.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -888,13 +976,17 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_synth_util_sawtooth_float(float *buffer,
> ++ags_synth_util_sawtooth_float(gfloat *buffer,
> + 			      gdouble freq, gdouble phase, gdouble volume,
> + 			      guint samplerate,
> + 			      guint offset, guint n_frames)
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -918,13 +1010,17 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_synth_util_sawtooth_double(double *buffer,
> ++ags_synth_util_sawtooth_double(gdouble *buffer,
> + 			       gdouble freq, gdouble phase, gdouble volume,
> + 			       guint samplerate,
> + 			       guint offset, guint n_frames)
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -961,6 +1057,10 @@
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -999,6 +1099,10 @@
> +   static const gdouble scale = 127.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1030,6 +1134,10 @@
> +   static const gdouble scale = 32767.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1061,6 +1169,10 @@
> +   static const gdouble scale = 8388607.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1092,6 +1204,10 @@
> +   static const gdouble scale = 214748363.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1123,6 +1239,10 @@
> +   static const gdouble scale = 9223372036854775807.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1146,13 +1266,17 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_synth_util_triangle_float(float *buffer,
> ++ags_synth_util_triangle_float(gfloat *buffer,
> + 			      gdouble freq, gdouble phase, gdouble volume,
> + 			      guint samplerate,
> + 			      guint offset, guint n_frames)
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1176,13 +1300,17 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_synth_util_triangle_double(double *buffer,
> ++ags_synth_util_triangle_double(gdouble *buffer,
> + 			       gdouble freq, gdouble phase, gdouble volume,
> + 			       guint samplerate,
> + 			       guint offset, guint n_frames)
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1219,6 +1347,10 @@
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   phase = (int) ceil(phase) % (int) ceil(freq);
> +   phase = ceil(phase / freq) * ceil(samplerate / freq);
> + 
> +@@ -1257,6 +1389,10 @@
> +   static const gdouble scale = 127.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (gint8) (0xff & ((gint16) buffer[i] + (gint16) (1.0 * scale * volume)));
> +@@ -1289,6 +1425,10 @@
> +   static const gdouble scale = 32767.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (gint16) (0xffff & ((gint32) buffer[i] + (gint32) (1.0 * scale * volume)));
> +@@ -1321,6 +1461,10 @@
> +   static const gdouble scale = 8388607.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (gint32) (0xffffffff & ((gint32) buffer[i] + (gint32) (1.0 * scale * volume)));
> +@@ -1353,6 +1497,10 @@
> +   static const gdouble scale = 214748363.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (gint32) (0xffffffff & ((gint64) buffer[i] + (gint64) (1.0 * scale * volume)));
> +@@ -1385,6 +1533,10 @@
> +   static const gdouble scale = 9223372036854775807.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (gint64) (0xffffffffffffffff & ((gint64) buffer[i] + (gint64) (1.0 * scale * volume)));
> +@@ -1409,13 +1561,17 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_synth_util_square_float(float *buffer,
> ++ags_synth_util_square_float(gfloat *buffer,
> + 			    gdouble freq, gdouble phase, gdouble volume,
> + 			    guint samplerate,
> + 			    guint offset, guint n_frames)
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (buffer[i] + (1.0 * volume));
> +@@ -1440,13 +1596,17 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_synth_util_square_double(double *buffer,
> ++ags_synth_util_square_double(gdouble *buffer,
> + 			     gdouble freq, gdouble phase, gdouble volume,
> + 			     guint samplerate,
> + 			     guint offset, guint n_frames)
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= 0.0){
> +       buffer[i] = (buffer[i] + (1.0 * volume));
> +@@ -1484,6 +1644,10 @@
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = buffer;
> +   c_ptr_ptr = &c_ptr;
> + 
> +@@ -1523,6 +1687,10 @@
> +   static const gdouble scale = 127.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (gint8) (0xff & ((gint16) buffer[i] + (gint16) (1.0 * scale * volume)));
> +@@ -1555,6 +1723,10 @@
> +   static const gdouble scale = 32767.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (gint16) (0xffff & ((gint32) buffer[i] + (gint32) (1.0 * scale * volume)));
> +@@ -1587,6 +1759,10 @@
> +   static const gdouble scale = 8388607.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (gint32) (0xffffffff & ((gint32) buffer[i] + (gint32) (1.0 * scale * volume)));
> +@@ -1619,6 +1795,10 @@
> +   static const gdouble scale = 214748363.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (gint32) (0xffffffff & ((gint64) buffer[i] + (gint64) (1.0 * scale * volume)));
> +@@ -1651,6 +1831,10 @@
> +   static const gdouble scale = 9223372036854775807.0;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (gint64) (0xffffffffffffffff & ((gint64) buffer[i] + (gint64) (1.0 * scale * volume)));
> +@@ -1675,13 +1859,17 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_synth_util_impulse_float(float *buffer,
> ++ags_synth_util_impulse_float(gfloat *buffer,
> + 			     gdouble freq, gdouble phase, gdouble volume,
> + 			     guint samplerate,
> + 			     guint offset, guint n_frames)
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (buffer[i] + (1.0 * volume));
> +@@ -1706,13 +1894,17 @@
> +  * Since: 3.0.0
> +  */
> + void
> +-ags_synth_util_impulse_double(double *buffer,
> ++ags_synth_util_impulse_double(gdouble *buffer,
> + 			      gdouble freq, gdouble phase, gdouble volume,
> + 			      guint samplerate,
> + 			      guint offset, guint n_frames)
> + {
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   for(i = offset; i < offset + n_frames; i++){
> +     if(sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) >= sin(2.0 * M_PI * 3.0 / 5.0)){
> +       buffer[i] = (buffer[i] + (1.0 * volume));
> +@@ -1750,6 +1942,10 @@
> +   guint i_stop;
> +   guint i;
> + 
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   c_ptr = buffer;
> +   c_ptr_ptr = &c_ptr;
> + 
> +@@ -1787,6 +1983,10 @@
> + 		   guint samplerate, guint audio_buffer_util_format,
> + 		   guint offset, guint n_frames)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -1830,7 +2030,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_synth_util_sin_float((float *) buffer,
> ++    ags_synth_util_sin_float((gfloat *) buffer,
> + 			     freq, phase, volume,
> + 			     samplerate,
> + 			     offset, n_frames);
> +@@ -1838,7 +2038,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_synth_util_sin_double((double *) buffer,
> ++    ags_synth_util_sin_double((gdouble *) buffer,
> + 			      freq, phase, volume,
> + 			      samplerate,
> + 			      offset, n_frames);
> +@@ -1880,6 +2080,10 @@
> + 			guint samplerate, guint audio_buffer_util_format,
> + 			guint offset, guint n_frames)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -1923,7 +2127,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_synth_util_sawtooth_float((float *) buffer,
> ++    ags_synth_util_sawtooth_float((gfloat *) buffer,
> + 				  freq, phase, volume,
> + 				  samplerate,
> + 				  offset, n_frames);
> +@@ -1931,7 +2135,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_synth_util_sawtooth_double((double *) buffer,
> ++    ags_synth_util_sawtooth_double((gdouble *) buffer,
> + 				   freq, phase, volume,
> + 				   samplerate,
> + 				   offset, n_frames);
> +@@ -1973,6 +2177,10 @@
> + 			guint samplerate, guint audio_buffer_util_format,
> + 			guint offset, guint n_frames)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -2016,7 +2224,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_synth_util_triangle_float((float *) buffer,
> ++    ags_synth_util_triangle_float((gfloat *) buffer,
> + 				  freq, phase, volume,
> + 				  samplerate,
> + 				  offset, n_frames);
> +@@ -2024,7 +2232,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_synth_util_triangle_double((double *) buffer,
> ++    ags_synth_util_triangle_double((gdouble *) buffer,
> + 				   freq, phase, volume,
> + 				   samplerate,
> + 				   offset, n_frames);
> +@@ -2066,6 +2274,10 @@
> + 		      guint samplerate, guint audio_buffer_util_format,
> + 		      guint offset, guint n_frames)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -2109,7 +2321,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_synth_util_square_float((float *) buffer,
> ++    ags_synth_util_square_float((gfloat *) buffer,
> + 				freq, phase, volume,
> + 				samplerate,
> + 				offset, n_frames);
> +@@ -2117,7 +2329,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_synth_util_square_double((double *) buffer,
> ++    ags_synth_util_square_double((gdouble *) buffer,
> + 				 freq, phase, volume,
> + 				 samplerate,
> + 				 offset, n_frames);
> +@@ -2159,6 +2371,10 @@
> + 		       guint samplerate, guint audio_buffer_util_format,
> + 		       guint offset, guint n_frames)
> + {
> ++  if(buffer == NULL){
> ++    return;
> ++  }
> ++
> +   switch(audio_buffer_util_format){
> +   case AGS_AUDIO_BUFFER_UTIL_S8:
> +   {
> +@@ -2202,7 +2418,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_FLOAT:
> +   {
> +-    ags_synth_util_impulse_float((float *) buffer,
> ++    ags_synth_util_impulse_float((gfloat *) buffer,
> + 				 freq, phase, volume,
> + 				 samplerate,
> + 				 offset, n_frames);
> +@@ -2210,7 +2426,7 @@
> +   break;
> +   case AGS_AUDIO_BUFFER_UTIL_DOUBLE:
> +   {
> +-    ags_synth_util_impulse_double((double *) buffer,
> ++    ags_synth_util_impulse_double((gdouble *) buffer,
> + 				  freq, phase, volume,
> + 				  samplerate,
> + 				  offset, n_frames);
> +--- a/ags/audio/ags_synth_util.h
> ++++ b/ags/audio/ags_synth_util.h
> +@@ -1,5 +1,5 @@
> + /* GSequencer - Advanced GTK Sequencer
> +- * Copyright (C) 2005-2019 Joël Krähemann
> ++ * Copyright (C) 2005-2021 Joël Krähemann
> +  *
> +  * This file is part of GSequencer.
> +  *
> +@@ -38,9 +38,9 @@
> + 					  guint buffer_size);
> + guint ags_synth_util_get_xcross_count_s64(gint64 *buffer,
> + 					  guint buffer_size);
> +-guint ags_synth_util_get_xcross_count_float(float *buffer,
> ++guint ags_synth_util_get_xcross_count_float(gfloat *buffer,
> + 					    guint buffer_size);
> +-guint ags_synth_util_get_xcross_count_double(double *buffer,
> ++guint ags_synth_util_get_xcross_count_double(gdouble *buffer,
> + 					     guint buffer_size);
> + guint ags_synth_util_get_xcross_count_complex(AgsComplex *buffer,
> + 					      guint buffer_size);
> +@@ -70,11 +70,11 @@
> + 			    gdouble freq, gdouble phase, gdouble volume,
> + 			    guint samplerate,
> + 			    guint offset, guint n_frames);
> +-void ags_synth_util_sin_float(float *buffer,
> ++void ags_synth_util_sin_float(gfloat *buffer,
> + 			      gdouble freq, gdouble phase, gdouble volume,
> + 			      guint samplerate,
> + 			      guint offset, guint n_frames);
> +-void ags_synth_util_sin_double(double *buffer,
> ++void ags_synth_util_sin_double(gdouble *buffer,
> + 			       gdouble freq, gdouble phase, gdouble volume,
> + 			       guint samplerate,
> + 			       guint offset, guint n_frames);
> +@@ -104,11 +104,11 @@
> + 				 gdouble freq, gdouble phase, gdouble volume,
> + 				 guint samplerate,
> + 				 guint offset, guint n_frames);
> +-void ags_synth_util_sawtooth_float(float *buffer,
> ++void ags_synth_util_sawtooth_float(gfloat *buffer,
> + 				   gdouble freq, gdouble phase, gdouble volume,
> + 				   guint samplerate,
> + 				   guint offset, guint n_frames);
> +-void ags_synth_util_sawtooth_double(double *buffer,
> ++void ags_synth_util_sawtooth_double(gdouble *buffer,
> + 				    gdouble freq, gdouble phase, gdouble volume,
> + 				    guint samplerate,
> + 				    guint offset, guint n_frames);
> +@@ -138,11 +138,11 @@
> + 				 gdouble freq, gdouble phase, gdouble volume,
> + 				 guint samplerate,
> + 				 guint offset, guint n_frames);
> +-void ags_synth_util_triangle_float(float *buffer,
> ++void ags_synth_util_triangle_float(gfloat *buffer,
> + 				   gdouble freq, gdouble phase, gdouble volume,
> + 				   guint samplerate,
> + 				   guint offset, guint n_frames);
> +-void ags_synth_util_triangle_double(double *buffer,
> ++void ags_synth_util_triangle_double(gdouble *buffer,
> + 				    gdouble freq, gdouble phase, gdouble volume,
> + 				    guint samplerate,
> + 				    guint offset, guint n_frames);
> +@@ -172,11 +172,11 @@
> + 			       gdouble freq, gdouble phase, gdouble volume,
> + 			       guint samplerate,
> + 			       guint offset, guint n_frames);
> +-void ags_synth_util_square_float(float *buffer,
> ++void ags_synth_util_square_float(gfloat *buffer,
> + 				 gdouble freq, gdouble phase, gdouble volume,
> + 				 guint samplerate,
> + 				 guint offset, guint n_frames);
> +-void ags_synth_util_square_double(double *buffer,
> ++void ags_synth_util_square_double(gdouble *buffer,
> + 				  gdouble freq, gdouble phase, gdouble volume,
> + 				  guint samplerate,
> + 				  guint offset, guint n_frames);
> +@@ -206,11 +206,11 @@
> + 				gdouble freq, gdouble phase, gdouble volume,
> + 				guint samplerate,
> + 				guint offset, guint n_frames);
> +-void ags_synth_util_impulse_float(float *buffer,
> ++void ags_synth_util_impulse_float(gfloat *buffer,
> + 				  gdouble freq, gdouble phase, gdouble volume,
> + 				  guint samplerate,
> + 				  guint offset, guint n_frames);
> +-void ags_synth_util_impulse_double(double *buffer,
> ++void ags_synth_util_impulse_double(gdouble *buffer,
> + 				   gdouble freq, gdouble phase, gdouble volume,
> + 				   guint samplerate,
> + 				   guint offset, guint n_frames);
> diff -Nru gsequencer-3.7.44/debian/patches/patch-users-doc-chap2-xml.diff gsequencer-3.7.44/debian/patches/patch-users-doc-chap2-xml.diff
> --- gsequencer-3.7.44/debian/patches/patch-users-doc-chap2-xml.diff	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/patch-users-doc-chap2-xml.diff	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,367 @@
> +Description: complete missing descriptions in user's handbook
> + Some controls were not documented, this patch fixes it.
> +Author: Joël Krähemann <jkraehemann@gmail.com>
> +Origin: upstream
> +Forwarded: not-needed
> +Applied-Upstream: http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=3.7.x&id=c0351c5120647668388092b343cb4b85a09eb9bd
> +Reviewed-by: <name and email of a reviewer, optional>
> +Last-Update: 2021-03-08
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/docs/usersBook/chap2.xml
> ++++ b/docs/usersBook/chap2.xml
> +@@ -38,16 +38,28 @@
> +     </listitem>
> +     <listitem>
> +       <para>
> ++	To remove an engine open context menu and activate &quot;destroy&quot; entry.
> ++      </para>
> ++    </listitem>
> ++    <listitem>
> ++      <para>
> + 	To rename an engine open context menu and activate &quot;rename&quot; entry.
> +       </para>
> +     </listitem>
> +     <listitem>
> +       <para>
> +-	To remove an engine open context menu and activate &quot;destroy&quot; entry.
> ++	To remove an audio object open context menu and activate &quot;rename audio&quot; entry.
> ++	This name can be used by the OSC Server to address the audio object.
> +       </para>
> +     </listitem>
> +     <listitem>
> +       <para>
> ++	To reposition an audio object open context menu and activate &quot;reposition audio&quot; entry.
> ++	This position can be used by the OSC Server to address the audio object.
> ++      </para>
> ++    </listitem>    
> ++    <listitem>
> ++      <para>
> + 	To open properties dialog open context menu and activate &quot;properties&quot;
> + 	entry. There you might link, resize or asign LADSPA effects to channels.
> + 	NOTE for LADSPA sink or generators aren&apos;t supported, yet.
> +@@ -68,9 +80,49 @@
> + 	  Copy pattern does convert your pattern bitmap into a pattern based notation suitable
> + 	  to paste in notation editor.
> + 	</listitem>
> ++      </itemizedlist>	  
> ++      <itemizedlist>
> ++	<listitem>
> ++	  Envelope opens a dialog with envelope editor, info and pattern editor tab. Allowing you to edit
> ++	  envelope presets and apply to selected notes.
> ++	</listitem>
> +       </itemizedlist>
> + 	  
> +     </listitem>
> ++    <listitem>
> ++      <para>
> ++	Connection gives you audio/MIDI options.
> ++      </para>
> ++      
> ++      <itemizedlist>
> ++	<listitem>
> ++	  Audio connection allows you assign output or input soundcards.
> ++	</listitem>
> ++      </itemizedlist>	  
> ++      <itemizedlist>
> ++	<listitem>
> ++	  Midi dialog allows you to assign MIDI sequencers to an instrument.
> ++	</listitem>
> ++      </itemizedlist>
> ++	  
> ++    </listitem>
> ++    <listitem>
> ++      <para>
> ++	Export gives you audio exporting options.
> ++      </para>
> ++      
> ++      <itemizedlist>
> ++	<listitem>
> ++	  Audio export does export your wave data into an audio file without any effect processing.
> ++	</listitem>
> ++      </itemizedlist>	  
> ++	  
> ++    </listitem>    
> ++    <listitem>
> ++      <para>
> ++	To adjust many input controls at once open context menu and activate &quot;sticky controls&quot; entry.
> ++      </para>
> ++    </listitem>
> +   </itemizedlist>
> + 
> +   <sect1>
> +@@ -265,9 +317,15 @@
> +     <title>Envelope dialog</title>
> +     <para>
> +       The envelope dialog allows you to edit envelope information as presets. These presets
> +-      can be assigned to a specific note.
> ++      can be assigned to a specific note. Selection is done with select tool of notation editor and
> ++      selecting notes of active audio channel.
> +     </para>
> + 
> ++    <para>
> ++      The enelope's width matches with x length 1.0 the audio signal's length. The magnitude has normal
> ++      volume with value 1.0.
> ++    </para>
> ++    
> +     <sect2>
> +       <title>Envelope editor</title>
> +       <mediaobject>
> +@@ -282,8 +340,34 @@
> +       </mediaobject>
> +       
> +       <para>
> +-	Modify or create presets and apply it to selected notes.
> +-      </para>    
> ++	Modify or create presets and apply it to selected notes. Selection is performed within notation
> ++	editor.
> ++      </para>
> ++
> ++      <para>
> ++	Add new or remove unwanted presets.
> ++      </para>
> ++
> ++      <para>
> ++	Attack is the initial x length and y magnitude.
> ++      </para>
> ++
> ++      <para>
> ++	Decay is the second x length and y magnitude.
> ++      </para>
> ++
> ++      <para>
> ++	Sustain is the third x length and y magnitude.
> ++      </para>
> ++
> ++      <para>
> ++	Release is the last x length and y magnitude.
> ++      </para>      
> ++
> ++      <para>
> ++	Ratio increase/decrease the entire envelope's magnitude.
> ++      </para>
> ++
> +     </sect2>
> + 
> +     <sect2>
> +@@ -300,8 +384,29 @@
> +       </mediaobject>
> +       
> +       <para>
> +-	Show envelope information of selected notes.
> ++	Show envelope information of selected notes. There are 5 columns with information of the
> ++	specific selection. The selection itself is presented by the list view.
> +       </para>    
> ++
> ++      <para>
> ++	Plot enables plotting of the matching note's envelope information.
> ++      </para>
> ++
> ++      <para>
> ++	Audio channel is the selected note's audio channel.
> ++      </para>
> ++
> ++      <para>
> ++	Note x0 is the selected note's x0 offset.
> ++      </para>
> ++
> ++      <para>
> ++	Note x1 is the selected note's x1 offset.
> ++      </para>
> ++
> ++      <para>
> ++	Note y is the selected note's y key.
> ++      </para>
> +     </sect2>
> + 
> +     <sect2>
> +@@ -318,8 +423,53 @@
> +       </mediaobject>
> +       
> +       <para>
> +-	Modify and create pattern related envelope presets.
> ++	Modify and create pattern related envelope presets. There are 9 columns with information of
> ++	the pattern's region to apply the envelope preset.
> +       </para>    
> ++
> ++      <para>
> ++	Edit means modify the matchin preset.
> ++      </para>      
> ++
> ++      <para>
> ++	Plot enables plotting of the matching envelope preset information.
> ++      </para>
> ++
> ++      <para>
> ++	Preset is the preset's name.
> ++      </para>
> ++
> ++      <para>
> ++	Audio channel start the preset's start audio channel.
> ++      </para>
> ++
> ++      <para>
> ++	Audio channel end the preset's end audio channel.	
> ++      </para>
> ++
> ++      <para>
> ++	Pad start the preset's start pad.
> ++      </para>
> ++
> ++      <para>
> ++	Pad end the preset's end pad.
> ++      </para>
> ++      
> ++      <para>
> ++	X start the preset's x start offset.
> ++      </para>
> ++
> ++      <para>
> ++	X end the preset's x end offset.
> ++      </para>
> ++
> ++      <para>
> ++	There are the usual envelope editor controls.
> ++      </para>
> ++
> ++      <para>
> ++	Organize your presets with move up and move down. Or add new or remove unwanted presets.
> ++      </para>
> +     </sect2>
> + 
> +   </sect1>
> +@@ -338,8 +488,10 @@
> + 	</caption>
> +       </mediaobject>
> +       <para>
> +-	The MIDI dialog allows you to select the MIDI sequencer to assign of the current machine.
> +-	You might want to perform start and end key. Further you can adjust the start and end channel.
> ++	The MIDI dialog allows you to select the MIDI sequencer to assign of the current machine. The MIDI
> ++	channel is the MIDI channel assigned to the MIDI device, useful with multiple devices. Upto 16
> ++	devices are allowed. You might want to perform start and end key. Further you can adjust the start
> ++	and end channel.
> +       </para>    
> +   </sect1>
> +   
> +@@ -717,9 +869,42 @@
> +     </mediaobject>
> +     <para>
> +       Produce audio data using its oscillators. The count of oscillators depends on number of
> +-      input lines. They are adjusted vertically. You have on the right the option to auto-update
> +-      changes you do with the controls or do it manually by the update button.
> ++      input lines. They are adjusted vertically.
> ++    </para>
> ++
> ++    <para>
> ++      Wave is the actual oscillator either sine, sawtooth, square, triangle or impulse.
> ++    </para>
> ++
> ++    <para>
> ++     Attack is the first frame after key on to start output.
> ++    </para>
> ++
> ++    <para>
> ++      Length is the length of the output in frames.
> +     </para>
> ++
> ++    <para>
> ++      Phase is the initial phase as x offset within oscillator's algorithm.
> ++    </para>
> ++
> ++    <para>
> ++      Frequency is the lower range key's frequency.
> ++    </para>
> ++
> ++    <para>
> ++      Volume is the output volume of the oscillator.
> ++    </para>
> ++
> ++    <para>
> ++      Sync allows you reset the phase with 3 times a tuple of x offset and new x offset of phase.
> ++    </para>
> ++    
> ++    <para>
> ++      You have on the right the option to auto-update changes you do with the controls or do it
> ++      manually by the update button. Lower is the very first y key.
> ++    </para>
> ++    
> +   </sect1>
> + 
> +   <sect1>
> +@@ -739,6 +924,27 @@
> +       input lines. They are adjusted vertically. You have on the right the option to auto-update
> +       changes you do with the controls or do it manually by the update button.
> +     </para>
> ++
> ++    <para>
> ++      FM Synth has additional controls than Synth for its oscillators to control. The controls
> ++      are related to the Low Frequency Oscillator that does the actual Frequency Modulation.
> ++    </para>
> ++
> ++    <para>
> ++      LFO wave use specific function to modulate frequency.
> ++    </para>
> ++
> ++    <para>
> ++      LFO frequency use specific frequency to modulate frequency.
> ++    </para>
> ++
> ++    <para>
> ++      LFO depth is the depth of the frequency modulation.
> ++    </para>
> ++
> ++    <para>
> ++      LFO tuning tunes by cents.
> ++    </para>
> +   </sect1>
> + 
> +   <sect1>
> +@@ -759,6 +965,10 @@
> +       update button. Loop start and loop end allows you to specify what region of the audio data shall be looped
> +       in order to get the desired note length.
> +     </para>
> ++
> ++    <para>
> ++      The Syncsynth has the very same oscillators as Synth.
> ++    </para>
> +   </sect1>
> + 
> +   <sect1>
> +@@ -779,6 +989,10 @@
> +       update button. Loop start and loop end allows you to specify what region of the audio data shall be looped
> +       in order to get the desired note length.
> +     </para>
> ++
> ++    <para>
> ++      The FM Syncsynth has the very same oscillators as FM Synth.
> ++    </para>
> +   </sect1>
> + 
> +   <sect1>
> +@@ -798,6 +1012,11 @@
> +       controls, preset and instrument to navigate within container format and a open button to
> +       read Soundfont2 files and assign the selected instrument to the input.
> +     </para>
> ++
> ++    <para>
> ++      Synth generator can be enabled to pitch missing keys from lower upto specific key count.
> ++    </para>
> ++    
> +     <para>
> +       The ffplayer contains recently the bridge widget. You can add plugins in bulk mode by
> +       click Add or Remove within AgsFFPlayer&apos;s bridge, what you can collapse/expand. To add an effect
> +@@ -821,8 +1040,13 @@
> +       Produce audio data by opening SFZ audio file container format. There is a open button to read SFZ
> +       files and assign it to the input.
> +     </para>
> ++
> ++    <para>
> ++      Synth generator can be enabled to pitch missing keys from lower upto specific key count.
> ++    </para>
> ++
> +     <para>
> +-      There is a LFO enable control allowing you make adjustments to LFO amplification:
> ++      There is a LFO enable control allowing you make adjustments to LFO amplification (currently defunctional):
> +     </para>
> + 
> +     <itemizedlist mark="bullet">
> diff -Nru gsequencer-3.7.44/debian/patches/series gsequencer-3.7.44/debian/patches/series
> --- gsequencer-3.7.44/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
> +++ gsequencer-3.7.44/debian/patches/series	2021-03-08 18:44:04.000000000 +0100
> @@ -0,0 +1,15 @@
> +patch-ags_midi_buffer_util-c.diff
> +patch-ags_audio_buffer_util-c.diff
> +patch-ags_buffer_util-c.diff
> +patch-ags_char_buffer_util-ch.diff
> +patch-ags_fast_pitch_util-c.diff
> +patch-ags_filter_util-c.diff
> +patch-ags_fm_synth_util-ch.diff
> +patch-ags_fourier_transform_util-h.diff
> +patch-ags_lfo_synth_util-ch.diff
> +patch-ags_osc_buffer_util-c.diff
> +patch-ags_sf2_synth_util-c.diff
> +patch-ags_sfz_synth_util-c.diff
> +patch-ags_soundcard_util-c.diff
> +patch-ags_synth_util-ch.diff
> +patch-users-doc-chap2-xml.diff

--- End Message ---

Reply to: