Merge branch '2.1.x' into master

This commit is contained in:
derselbst 2020-07-09 19:38:40 +02:00
commit 62b715483f
5 changed files with 15 additions and 14 deletions

View file

@ -25,7 +25,7 @@ addons:
env:
- CMAKE_FLAGS="-Denable-profiling=1"
- CMAKE_FLAGS="-Denable-floats=1 -Denable-profiling=1"
- CMAKE_FLAGS="-Denable-floats=0"
- CMAKE_FLAGS="-Denable-floats=1"
- CMAKE_FLAGS="-Denable-trap-on-fpe=1"
- CMAKE_FLAGS="-Denable-fpe-check=1"
- CMAKE_FLAGS="-Denable-ipv6=0"

View file

@ -196,7 +196,7 @@ if ( CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_C
endif ( NOT APPLE AND NOT OS2 )
# define some warning flags
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement -Werror=implicit-function-declaration" )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement -Werror=implicit-function-declaration -Werror=incompatible-pointer-types" )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -W -Wpointer-arith -Wcast-qual -Wno-unused-parameter" )
# prepend to build type specific flags, to allow users to override

View file

@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = libfluidsynth
PROJECT_NUMBER = 2.1.3
PROJECT_NUMBER = 2.1.4
OUTPUT_DIRECTORY = api
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English

View file

@ -83,7 +83,7 @@ struct _fluid_jack_midi_driver_t
jack_port_t **midi_port; // array of midi port handles
fluid_midi_parser_t *parser;
int autoconnect_inputs;
int autoconnect_is_outdated;
fluid_atomic_int_t autoconnect_is_outdated;
};
static fluid_jack_client_t *new_fluid_jack_client(fluid_settings_t *settings,
@ -136,7 +136,7 @@ fluid_jack_midi_autoconnect(jack_client_t *client, fluid_jack_midi_driver_t *mid
jack_free(midi_source_ports);
}
midi_driver->autoconnect_is_outdated = FALSE;
fluid_atomic_int_set(&midi_driver->autoconnect_is_outdated, FALSE);
}
/*
@ -188,7 +188,8 @@ new_fluid_jack_client(fluid_settings_t *settings, int isaudio, void *driver)
else
{
// do not free client_ref and do not goto error_recovery
// client_ref is being used by another audio or midi driver. Freeing it here will create a double free.
// client_ref is being used by another audio or midi driver. Freeing it here will lead to a double free.
client_ref = NULL;
}
fluid_mutex_unlock(last_client_mutex); /* -- unlock last_client */
@ -357,7 +358,7 @@ fluid_jack_client_register_ports(void *driver, int isaudio, jack_client_t *clien
if(dev->midi_port[i] == NULL)
{
FLUID_LOG(FLUID_ERR, "Failed to create Jack MIDI port");
FLUID_LOG(FLUID_ERR, "Failed to create Jack MIDI port '%s'", name);
FLUID_FREE(dev->midi_port);
dev->midi_port = NULL;
return FLUID_FAILED;
@ -397,7 +398,8 @@ fluid_jack_client_register_ports(void *driver, int isaudio, jack_client_t *clien
if(dev->output_ports[0] == NULL || dev->output_ports[1] == NULL)
{
FLUID_LOG(FLUID_ERR, "Failed to create Jack audio port");
FLUID_LOG(FLUID_ERR, "Failed to create Jack audio port '%s'",
(dev->output_ports[0] == NULL ? (dev->output_ports[1] == NULL ? "left & right" : "left") : "right"));
goto error_recovery;
}
}
@ -706,7 +708,7 @@ fluid_jack_driver_process(jack_nframes_t nframes, void *arg)
if(midi_driver)
{
if(midi_driver->autoconnect_is_outdated)
if(fluid_atomic_int_get(&midi_driver->autoconnect_is_outdated))
{
fluid_jack_midi_autoconnect(client->client, midi_driver);
}
@ -818,7 +820,7 @@ fluid_jack_port_registration(jack_port_id_t port, int is_registering, void *arg)
if(client_ref->midi_driver != NULL)
{
client_ref->midi_driver->autoconnect_is_outdated = client_ref->midi_driver->autoconnect_inputs && is_registering != 0;
fluid_atomic_int_set(&client_ref->midi_driver->autoconnect_is_outdated, client_ref->midi_driver->autoconnect_inputs && is_registering != 0);
}
}
@ -863,13 +865,12 @@ new_fluid_jack_midi_driver(fluid_settings_t *settings,
}
fluid_settings_getint(settings, "midi.autoconnect", &dev->autoconnect_inputs);
dev->autoconnect_is_outdated = dev->autoconnect_inputs;
fluid_atomic_int_set(&dev->autoconnect_is_outdated, dev->autoconnect_inputs);
dev->client_ref = new_fluid_jack_client(settings, FALSE, dev);
if(!dev->client_ref)
{
FLUID_LOG(FLUID_PANIC, "Out of memory");
goto error_recovery;
}

View file

@ -609,7 +609,7 @@ new_fluid_synth(fluid_settings_t *settings)
char *important_channels;
int i, nbuf, prio_level = 0;
int with_ladspa = 0;
fluid_real_t sample_rate_min, sample_rate_max;
double sample_rate_min, sample_rate_max;
/* initialize all the conversion tables and other stuff */
if(fluid_atomic_int_compare_and_exchange(&fluid_synth_initialized, 0, 1))
@ -789,7 +789,7 @@ new_fluid_synth(fluid_settings_t *settings)
/* In an overflow situation, a new voice takes about 50 spaces in the queue! */
synth->eventhandler = new_fluid_rvoice_eventhandler(synth->polyphony * 64,
synth->polyphony, nbuf, synth->effects_channels, synth->effects_groups,
sample_rate_max, synth->sample_rate,
(fluid_real_t)sample_rate_max, synth->sample_rate,
synth->cores - 1, prio_level);
if(synth->eventhandler == NULL)