Commit graph

48 commits

Author SHA1 Message Date
Tom M
c594bdf466 Merge branch 'master' into fluidsynth-on-mcu-1 2017-10-21 17:38:54 +02:00
Tom M
0600ba7c68 Merge pull request #235 from mawe42/ladspa-cleanup
LADSPA effect unit refactor
2017-10-21 17:36:04 +02:00
Marcus Weseloh
9f4c60c6c8 Remove unused includes 2017-10-21 17:18:05 +02:00
Marcus Weseloh
885178ef9d Replace timeout in deactivate with mutex and cond. 2017-10-21 16:32:04 +02:00
Marcus Weseloh
5f488123d8 Also make node names case-insensitive and update comments to reflect this. 2017-10-21 15:58:22 +02:00
Marcus Weseloh
cecf115a38 Replace the fuzzy prefix matching by a simple strncasecmp.
That spaces and underscores are treated as equal is no needed anymore
anyway, as the token parser of the shell understands quoted names.
So searching for "Dry / Wet Mix" is possible.

Adds new FLUID_STRNCASECMP macro to fluid_priv.
2017-10-21 15:55:43 +02:00
Marcus Weseloh
2c7e1696fd Completely decouple LADSPA engine from FluidSynth
Knowledge of FluidSynth is completely removed from the LADSPA effects
unit. All synchronization happens inside LADSPA with atomic operations.
The LADSPA fx instance created by FluidSynth is only special in that
FluidSynth knows about it and calls it's run method when enabled.

