fluidsynth/fluidsynth-last_client-reuse-fix.patch
2018-10-04 08:58:46 +00:00

32 lines
1.5 KiB
Diff

From 99e235e27979e6c132870dc48f45cd9b3fa8dcdf Mon Sep 17 00:00:00 2001
From: rncbc <rncbc@rncbc.org>
Date: Thu, 20 Sep 2018 09:04:21 +0100
Subject: [PATCH] jack_driver: last_client reuse fix.
---
src/drivers/fluid_jack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/drivers/fluid_jack.c b/src/drivers/fluid_jack.c
index dd40092d..14c5e0c8 100644
--- a/src/drivers/fluid_jack.c
+++ b/src/drivers/fluid_jack.c
@@ -137,7 +137,7 @@ new_fluid_jack_client(fluid_settings_t *settings, int isaudio, void *driver)
* then re-use the client. */
if(last_client &&
(last_client->server != NULL && server != NULL && FLUID_STRCMP(last_client->server, server) == 0) &&
- ((!isaudio && last_client->midi_driver != NULL) || (isaudio && last_client->audio_driver != NULL)))
+ ((!isaudio && last_client->midi_driver == NULL) || (isaudio && last_client->audio_driver == NULL)))
{
client_ref = last_client;
last_client = NULL; /* No more pairing for this client */
@@ -670,7 +670,7 @@ fluid_jack_driver_process(jack_nframes_t nframes, void *arg)
}
else
{
- fluid_audio_func_t callback = (audio_driver->callback != NULL) ? audio_driver->callback : fluid_synth_process;
+ fluid_audio_func_t callback = (audio_driver->callback != NULL) ? audio_driver->callback : (fluid_audio_func_t) fluid_synth_process;
for(i = 0; i < audio_driver->num_output_ports; i++)
{