Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b16f5e30c2 | ||
|
|
1ef7e7efdf |
3 changed files with 318 additions and 1 deletions
292
lmms-1.1.3-fluidsynth1and2.patch
Normal file
292
lmms-1.1.3-fluidsynth1and2.patch
Normal file
|
|
@ -0,0 +1,292 @@
|
|||
diff -rupN lmms-1.1.3.org/plugins/sf2_player/fluidsynthshims.h lmms-1.1.3/plugins/sf2_player/fluidsynthshims.h
|
||||
--- lmms-1.1.3.org/plugins/sf2_player/fluidsynthshims.h 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ lmms-1.1.3/plugins/sf2_player/fluidsynthshims.h 2020-02-17 11:16:49.674333549 -0500
|
||||
@@ -0,0 +1,88 @@
|
||||
+/*
|
||||
+ * fluidsynthshims.h - a shim header for FluidSynth 2.0 API changes
|
||||
+ *
|
||||
+ * Copyright (c) 2018 Hyunjin Song <tteu.ingog@gmail.com>
|
||||
+ *
|
||||
+ * This file is part of LMMS - https://lmms.io
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public
|
||||
+ * License along with this program (see COPYING); if not, write to the
|
||||
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
+ * Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+
|
||||
+#ifndef FLUIDSYNTHSHIMS_H
|
||||
+#define FLUIDSYNTHSHIMS_H
|
||||
+
|
||||
+#include <fluidsynth.h>
|
||||
+
|
||||
+#if FLUIDSYNTH_VERSION_MAJOR < 2
|
||||
+
|
||||
+inline const char* fluid_preset_get_name(fluid_preset_t* preset)
|
||||
+{
|
||||
+ return preset->get_name(preset);
|
||||
+}
|
||||
+
|
||||
+inline int fluid_preset_get_banknum(fluid_preset_t* preset)
|
||||
+{
|
||||
+ return preset->get_banknum(preset);
|
||||
+}
|
||||
+
|
||||
+inline int fluid_preset_get_num(fluid_preset_t* preset)
|
||||
+{
|
||||
+ return preset->get_num(preset);
|
||||
+}
|
||||
+
|
||||
+inline fluid_sfont_t* fluid_preset_get_sfont(fluid_preset_t* preset)
|
||||
+{
|
||||
+ return preset->sfont;
|
||||
+}
|
||||
+
|
||||
+inline char* fluid_sfont_get_name(fluid_sfont_t* sfont)
|
||||
+{
|
||||
+ return sfont->get_name(sfont);
|
||||
+}
|
||||
+
|
||||
+inline void fluid_sfont_iteration_start(fluid_sfont_t* sfont)
|
||||
+{
|
||||
+ sfont->iteration_start(sfont);
|
||||
+}
|
||||
+
|
||||
+// Due to the API change, we can't simply shim the 'fluid_sfont_iteration_next' function
|
||||
+inline fluid_preset_t* fluid_sfont_iteration_next_wrapper(fluid_sfont_t* sfont, fluid_preset_t* preset)
|
||||
+{
|
||||
+ return sfont->iteration_next(sfont, preset) ? preset : nullptr;
|
||||
+}
|
||||
+
|
||||
+#else // FLUIDSYNTH_VERSION_MAJOR < 2
|
||||
+
|
||||
+#define FLUID_REVERB_DEFAULT_ROOMSIZE 0.2f
|
||||
+#define FLUID_REVERB_DEFAULT_DAMP 0.0f
|
||||
+#define FLUID_REVERB_DEFAULT_WIDTH 0.5f
|
||||
+#define FLUID_REVERB_DEFAULT_LEVEL 0.9f
|
||||
+
|
||||
+#define FLUID_CHORUS_DEFAULT_N 3
|
||||
+#define FLUID_CHORUS_DEFAULT_LEVEL 2.0f
|
||||
+#define FLUID_CHORUS_DEFAULT_SPEED 0.3f
|
||||
+#define FLUID_CHORUS_DEFAULT_DEPTH 8.0f
|
||||
+
|
||||
+inline fluid_preset_t* fluid_sfont_iteration_next_wrapper(fluid_sfont_t* sfont, fluid_preset_t*)
|
||||
+{
|
||||
+ return fluid_sfont_iteration_next(sfont);
|
||||
+}
|
||||
+
|
||||
+#endif // FLUIDSYNTH_VERSION_MAJOR < 2
|
||||
+
|
||||
+#endif // FLUIDSYNTHSHIMS_H
|
||||
diff -rupN lmms-1.1.3.org/plugins/sf2_player/patches_dialog.cpp lmms-1.1.3/plugins/sf2_player/patches_dialog.cpp
|
||||
--- lmms-1.1.3.org/plugins/sf2_player/patches_dialog.cpp 2015-03-07 21:47:14.000000000 -0500
|
||||
+++ lmms-1.1.3/plugins/sf2_player/patches_dialog.cpp 2020-02-17 11:16:49.674333549 -0500
|
||||
@@ -139,7 +139,6 @@ void patchesDialog::setup ( fluid_synth_
|
||||
m_iChan = iChan;
|
||||
|
||||
|
||||
- fluid_preset_t preset;
|
||||
QTreeWidgetItem *pBankItem = NULL;
|
||||
// For all soundfonts (in reversed stack order) fill the available banks...
|
||||
int cSoundFonts = ::fluid_synth_sfcount(m_pSynth);
|
||||
@@ -147,11 +146,17 @@ void patchesDialog::setup ( fluid_synth_
|
||||
fluid_sfont_t *pSoundFont = ::fluid_synth_get_sfont(m_pSynth, i);
|
||||
if (pSoundFont) {
|
||||
#ifdef CONFIG_FLUID_BANK_OFFSET
|
||||
- int iBankOffset = ::fluid_synth_get_bank_offset(m_pSynth, pSoundFont->id);
|
||||
+ int iBankOffset = ::fluid_synth_get_bank_offset(m_pSynth, fluid_sfont_get_id(pSoundFont));
|
||||
#endif
|
||||
- pSoundFont->iteration_start(pSoundFont);
|
||||
- while (pSoundFont->iteration_next(pSoundFont, &preset)) {
|
||||
- int iBank = preset.get_banknum(&preset);
|
||||
+ fluid_sfont_iteration_start(pSoundFont);
|
||||
+#if FLUIDSYNTH_VERSION_MAJOR < 2
|
||||
+ fluid_preset_t preset;
|
||||
+ fluid_preset_t *pCurPreset = &preset;
|
||||
+#else
|
||||
+ fluid_preset_t *pCurPreset;
|
||||
+#endif
|
||||
+ while ((pCurPreset = fluid_sfont_iteration_next_wrapper(pSoundFont, pCurPreset))) {
|
||||
+ int iBank = fluid_preset_get_banknum(pCurPreset);
|
||||
#ifdef CONFIG_FLUID_BANK_OFFSET
|
||||
iBank += iBankOffset;
|
||||
#endif
|
||||
@@ -169,9 +174,9 @@ void patchesDialog::setup ( fluid_synth_
|
||||
m_iBank = 0;
|
||||
fluid_preset_t *pPreset = ::fluid_synth_get_channel_preset(m_pSynth, m_iChan);
|
||||
if (pPreset) {
|
||||
- m_iBank = pPreset->get_banknum(pPreset);
|
||||
+ m_iBank = fluid_preset_get_banknum(pPreset);
|
||||
#ifdef CONFIG_FLUID_BANK_OFFSET
|
||||
- m_iBank += ::fluid_synth_get_bank_offset(m_pSynth, (pPreset->sfont)->id);
|
||||
+ m_iBank += ::fluid_synth_get_bank_offset(m_pSynth, fluid_sfont_get_id(fluid_preset_get_sfont(sfont)));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -182,7 +187,7 @@ void patchesDialog::setup ( fluid_synth_
|
||||
|
||||
// Set the selected program.
|
||||
if (pPreset)
|
||||
- m_iProg = pPreset->get_num(pPreset);
|
||||
+ m_iProg = fluid_preset_get_num(pPreset);
|
||||
QTreeWidgetItem *pProgItem = findProgItem(m_iProg);
|
||||
m_progListView->setCurrentItem(pProgItem);
|
||||
m_progListView->scrollToItem(pProgItem);
|
||||
@@ -308,7 +313,6 @@ void patchesDialog::bankChanged (void)
|
||||
// Clear up the program listview.
|
||||
m_progListView->setSortingEnabled(false);
|
||||
m_progListView->clear();
|
||||
- fluid_preset_t preset;
|
||||
QTreeWidgetItem *pProgItem = NULL;
|
||||
// For all soundfonts (in reversed stack order) fill the available programs...
|
||||
int cSoundFonts = ::fluid_synth_sfcount(m_pSynth);
|
||||
@@ -316,23 +320,29 @@ void patchesDialog::bankChanged (void)
|
||||
fluid_sfont_t *pSoundFont = ::fluid_synth_get_sfont(m_pSynth, i);
|
||||
if (pSoundFont) {
|
||||
#ifdef CONFIG_FLUID_BANK_OFFSET
|
||||
- int iBankOffset = ::fluid_synth_get_bank_offset(m_pSynth, pSoundFont->id);
|
||||
+ int iBankOffset = ::fluid_synth_get_bank_offset(m_pSynth, fluid_sfont_get_id(pSoundFont));
|
||||
+#endif
|
||||
+ fluid_sfont_iteration_start(pSoundFont);
|
||||
+#if FLUIDSYNTH_VERSION_MAJOR < 2
|
||||
+ fluid_preset_t preset;
|
||||
+ fluid_preset_t *pCurPreset = &preset;
|
||||
+#else
|
||||
+ fluid_preset_t *pCurPreset;
|
||||
#endif
|
||||
- pSoundFont->iteration_start(pSoundFont);
|
||||
- while (pSoundFont->iteration_next(pSoundFont, &preset)) {
|
||||
- int iBank = preset.get_banknum(&preset);
|
||||
+ while ((pCurPreset = fluid_sfont_iteration_next_wrapper(pSoundFont, pCurPreset))) {
|
||||
+ int iBank = fluid_preset_get_banknum(pCurPreset);
|
||||
#ifdef CONFIG_FLUID_BANK_OFFSET
|
||||
iBank += iBankOffset;
|
||||
#endif
|
||||
- int iProg = preset.get_num(&preset);
|
||||
+ int iProg = fluid_preset_get_num(pCurPreset);
|
||||
if (iBank == iBankSelected && !findProgItem(iProg)) {
|
||||
pProgItem = new patchItem(m_progListView, pProgItem);
|
||||
if (pProgItem) {
|
||||
pProgItem->setText(0, QString::number(iProg));
|
||||
- pProgItem->setText(1, preset.get_name(&preset));
|
||||
- //pProgItem->setText(2, QString::number(pSoundFont->id));
|
||||
+ pProgItem->setText(1, fluid_preset_get_name(pCurPreset));
|
||||
+ //pProgItem->setText(2, QString::number(fluid_sfont_get_id(pSoundFont)));
|
||||
//pProgItem->setText(3, QFileInfo(
|
||||
- // pSoundFont->get_name(pSoundFont)).baseName());
|
||||
+ // fluid_sfont_get_name(pSoundFont).baseName());
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -rupN lmms-1.1.3.org/plugins/sf2_player/patches_dialog.h lmms-1.1.3/plugins/sf2_player/patches_dialog.h
|
||||
--- lmms-1.1.3.org/plugins/sf2_player/patches_dialog.h 2015-03-07 21:47:14.000000000 -0500
|
||||
+++ lmms-1.1.3/plugins/sf2_player/patches_dialog.h 2020-02-17 11:18:47.042168274 -0500
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "ui_patches_dialog.h"
|
||||
#include "LcdSpinBox.h"
|
||||
|
||||
-#include <fluidsynth.h>
|
||||
+#include "fluidsynthshims.h"
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QLabel>
|
||||
|
||||
diff -rupN lmms-1.1.3.org/plugins/sf2_player/sf2_player.cpp lmms-1.1.3/plugins/sf2_player/sf2_player.cpp
|
||||
--- lmms-1.1.3.org/plugins/sf2_player/sf2_player.cpp 2015-03-07 21:47:14.000000000 -0500
|
||||
+++ lmms-1.1.3/plugins/sf2_player/sf2_player.cpp 2020-02-17 11:28:54.242010202 -0500
|
||||
@@ -115,6 +115,30 @@ sf2Instrument::sf2Instrument( Instrument
|
||||
// everytime we load a new soundfont.
|
||||
m_synth = new_fluid_synth( m_settings );
|
||||
|
||||
+#if FLUIDSYNTH_VERSION_MAJOR >= 2
|
||||
+ // Get the default values from the setting
|
||||
+
|
||||
+ double settingVal;
|
||||
+
|
||||
+ fluid_settings_getnum_default(m_settings, "synth.reverb.room-size", &settingVal);
|
||||
+ m_reverbRoomSize.setInitValue(settingVal);
|
||||
+ fluid_settings_getnum_default(m_settings, "synth.reverb.damping", &settingVal);
|
||||
+ m_reverbDamping.setInitValue(settingVal);
|
||||
+ fluid_settings_getnum_default(m_settings, "synth.reverb.width", &settingVal);
|
||||
+ m_reverbWidth.setInitValue(settingVal);
|
||||
+ fluid_settings_getnum_default(m_settings, "synth.reverb.level", &settingVal);
|
||||
+ m_reverbLevel.setInitValue(settingVal);
|
||||
+
|
||||
+ fluid_settings_getnum_default(m_settings, "synth.chorus.nr", &settingVal);
|
||||
+ m_chorusNum.setInitValue(settingVal);
|
||||
+ fluid_settings_getnum_default(m_settings, "synth.chorus.level", &settingVal);
|
||||
+ m_chorusLevel.setInitValue(settingVal);
|
||||
+ fluid_settings_getnum_default(m_settings, "synth.chorus.speed", &settingVal);
|
||||
+ m_chorusSpeed.setInitValue(settingVal);
|
||||
+ fluid_settings_getnum_default(m_settings, "synth.chorus.depth", &settingVal);
|
||||
+ m_chorusDepth.setInitValue(settingVal);
|
||||
+#endif
|
||||
+
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
|
||||
@@ -378,7 +402,6 @@ QString sf2Instrument::getCurrentPatchNa
|
||||
int iBankSelected = m_bankNum.value();
|
||||
int iProgSelected = m_patchNum.value();
|
||||
|
||||
- fluid_preset_t preset;
|
||||
// For all soundfonts (in reversed stack order) fill the available programs...
|
||||
int cSoundFonts = ::fluid_synth_sfcount( m_synth );
|
||||
for( int i = 0; i < cSoundFonts; i++ )
|
||||
@@ -389,21 +412,26 @@ QString sf2Instrument::getCurrentPatchNa
|
||||
#ifdef CONFIG_FLUID_BANK_OFFSET
|
||||
int iBankOffset =
|
||||
fluid_synth_get_bank_offset(
|
||||
- m_synth, pSoundFont->id );
|
||||
+ m_synth, fluid_sfont_get_id(pSoundFont) );
|
||||
+#endif
|
||||
+ fluid_sfont_iteration_start( pSoundFont );
|
||||
+#if FLUIDSYNTH_VERSION_MAJOR < 2
|
||||
+ fluid_preset_t preset;
|
||||
+ fluid_preset_t *pCurPreset = &preset;
|
||||
+#else
|
||||
+ fluid_preset_t *pCurPreset;
|
||||
#endif
|
||||
- pSoundFont->iteration_start( pSoundFont );
|
||||
- while( pSoundFont->iteration_next( pSoundFont,
|
||||
- &preset ) )
|
||||
+ while ((pCurPreset = fluid_sfont_iteration_next_wrapper(pSoundFont, pCurPreset)))
|
||||
{
|
||||
- int iBank = preset.get_banknum( &preset );
|
||||
+ int iBank = fluid_preset_get_banknum( pCurPreset );
|
||||
#ifdef CONFIG_FLUID_BANK_OFFSET
|
||||
iBank += iBankOffset;
|
||||
#endif
|
||||
- int iProg = preset.get_num( &preset );
|
||||
+ int iProg = fluid_preset_get_num( pCurPreset );
|
||||
if( iBank == iBankSelected && iProg ==
|
||||
iProgSelected )
|
||||
{
|
||||
- return preset.get_name( &preset );
|
||||
+ return fluid_preset_get_name( pCurPreset );
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -rupN lmms-1.1.3.org/plugins/sf2_player/sf2_player.h lmms-1.1.3/plugins/sf2_player/sf2_player.h
|
||||
--- lmms-1.1.3.org/plugins/sf2_player/sf2_player.h 2015-03-07 21:47:14.000000000 -0500
|
||||
+++ lmms-1.1.3/plugins/sf2_player/sf2_player.h 2020-02-17 11:29:39.218922132 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "knob.h"
|
||||
#include "LcdSpinBox.h"
|
||||
#include "led_checkbox.h"
|
||||
-#include "fluidsynth.h"
|
||||
+#include "fluidsynthshims.h"
|
||||
#include "SampleBuffer.h"
|
||||
|
||||
class sf2InstrumentView;
|
||||
12
lmms-1.1.3-wine.patch
Normal file
12
lmms-1.1.3-wine.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up lmms-1.1.3/cmake/modules/FindWine.cmake.orig lmms-1.1.3/cmake/modules/FindWine.cmake
|
||||
--- lmms-1.1.3/cmake/modules/FindWine.cmake.orig 2015-03-08 03:47:14.000000000 +0100
|
||||
+++ lmms-1.1.3/cmake/modules/FindWine.cmake 2021-05-18 14:55:27.257497240 +0200
|
||||
@@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine)
|
||||
-FIND_LIBRARY(WINE_LIBRARY NAMES wine PATH_SUFFIXES wine)
|
||||
+FIND_LIBRARY(WINE_LIBRARY NAMES wine libwine.so.1 PATH_SUFFIXES wine)
|
||||
FIND_PROGRAM(WINE_CXX NAMES wineg++)
|
||||
|
||||
set(WINE_INCLUDE_DIRS ${WINE_INCLUDE_DIR} )
|
||||
15
lmms.spec
15
lmms.spec
|
|
@ -1,6 +1,6 @@
|
|||
Name: lmms
|
||||
Version: 1.1.3
|
||||
Release: 15%{?dist}
|
||||
Release: 17%{?dist}
|
||||
Summary: Linux MultiMedia Studio
|
||||
URL: https://lmms.io/
|
||||
|
||||
|
|
@ -55,6 +55,13 @@ Patch4: lmms-1.1.3-gcc8.patch
|
|||
# bz #1388466)
|
||||
Patch5: lmms-1.1.3-vst.patch
|
||||
|
||||
# backported upstream commit 1f7cd3ed to build against fluidsynth 1
|
||||
# and 2 (thanks to Christoph Karl <pampelmuse@gmx.at>)
|
||||
Patch6: lmms-1.1.3-fluidsynth1and2.patch
|
||||
|
||||
# Work around the fact that wine-devel does not provide libwine.so
|
||||
Patch7: lmms-1.1.3-wine.patch
|
||||
|
||||
# according to upstream we should at least support oss, alsa, and
|
||||
# jack. output via pulseaudio has high latency, but we enable it
|
||||
# nevertheless as it is standard on fedora now. portaudio support is
|
||||
|
|
@ -212,6 +219,12 @@ This package contains the necessary files to host VST plugins.
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue May 18 2021 Thomas Moschny <thomas.moschny@gmx.de> - 1.1.3-17
|
||||
- Add patches to fix building on F32.
|
||||
|
||||
* Fri May 07 2021 Carl George <carl@george.computer> - 1.1.3-16
|
||||
- Rebuilt for fluidsynth soname bump rhbz#1953438
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue