mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-27 06:22:06 +00:00
Merge branch '2.1.x' into master
This commit is contained in:
commit
23b270c08b
6 changed files with 30 additions and 16 deletions
|
@ -29,7 +29,7 @@ set ( PACKAGE "fluidsynth" )
|
|||
# FluidSynth package version
|
||||
set ( FLUIDSYNTH_VERSION_MAJOR 2 )
|
||||
set ( FLUIDSYNTH_VERSION_MINOR 1 )
|
||||
set ( FLUIDSYNTH_VERSION_MICRO 4 )
|
||||
set ( FLUIDSYNTH_VERSION_MICRO 5 )
|
||||
set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" )
|
||||
set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#---------------------------------------------------------------------------
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = libfluidsynth
|
||||
PROJECT_NUMBER = 2.1.4
|
||||
PROJECT_NUMBER = 2.1.5
|
||||
OUTPUT_DIRECTORY = api
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
\author David Henningsson
|
||||
\author Tom Moebert
|
||||
\author Copyright © 2003-2020 Peter Hanappe, Conrad Berhörster, Antoine Schmitt, Pedro López-Cabanillas, Josh Green, David Henningsson, Tom Moebert
|
||||
\version Revision 2.1.4
|
||||
\date 2020-07-05
|
||||
\version Revision 2.1.5
|
||||
\date 2020-09-06
|
||||
|
||||
All the source code examples in this document are in the public domain; you can use them as you please. This document is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ . The FluidSynth library is distributed under the GNU Lesser General Public License. A copy of the GNU Lesser General Public License is contained in the FluidSynth package; if not, visit http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
|
|
|
@ -44,6 +44,15 @@ enum
|
|||
MAX_INST_VOICES = 128,
|
||||
};
|
||||
|
||||
int fluid_instpatch_supports_multi_init(void)
|
||||
{
|
||||
guint major, minor, patch;
|
||||
ipatch_version(&major, &minor, &patch);
|
||||
|
||||
/* libinstpatch <= 1.1.4 only supports calling ipatch_init() once */
|
||||
return FLUID_VERSION_CHECK(major, minor, patch) > FLUID_VERSION_CHECK(1, 1, 4);
|
||||
}
|
||||
|
||||
void fluid_instpatch_init(void)
|
||||
{
|
||||
ipatch_init();
|
||||
|
|
|
@ -9,4 +9,6 @@ void fluid_instpatch_init(void);
|
|||
void fluid_instpatch_deinit(void);
|
||||
fluid_sfloader_t *new_fluid_instpatch_loader(fluid_settings_t *settings);
|
||||
|
||||
int fluid_instpatch_supports_multi_init(void);
|
||||
|
||||
#endif // _FLUID_INSTPATCH_H
|
||||
|
|
|
@ -464,11 +464,12 @@ fluid_synth_init(void)
|
|||
/* Amount: 96 dB of attenuation (on the opposite channel) */
|
||||
fluid_mod_set_amount(&custom_balance_mod, FLUID_PEAK_ATTENUATION); /* Amount: 960 */
|
||||
|
||||
/* libinstpatch <= 1.1.4 only supports calling init() once */
|
||||
#if defined(LIBINSTPATCH_SUPPORT) && \
|
||||
FLUID_VERSION_CHECK(IPATCH_VERSION_MAJOR,IPATCH_VERSION_MINOR,IPATCH_VERSION_PATCH) <= FLUID_VERSION_CHECK(1,1,4)
|
||||
#if defined(LIBINSTPATCH_SUPPORT)
|
||||
/* defer libinstpatch init to fluid_instpatch.c to avoid #include "libinstpatch.h" */
|
||||
fluid_instpatch_init();
|
||||
if(!fluid_instpatch_supports_multi_init())
|
||||
{
|
||||
fluid_instpatch_init();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -628,10 +629,11 @@ new_fluid_synth(fluid_settings_t *settings)
|
|||
|
||||
FLUID_MEMSET(synth, 0, sizeof(fluid_synth_t));
|
||||
|
||||
#if defined(LIBINSTPATCH_SUPPORT) && \
|
||||
FLUID_VERSION_CHECK(IPATCH_VERSION_MAJOR,IPATCH_VERSION_MINOR,IPATCH_VERSION_PATCH) > FLUID_VERSION_CHECK(1,1,4)
|
||||
/* defer libinstpatch init to fluid_instpatch.c to avoid #include "libinstpatch.h" */
|
||||
fluid_instpatch_init();
|
||||
#if defined(LIBINSTPATCH_SUPPORT)
|
||||
if(fluid_instpatch_supports_multi_init())
|
||||
{
|
||||
fluid_instpatch_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
fluid_rec_mutex_init(synth->mutex);
|
||||
|
@ -1137,10 +1139,11 @@ delete_fluid_synth(fluid_synth_t *synth)
|
|||
|
||||
FLUID_FREE(synth);
|
||||
|
||||
#if defined(LIBINSTPATCH_SUPPORT) && \
|
||||
FLUID_VERSION_CHECK(IPATCH_VERSION_MAJOR,IPATCH_VERSION_MINOR,IPATCH_VERSION_PATCH) > FLUID_VERSION_CHECK(1,1,4)
|
||||
/* defer libinstpatch deinit to fluid_instpatch.c to avoid #include "libinstpatch.h" */
|
||||
fluid_instpatch_deinit();
|
||||
#if defined(LIBINSTPATCH_SUPPORT)
|
||||
if(fluid_instpatch_supports_multi_init())
|
||||
{
|
||||
fluid_instpatch_deinit();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue