mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-28 06:52:57 +00:00
Merge branch '2.0.x'
This commit is contained in:
commit
8b1820580b
10 changed files with 31 additions and 23 deletions
|
@ -29,7 +29,7 @@ set ( PACKAGE "fluidsynth" )
|
||||||
# FluidSynth package version
|
# FluidSynth package version
|
||||||
set ( FLUIDSYNTH_VERSION_MAJOR 2 )
|
set ( FLUIDSYNTH_VERSION_MAJOR 2 )
|
||||||
set ( FLUIDSYNTH_VERSION_MINOR 0 )
|
set ( FLUIDSYNTH_VERSION_MINOR 0 )
|
||||||
set ( FLUIDSYNTH_VERSION_MICRO 2 )
|
set ( FLUIDSYNTH_VERSION_MICRO 3 )
|
||||||
set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" )
|
set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" )
|
||||||
set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )
|
set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )
|
||||||
|
|
||||||
|
@ -43,8 +43,8 @@ set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )
|
||||||
# if any interfaces have been removed/changed (compatibility broken): AGE=0
|
# if any interfaces have been removed/changed (compatibility broken): AGE=0
|
||||||
# This is not exactly the same algorithm as the libtool one, but the results are the same.
|
# This is not exactly the same algorithm as the libtool one, but the results are the same.
|
||||||
set ( LIB_VERSION_CURRENT 2 )
|
set ( LIB_VERSION_CURRENT 2 )
|
||||||
set ( LIB_VERSION_AGE 0 )
|
set ( LIB_VERSION_AGE 1 )
|
||||||
set ( LIB_VERSION_REVISION 2 )
|
set ( LIB_VERSION_REVISION 0 )
|
||||||
set ( LIB_VERSION_INFO
|
set ( LIB_VERSION_INFO
|
||||||
"${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" )
|
"${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" )
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
DOXYFILE_ENCODING = UTF-8
|
DOXYFILE_ENCODING = UTF-8
|
||||||
PROJECT_NAME = libfluidsynth
|
PROJECT_NAME = libfluidsynth
|
||||||
PROJECT_NUMBER = 2.0.2
|
PROJECT_NUMBER = 2.0.3
|
||||||
OUTPUT_DIRECTORY = api
|
OUTPUT_DIRECTORY = api
|
||||||
CREATE_SUBDIRS = NO
|
CREATE_SUBDIRS = NO
|
||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
\author Josh Green
|
\author Josh Green
|
||||||
\author David Henningsson
|
\author David Henningsson
|
||||||
\author Tom Moebert
|
\author Tom Moebert
|
||||||
\author Copyright © 2003-2018 Peter Hanappe, Conrad Berhörster, Antoine Schmitt, Pedro López-Cabanillas, Josh Green, David Henningsson, Tom Moebert
|
\author Copyright © 2003-2019 Peter Hanappe, Conrad Berhörster, Antoine Schmitt, Pedro López-Cabanillas, Josh Green, David Henningsson, Tom Moebert
|
||||||
\version Revision 2.0.2
|
\version Revision 2.0.3
|
||||||
\date 2018-11-18
|
\date 2019-01-01
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
@ -64,6 +64,7 @@ What is FluidSynth?
|
||||||
|
|
||||||
\section NewIn2_0_3 Whats new in 2.0.3?
|
\section NewIn2_0_3 Whats new in 2.0.3?
|
||||||
|
|
||||||
|
- fix incorrect behaviour of fluid_sample_set_sound_data()
|
||||||
- add missing getters for midi events:
|
- add missing getters for midi events:
|
||||||
- fluid_midi_event_get_text()
|
- fluid_midi_event_get_text()
|
||||||
- fluid_midi_event_get_lyrics()
|
- fluid_midi_event_get_lyrics()
|
||||||
|
|
|
@ -184,12 +184,10 @@ typedef void (*fluid_sfont_iteration_start_t)(fluid_sfont_t *sfont);
|
||||||
/**
|
/**
|
||||||
* Virtual SoundFont preset iteration function.
|
* Virtual SoundFont preset iteration function.
|
||||||
* @param sfont Virtual SoundFont
|
* @param sfont Virtual SoundFont
|
||||||
* @param preset Caller supplied uninitialized buffer to fill in with current preset information
|
|
||||||
* @return NULL when no more presets are available, otherwise the a pointer to the current preset
|
* @return NULL when no more presets are available, otherwise the a pointer to the current preset
|
||||||
*
|
*
|
||||||
* Should store preset information to the caller supplied \a preset structure
|
* Returns preset information to the caller. The returned buffer is only valid until a subsequent
|
||||||
* and advance the internal iteration state to the next preset for subsequent
|
* call to this function.
|
||||||
* calls.
|
|
||||||
*/
|
*/
|
||||||
typedef fluid_preset_t *(*fluid_sfont_iteration_next_t)(fluid_sfont_t *sfont);
|
typedef fluid_preset_t *(*fluid_sfont_iteration_next_t)(fluid_sfont_t *sfont);
|
||||||
|
|
||||||
|
|
|
@ -1034,7 +1034,7 @@ void
|
||||||
print_welcome()
|
print_welcome()
|
||||||
{
|
{
|
||||||
printf("FluidSynth runtime version %s\n"
|
printf("FluidSynth runtime version %s\n"
|
||||||
"Copyright (C) 2000-2018 Peter Hanappe and others.\n"
|
"Copyright (C) 2000-2019 Peter Hanappe and others.\n"
|
||||||
"Distributed under the LGPL license.\n"
|
"Distributed under the LGPL license.\n"
|
||||||
"SoundFont(R) is a registered trademark of E-mu Systems, Inc.\n\n",
|
"SoundFont(R) is a registered trademark of E-mu Systems, Inc.\n\n",
|
||||||
fluid_version_str());
|
fluid_version_str());
|
||||||
|
|
|
@ -94,13 +94,13 @@ int fluid_is_midifile(const char *filename)
|
||||||
{
|
{
|
||||||
FILE *fp = FLUID_FOPEN(filename, "rb");
|
FILE *fp = FLUID_FOPEN(filename, "rb");
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
int retcode = 0;
|
int retcode = FALSE;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if(fp == NULL)
|
if(fp == NULL)
|
||||||
{
|
{
|
||||||
break;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(FLUID_FREAD(&id, sizeof(id), 1, fp) != 1)
|
if(FLUID_FREAD(&id, sizeof(id), 1, fp) != 1)
|
||||||
|
|
|
@ -336,13 +336,13 @@ int fluid_is_soundfont(const char *filename)
|
||||||
{
|
{
|
||||||
FILE *fp = FLUID_FOPEN(filename, "rb");
|
FILE *fp = FLUID_FOPEN(filename, "rb");
|
||||||
uint32_t fcc;
|
uint32_t fcc;
|
||||||
int retcode = 0;
|
int retcode = FALSE;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if(fp == NULL)
|
if(fp == NULL)
|
||||||
{
|
{
|
||||||
break;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(FLUID_FREAD(&fcc, sizeof(fcc), 1, fp) != 1)
|
if(FLUID_FREAD(&fcc, sizeof(fcc), 1, fp) != 1)
|
||||||
|
|
|
@ -512,9 +512,13 @@ delete_fluid_sample(fluid_sample_t *sample)
|
||||||
/**
|
/**
|
||||||
* Returns the size of the fluid_sample_t structure.
|
* Returns the size of the fluid_sample_t structure.
|
||||||
*
|
*
|
||||||
* Useful in low latency scenarios e.g. to allocate a sample on the stack.
|
* Useful in low latency scenarios e.g. to allocate a pool of samples.
|
||||||
*
|
*
|
||||||
* @return Size of fluid_sample_t in bytes
|
* @return Size of fluid_sample_t in bytes
|
||||||
|
*
|
||||||
|
* @note It is recommend to zero initialize the memory before using the object.
|
||||||
|
*
|
||||||
|
* @warning Do NOT allocate samples on the stack and assign them to a voice!
|
||||||
*/
|
*/
|
||||||
size_t fluid_sample_sizeof()
|
size_t fluid_sample_sizeof()
|
||||||
{
|
{
|
||||||
|
@ -563,16 +567,17 @@ fluid_sample_set_sound_data(fluid_sample_t *sample,
|
||||||
|
|
||||||
fluid_return_val_if_fail(sample != NULL, FLUID_FAILED);
|
fluid_return_val_if_fail(sample != NULL, FLUID_FAILED);
|
||||||
fluid_return_val_if_fail(data != NULL, FLUID_FAILED);
|
fluid_return_val_if_fail(data != NULL, FLUID_FAILED);
|
||||||
fluid_return_val_if_fail(nbframes == 0, FLUID_FAILED);
|
fluid_return_val_if_fail(nbframes != 0, FLUID_FAILED);
|
||||||
|
|
||||||
/* in case we already have some data */
|
/* in case we already have some data */
|
||||||
if((sample->data != NULL || sample->data24 != NULL) && sample->auto_free)
|
if((sample->data != NULL || sample->data24 != NULL) && sample->auto_free)
|
||||||
{
|
{
|
||||||
FLUID_FREE(sample->data);
|
FLUID_FREE(sample->data);
|
||||||
FLUID_FREE(sample->data24);
|
FLUID_FREE(sample->data24);
|
||||||
sample->data = NULL;
|
|
||||||
sample->data24 = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sample->data = NULL;
|
||||||
|
sample->data24 = NULL;
|
||||||
|
|
||||||
if(copy_data)
|
if(copy_data)
|
||||||
{
|
{
|
||||||
|
@ -635,6 +640,8 @@ error_rec:
|
||||||
FLUID_LOG(FLUID_ERR, "Out of memory");
|
FLUID_LOG(FLUID_ERR, "Out of memory");
|
||||||
FLUID_FREE(sample->data);
|
FLUID_FREE(sample->data);
|
||||||
FLUID_FREE(sample->data24);
|
FLUID_FREE(sample->data24);
|
||||||
|
sample->data = NULL;
|
||||||
|
sample->data24 = NULL;
|
||||||
return FLUID_FAILED;
|
return FLUID_FAILED;
|
||||||
|
|
||||||
#undef SAMPLE_LOOP_MARGIN
|
#undef SAMPLE_LOOP_MARGIN
|
||||||
|
|
|
@ -183,8 +183,6 @@ struct _fluid_sample_t
|
||||||
* @return Should return #FLUID_OK
|
* @return Should return #FLUID_OK
|
||||||
*/
|
*/
|
||||||
int (*notify)(fluid_sample_t *sample, int reason);
|
int (*notify)(fluid_sample_t *sample, int reason);
|
||||||
|
|
||||||
void *userdata; /**< User defined data */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1214,7 +1214,11 @@ fluid_istream_readline(fluid_istream_t in, fluid_ostream_t out, char *prompt,
|
||||||
|
|
||||||
FLUID_SNPRINTF(buf, len, "%s", line);
|
FLUID_SNPRINTF(buf, len, "%s", line);
|
||||||
buf[len - 1] = 0;
|
buf[len - 1] = 0;
|
||||||
add_history(buf);
|
|
||||||
|
if(buf[0] != '\0')
|
||||||
|
{
|
||||||
|
add_history(buf);
|
||||||
|
}
|
||||||
|
|
||||||
free(line);
|
free(line);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue