tags 946863 +patch
thanks

I just whipped up a patch that makes this build, I have not tested it beyond 
that.

I have no immediate plans to NMU, but I may do so later, especially if I get 
feedback from users that the package works.

diff -Nru freewheeling-0.6.4/debian/changelog 
freewheeling-0.6.4/debian/changelog
--- freewheeling-0.6.4/debian/changelog 2018-09-10 13:45:23.000000000 +0000
+++ freewheeling-0.6.4/debian/changelog 2019-12-19 02:43:24.000000000 +0000
@@ -1,3 +1,12 @@
+freewheeling (0.6.4-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix build with fluidsynth 2.x
+  * Bump fluidsynth build-dep because patch will break build
+    with older fluidsynth.
+
+ -- Peter Michael Green <plugw...@debian.org>  Thu, 19 Dec 2019 02:43:24 +0000
+
 freewheeling (0.6.4-1) unstable; urgency=medium
 
   * New upstream version 0.6.4 (closes: #906462)
diff -Nru freewheeling-0.6.4/debian/patches/072-fluidsynth-2.diff 
freewheeling-0.6.4/debian/patches/072-fluidsynth-2.diff
--- freewheeling-0.6.4/debian/patches/072-fluidsynth-2.diff     1970-01-01 
00:00:00.000000000 +0000
+++ freewheeling-0.6.4/debian/patches/072-fluidsynth-2.diff     2019-12-19 
02:43:24.000000000 +0000
@@ -0,0 +1,70 @@
+Description:  Fix build with fluidsynth 2.x
+Author: Peter Michael Green <plugw...@debian.org>
+
+--- freewheeling-0.6.4.orig/src/fweelin_browser.h
++++ freewheeling-0.6.4/src/fweelin_browser.h
+@@ -52,7 +52,7 @@ enum BrowserItemType {
+ class BrowserItem {
+  public:
+   // Initialize a browser item with name n
+-  BrowserItem(char *n = 0, char default_name = 1) : 
++  BrowserItem(const char *n = 0, char default_name = 1) : 
+     default_name(default_name), next(0), prev(0) {
+     if (n == 0)
+       name = 0;
+@@ -415,7 +415,7 @@ class PatchItem : public BrowserItem {
+ public:
+ 
+   PatchItem (int id = 0, int bank = 0, int prog = 0, int channel = 0,
+-             char *name = 0, char bypasscc = 0, int bypasschannel = -1, float 
bypasstime1 = 0.0, float bypasstime2 = 10.0) :
++             const char *name = 0, char bypasscc = 0, int bypasschannel = -1, 
float bypasstime1 = 0.0, float bypasstime2 = 10.0) :
+     BrowserItem(name), id(id), bank(bank), prog(prog), channel(channel),
+     bypasscc(bypasscc), bypasschannel(bypasschannel), 
bypasstime1(bypasstime1), bypasstime2(bypasstime2), 
+     zones(0), numzones(0) {};
+--- freewheeling-0.6.4.orig/src/fweelin_fluidsynth.cc
++++ freewheeling-0.6.4/src/fweelin_fluidsynth.cc
+@@ -33,11 +33,13 @@
+ 
+ #include "fweelin_fluidsynth.h"
+ 
+-#define fluid_sfont_iteration_start(_sf) (*(_sf)->iteration_start)(_sf)
+-#define fluid_sfont_iteration_next(_sf,_pr) (*(_sf)->iteration_next)(_sf,_pr)
+-#define fluid_preset_get_name(_preset) (*(_preset)->get_name)(_preset)
+-#define fluid_preset_get_banknum(_preset) (*(_preset)->get_banknum)(_preset)
+-#define fluid_preset_get_num(_preset) (*(_preset)->get_num)(_preset)
++//fluidsynth 2.x provides it's own version of these (with slightly different 
parameter structure)
++//and does not allow direct access to structure fields anymore.
++//#define fluid_sfont_iteration_start(_sf) (*(_sf)->iteration_start)(_sf)
++//#define fluid_sfont_iteration_next(_sf,_pr) 
(*(_sf)->iteration_next)(_sf,_pr)
++//#define fluid_preset_get_name(_preset) (*(_preset)->get_name)(_preset)
++//#define fluid_preset_get_banknum(_preset) (*(_preset)->get_banknum)(_preset)
++//#define fluid_preset_get_num(_preset) (*(_preset)->get_num)(_preset)
+ 
+ void FluidSynthParam_Int::Send(fluid_settings_t *settings) {
+   printf("FLUID: Setting parameter '%s' = '%d'\n",name,val);
+@@ -160,7 +162,7 @@ void FluidSynthProcessor::SendPatchChang
+ 
+ // Sets up our internal patch list based on loaded soundfonts
+ void FluidSynthProcessor::SetupPatches() {
+-  fluid_preset_t preset;
++  fluid_preset_t * preset;
+ 
+   PatchBrowser *br = (PatchBrowser *) app->getBROWSER(B_Patch);
+ 
+@@ -174,12 +176,12 @@ void FluidSynthProcessor::SetupPatches()
+     for (int i = 0; i < sfcnt; i++) {
+       fluid_sfont_t *curfont = fluid_synth_get_sfont(synth,i);
+       fluid_sfont_iteration_start(curfont);
+-      while (fluid_sfont_iteration_next(curfont, &preset))
++      while ((preset = fluid_sfont_iteration_next(curfont)))
+         br->AddItem(new PatchItem(fluid_sfont_get_id(curfont),
+-                                  fluid_preset_get_banknum(&preset),
+-                                  fluid_preset_get_num(&preset),
++                                  fluid_preset_get_banknum(preset),
++                                  fluid_preset_get_num(preset),
+                                   fluidchan,
+-                                  fluid_preset_get_name(&preset)));
++                                  fluid_preset_get_name(preset)));
+ 
+       if (i+1 < sfcnt) {
+         // End of soundfont- put in a divider
diff -Nru freewheeling-0.6.4/debian/patches/series 
freewheeling-0.6.4/debian/patches/series
--- freewheeling-0.6.4/debian/patches/series    2018-09-10 13:44:42.000000000 
+0000
+++ freewheeling-0.6.4/debian/patches/series    2019-12-19 02:43:24.000000000 
+0000
@@ -8,3 +8,4 @@
 060_jackstart.diff
 070_occurred.diff
 071_threshold.diff
+072-fluidsynth-2.diff

Reply via email to