Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/minuet/files/, kde-apps/minuet/
Date: Tue, 21 Jan 2020 16:43:09
Message-Id: 1579624613.1fa35b19dfd58e4d86d2da17aa582b3f1dc76929.asturm@gentoo
1 commit: 1fa35b19dfd58e4d86d2da17aa582b3f1dc76929
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 21 15:48:04 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 21 16:36:53 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=1fa35b19
7
8 kde-apps/minuet: Backport fix for fluidsynth-2 API support
9
10 See also: https://phabricator.kde.org/D26558
11 Package-Manager: Portage-2.3.84, Repoman-2.3.20
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 .../minuet/files/minuet-19.08.3-fluidsynth-2.patch | 94 ++++++++++++++++++++++
15 kde-apps/minuet/minuet-19.12.49.9999.ebuild | 2 +
16 2 files changed, 96 insertions(+)
17
18 diff --git a/kde-apps/minuet/files/minuet-19.08.3-fluidsynth-2.patch b/kde-apps/minuet/files/minuet-19.08.3-fluidsynth-2.patch
19 new file mode 100644
20 index 0000000000..9bb3c5bad1
21 --- /dev/null
22 +++ b/kde-apps/minuet/files/minuet-19.08.3-fluidsynth-2.patch
23 @@ -0,0 +1,94 @@
24 +From d707ab85c60d68e0310559df4608d86680cc811a Mon Sep 17 00:00:00 2001
25 +From: Tom Moebert <tom.mbrt@××××××××××.com>
26 +Date: Sat, 18 Jan 2020 00:26:30 +0100
27 +Subject: Port to fluidsynth 2.0.0 API
28 +
29 +Summary:
30 +This includes necessary adaptations for fluidsynth 2.0. All changes are backward-compatible to fluidsynth 1.1. For details, see:
31 +
32 +http://www.fluidsynth.org/api/index.html#NewIn2_0_0
33 +
34 +Reviewers: #minuet
35 +
36 +Subscribers: asturmlechner, aacid, kde-edu
37 +
38 +Tags: #minuet, #kde_edu
39 +
40 +Differential Revision: https://phabricator.kde.org/D26558
41 +---
42 + .../fluidsynthsoundcontroller.cpp | 22 ++++++++++++++++++----
43 + .../fluidsynthsoundcontroller.h | 1 +
44 + 2 files changed, 19 insertions(+), 4 deletions(-)
45 +
46 +diff --git a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp
47 +index 67e6826..7252914 100644
48 +--- a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp
49 ++++ b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp
50 +@@ -34,13 +34,14 @@ FluidSynthSoundController::FluidSynthSoundController(QObject *parent)
51 + : Minuet::ISoundController(parent),
52 + m_audioDriver(0),
53 + m_sequencer(0),
54 +- m_song(0)
55 ++ m_song(0),
56 ++ m_unregisteringEvent(0)
57 + {
58 + m_tempo = 60;
59 +
60 + m_settings = new_fluid_settings();
61 +- fluid_settings_setstr(m_settings, "synth.reverb.active", "no");
62 +- fluid_settings_setstr(m_settings, "synth.chorus.active", "no");
63 ++ fluid_settings_setint(m_settings, "synth.reverb.active", 0);
64 ++ fluid_settings_setint(m_settings, "synth.chorus.active", 0);
65 +
66 + m_synth = new_fluid_synth(m_settings);
67 +
68 +@@ -55,6 +56,9 @@ FluidSynthSoundController::FluidSynthSoundController(QObject *parent)
69 + if (fluid_res == FLUID_FAILED)
70 + qCritical() << "Error when loading soundfont!";
71 +
72 ++ m_unregisteringEvent = new_fluid_event();
73 ++ fluid_event_set_source(m_unregisteringEvent, -1);
74 ++
75 + resetEngine();
76 + }
77 +
78 +@@ -63,6 +67,7 @@ FluidSynthSoundController::~FluidSynthSoundController()
79 + deleteEngine();
80 + if (m_synth) delete_fluid_synth(m_synth);
81 + if (m_settings) delete_fluid_settings(m_settings);
82 ++ if (m_unregisteringEvent) delete_fluid_event(m_unregisteringEvent);
83 + }
84 +
85 + void FluidSynthSoundController::setPitch(qint8 pitch)
86 +@@ -240,7 +245,16 @@ void FluidSynthSoundController::resetEngine()
87 +
88 + void FluidSynthSoundController::deleteEngine()
89 + {
90 +- if (m_sequencer) delete_fluid_sequencer(m_sequencer);
91 ++ if (m_sequencer) {
92 ++#if FLUIDSYNTH_VERSION_MAJOR >= 2
93 ++ // explicit client unregistering required
94 ++ fluid_sequencer_unregister_client(m_sequencer, m_callbackSeqID);
95 ++ fluid_event_set_dest(m_unregisteringEvent, m_synthSeqID);
96 ++ fluid_event_unregistering(m_unregisteringEvent);
97 ++ fluid_sequencer_send_now(m_sequencer, m_unregisteringEvent);
98 ++#endif
99 ++ delete_fluid_sequencer(m_sequencer);
100 ++ }
101 + if (m_audioDriver) delete_fluid_audio_driver(m_audioDriver);
102 + }
103 +
104 +diff --git a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h
105 +index afad46b..ed111c2 100644
106 +--- a/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h
107 ++++ b/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.h
108 +@@ -63,6 +63,7 @@ private:
109 + fluid_audio_driver_t *m_audioDriver;
110 + fluid_sequencer_t *m_sequencer;
111 + fluid_synth_t *m_synth;
112 ++ fluid_event_t *m_unregisteringEvent;
113 +
114 + short m_synthSeqID;
115 + short m_callbackSeqID;
116 +--
117 +cgit v1.1
118
119 diff --git a/kde-apps/minuet/minuet-19.12.49.9999.ebuild b/kde-apps/minuet/minuet-19.12.49.9999.ebuild
120 index d5a2f3b229..60632d896a 100644
121 --- a/kde-apps/minuet/minuet-19.12.49.9999.ebuild
122 +++ b/kde-apps/minuet/minuet-19.12.49.9999.ebuild
123 @@ -30,3 +30,5 @@ DEPEND="
124 media-sound/fluidsynth:=
125 "
126 RDEPEND="${DEPEND}"
127 +
128 +PATCHES=( "${FILESDIR}/${PN}-19.08.3-fluidsynth-2.patch" )