This simplifies the code structure, makes the FluidSynth and the LADSPA
engine easier to maintain due to the loose coupling. It also enables
users to create their own (or additional) LADSPA fx unit for further
processing as soon as we expose the LADSPA functions via a public API.
2017-10-21 15:07:39 +02:00
Marcus Weseloh
812ea57ed0 Bugfix: properly release the LADSPA API lock after exiting fluid_ladspa_check 2017-10-21 15:03:38 +02:00
derselbst
36f7cc1b21 avoid garbage value for client->handler 2017-10-21 13:04:09 +02:00
carlo-bramini
87bff4d3ef Optimized arrays to be fully const and FLUID_N_ELEMENTS() support. 2017-10-21 12:43:59 +02:00
carlo-bramini
152fb395f5 Optimized fluid_commands[] 2017-10-21 12:38:44 +02:00
Marcus Weseloh
128a669ef8 Remove volatile from plugin->active 2017-10-20 16:20:50 +02:00
Marcus Weseloh
ce79b5f952 Handle sample rate changes and change sample rate to unsigned long (as defined in ladspa.h) 2017-10-20 15:51:20 +02:00
Marcus Weseloh
4a047726e2 Use memset instead of explicit initialization for port states. 2017-10-20 15:48:34 +02:00
Marcus Weseloh
f4c5590edf Initialize fluid_ladspa_* structs to zero after creation and use delete_fluid_ladspa_* for cleanup. 2017-10-20 13:53:22 +02:00
Marcus Weseloh
244e0c1122 Use FLUID_SNPRINTF instead of FLUID_SPRINTF 2017-10-20 12:08:42 +02:00
Marcus Weseloh
d07e8e3114 Add missing mutex cleanup in error handler 2017-10-20 12:03:21 +02:00
Marcus Weseloh
9a8483d997 Copy buffers with memcpy if FluidSynth and LADSPA use float buffer type 2017-10-20 10:50:01 +02:00
Marcus Weseloh
e4f0f2b41f Remove unused pthread include 2017-10-20 10:37:30 +02:00
Marcus Weseloh
4120b2320f Major refactor and rewrite of the LADSPA effects engine. 2017-10-19 23:31:05 +02:00
derselbst
e866bc98e0 fix return val of fluid_file_set_encoding_quality() 2017-10-19 18:04:03 +02:00
carlo-bramini
9321dda281 Use FLUID_SNPRINTF into all remaining files 2017-10-15 18:42:44 +02:00
derselbst
820448bafe fix memory leak in fluid_client_t
let each fluid_client_t own its fluid_cmd_handler_t and delete it properly
2017-10-11 10:51:59 +02:00
derselbst
360ae04135 update API doc 2017-10-07 15:21:38 +02:00
derselbst
86a19090eb remove unneeded fluid_server_newclient_func_t 2017-10-07 15:06:06 +02:00
derselbst
b79f2a614e adapt fluid_server API after cmd_handler decoupling
avoid new_fluid_server() to require an already existing instance of fluid_cmd_handler_t just for storing fluid_synth_t* and fluid_midi_router_t*, instead require these two instances explicitly when creating the server
2017-10-07 14:58:26 +02:00
derselbst
38984b0974 avoid memleak 2017-10-07 14:44:22 +02:00
derselbst
b25485d030 update doc for new_fluid_cmd_handler() 2017-10-07 14:43:13 +02:00
derselbst
9e77341482 avoid segfault 2017-10-07 14:42:46 +02:00
derselbst
6531bebbfe remove struct fluid_cmd_handler_t from public API 2017-10-07 11:47:22 +02:00
Tom M
82b2000d08 Merge branch 'master' into cmd-handler 2017-10-06 13:11:21 +02:00
Marcus Weseloh
842d8ba963 Use proper type of node->buf for later memset to avoid buffer overflows 2017-10-04 23:28:10 +02:00
Marcus Weseloh
30dc8f399a Constant nodes now use '$' as first char.
'#' is being treated as a comment by g_shell_parse_argv
2017-10-04 23:28:10 +02:00
Marcus Weseloh
e7ab4f3b8d Create the correct number of output nodes (also removed unused variable warning) 2017-10-04 23:28:10 +02:00
Marcus Weseloh
dd39761dbd Retrieve channel config from synth instance
The audio-groups, audio-channels and effect-channels settings
have already been read and set on the synth instance. No need
to read them in again, especially not in fluid_LADSPA_run, as
that is called very often.
2017-10-04 23:25:27 +02:00
Tom M
10c4cfa29e return NULL if LADSPA alloc fails
instead of assertion fail
2017-10-04 19:59:31 +02:00
Marcus Weseloh
eb42279d71 Evaluate the synth.ladspa.active setting and check for the existance of LADSPA_FxUnit in all command handlers. 2017-10-04 18:57:08 +02:00
derselbst
f4a3c7302e avoid midi_router cmd conflicts
if multiple cmd handlers are used + fix build
2017-10-03 21:42:36 +02:00
derselbst
17aacf4fd9 decouple cmd_handler for midi_router 2017-10-03 18:10:27 +02:00
Bernat Arlandis i Mañó
3c14435a8c Command handler decoupled. Moved config file loading after starting everything. 2017-10-02 18:25:58 +02:00
derselbst
16d7a42ce2 Revert "fix build"
This reverts commit 40ebd7f3b6.
2017-09-24 19:52:46 +02:00
derselbst
2b6c68d422 update doc for fluid_file_set_encoding_quality() 2017-09-23 20:52:16 +02:00
derselbst
9e9eacbc20 refactor return value checking of fluid_settings_*() 2017-09-21 22:09:24 +02:00
derselbst
c36a1a6c09 remove redundant synth functions 2017-09-20 20:39:43 +02:00
derselbst
e797853b2b refactor fluid_settings API
consistently return either FLUID_OK or FLUID_FAILED for public fluid_settings_* functions
2017-09-20 14:27:36 +02:00
derselbst
40ebd7f3b6 fix build 2017-09-19 16:55:54 +02:00
derselbst
34f5a14df3 remove deprecated LADCCA support 2017-09-15 11:11:09 +02:00
derselbst
aac2354f5c remove fop-level "fluidsynth" directory node
cd fluidsynth && git mv * ../
2017-09-03 13:30:26 +02:00