Marcus Weseloh
ea3481c57e
Control port values are always float
2017-11-07 23:49:57 +01:00
Marcus Weseloh
fa0b210233
Rename function to set effect control port value
2017-11-07 23:49:57 +01:00
Marcus Weseloh
bcf711f51a
Rename check for effect port existance
2017-11-07 23:49:57 +01:00
Marcus Weseloh
adcd5a5d53
Cleanup automatic control node creation
...
Change function signatures and names to better reflect what they do
and when they do it.
2017-11-07 23:49:57 +01:00
Marcus Weseloh
72517b8715
No need for user created control nodes anymore
...
Control nodes are created automatically when effect is added now.
Also remove the now unused FLUID_LADSPA_FIXED direction.
2017-11-07 23:49:57 +01:00
Marcus Weseloh
e0463843fa
Rename ladspa_node to ladspa_buffer
...
Users don't need to create control nodes anymore
2017-11-07 23:49:57 +01:00
Marcus Weseloh
026bcbcc78
Create control nodes automatically and use better interface to set value
...
Removes ladspa_control_defaults and ladspa_control in favour of the new
ladspa_set. Nodes for all effect controls are created when the effect
is instantiated.
2017-11-07 23:49:57 +01:00
Marcus Weseloh
ea9c868c86
Make plugin label optional when creating effect
2017-11-07 23:49:57 +01:00
Marcus Weseloh
a4312c65ed
Remove explicit direction from ladspa_link and fluid_ladspa_connect
2017-11-07 23:49:57 +01:00
Marcus Weseloh
1684427c33
Rename ladspa_port to ladspa_link
2017-11-07 23:49:57 +01:00
Marcus Weseloh
55cd5040a7
Allow port names in fluid_port to be specified as one argument
2017-11-07 23:49:57 +01:00
Marcus Weseloh
5aecf97097
Rename command ladspa_plugin to ladspa_effect, remove ladspa_mode
2017-11-07 23:49:57 +01:00
Marcus Weseloh
6eb8212723
Add consistent checking for inactive ladspa in fluid commands
2017-11-07 23:49:57 +01:00
Marcus Weseloh
5b4ad47bee
Effects (plugin instances) identified by name instead of unique id
2017-11-07 23:49:57 +01:00
Marcus Weseloh
e77e702b16
Add support for run_adding mode of plugins and in-place rendering
...
In-place rendering is implemented in such a way that there is no
change in behaviour if it is enabled or not. So there's no need
for a user setting.
Run adding mode is a LADSPA feature that plugins can support. Using
that mode, they don't replace an output buffer, but add their rendered
audio to it (with a user definable gain). A very necessary feature to
be able to use a LADSPA reverb in place of the internal reverb.
2017-11-07 23:49:57 +01:00
derselbst
2ed47f23b5
Revert "make struct _fluid_ladspa_fx_t opaque" to prepare ladspa merge
...
It's effects will be replicated after merge.
This reverts commit 5afb1a854b
.
# Conflicts:
# src/bindings/fluid_ladspa.c
2017-11-07 23:49:57 +01:00
carlo-bramini
cb4f1d389d
No need to read-modify-write, just set errors to TRUE
2017-11-04 13:07:18 +01:00
derselbst
bf978e2b6b
even more destructor refactor
2017-10-30 11:28:08 +01:00
derselbst
323320e7e4
refactor all destructor functions
...
to return void if possible and not crash if called with NULL
2017-10-29 13:23:08 +01:00
derselbst
2b882c2877
fix build
2017-10-28 14:19:20 +02:00
derselbst
6dfd736460
refactor return values in fluid_cmd.c
...
consistently return FLUID_OK or FLUID_FAILED for shell command handlers
2017-10-28 14:02:44 +02:00
derselbst
707f1eb079
conflicting function delcarations
...
fix build
2017-10-28 13:53:33 +02:00
derselbst
0ef6da7740
minor clarification
2017-10-28 13:50:13 +02:00
derselbst
642b9750b2
remove unimplemented fluid_handle_mstat()
2017-10-28 13:31:10 +02:00
derselbst
634c07ed45
remove error hiding casts in fluid_commands[]
2017-10-28 13:30:35 +02:00
derselbst
1eb6aa97f3
avoid using deprecated tuning functions
2017-10-27 16:59:20 +02:00
derselbst
db373f168f
Merge branch 'fluid_atomic' of git://github.com/VolcanoMobile/fluidsynth into VolcanoMobile-fluid_atomic
2017-10-27 15:58:54 +02:00
derselbst
5afb1a854b
make struct _fluid_ladspa_fx_t opaque
2017-10-26 21:45:29 +02:00
Philippe Simons
cdd9f75112
thread function return type ( #254 )
...
typedef the return value of thread starting routines, as suggested by @loki666
2017-10-26 18:08:10 +02:00
loki666
6d9081e1a5
use fluid_atomic types in fluid_ladspa and fluid_winmidi
2017-10-25 23:03:56 +02:00
derselbst
a1810385e1
Merge branch 'carlo-bramini-misc-fixes-1'
2017-10-25 17:52:17 +02:00
carlo-bramini
96f0f5fe88
Use _close() on _WIN32
2017-10-24 20:25:58 +02:00
Marcus Weseloh
e485129705
Merge pull request #249 from mawe42/more-ladspa-cleanup
...
More LADSPA cleanup and refactor
2017-10-24 15:50:05 +02:00
Marcus Weseloh
dab11fd503
Breakup very long fluid_ladspa_check into smaller functions
2017-10-24 00:40:09 +02:00
Marcus Weseloh
ab26f85bf8
Add check for in-place broken plugins
...
In-place broken plugins can't cope with input and output audio
ports connected to the same buffer.
2017-10-23 23:16:06 +02:00
Marcus Weseloh
8814926857
Replace number of inputs and outputs on ports with pointer to connected node
...
Ports can only have a single input or output, so no need for two counters.
And keeping track of the connected node means we can check for
INPLACE_BROKEN plugins, if multiple ports connect to the same node.
2017-10-23 22:12:04 +02:00
Marcus Weseloh
93dbac3535
When clearing LADSPA, also reset connection counts on system nodes
2017-10-23 22:07:58 +02:00
Marcus Weseloh
a1ff8d0e55
Render all block using a single LADSPA run
...
Removes the need for VLAs before ladspa call in rvoice mixer and number
for for loops to set up and advance the buffers. Also reduces the number
of state changes (and atomic operations) by calling fluid_ladspa_run only
once.
2017-10-23 21:41:28 +02:00
Marcus Weseloh
105d9835cb
Explicity pass in the audio buffer size when creating LADSPA fx.
...
And don't pass in node buffer sizes into new_fluid_ladspa_node but
determine it from the node type.
2017-10-23 21:41:20 +02:00
derselbst
168274fbbd
fix build
2017-10-23 12:43:07 +02:00
R. Mattes
afe915dab2
Fixed dumptuning
2017-10-22 21:36:25 +02:00
carlo-bramini
e1c3b46ee2
Fix an handle leak
2017-10-22 19:13:16 +02:00
R. Mattes
38758c78dd
Fixed nasty loop test
2017-10-22 18:47:00 +02:00
derselbst
2deffc40c0
remove redundant #ifdef LADSPA
...
cmake will take care of compiling fluid_ladspa.c
2017-10-22 14:31:57 +02:00
Marcus Weseloh
799f3ea44c
Merge pull request #242 from mawe42/ladspa-additional-fixes
...
More fixes to LADSPA system
2017-10-22 11:38:37 +02:00
Marcus Weseloh
e18e54d7ae
White-space
2017-10-22 11:24:25 +02:00
Marcus Weseloh
e0dcdbcdfc
Correct documentation for fluid_ladspa_run
2017-10-22 11:24:25 +02:00
Marcus Weseloh
47d640571b
Add missing check for ladspa_is_active to ladsap_control_defaults
2017-10-22 11:24:25 +02:00
Marcus Weseloh
29a4abb9a5
Use int for number of inputs and outputs, some plugins have a lot of ports
2017-10-22 11:24:25 +02:00
derselbst
24614d343d
Revert "ladspa: atomically get and set pending_deactivation"
...
This reverts commit 6c69b8ccff
.
2017-10-22 11:23:34 +02:00
Marcus Weseloh
3cc684e47e
Avoid a few ifdefs by defining two separate sets of node<->buffer functions
2017-10-21 22:36:34 +02:00
Marcus Weseloh
4d256ce8cc
Add new command to FluidSynth shell to set control ports to default value
2017-10-21 19:49:49 +02:00
Marcus Weseloh
2787b0e10e
Add function to automatically set unconnected port to default value
...
Uses the hints in the plugin to determine the default value.
2017-10-21 19:47:03 +02:00
Marcus Weseloh
7534e54d4f
Check LADSPA setup before activation
2017-10-21 19:47:03 +02:00
derselbst
c205e0162d
avoid null dereferences in delete_fluid_ladspa_plugin()
...
be extremely paranoid as suggested by clang-tidy
2017-10-21 19:01:07 +02:00
derselbst
6c69b8ccff
ladspa: atomically get and set pending_deactivation
2017-10-21 18:31:20 +02:00
derselbst
81505b9324
remove redundant ';'
2017-10-21 18:22:19 +02:00
derselbst
402f76bfb8
avoid duplicate ';'
2017-10-21 18:21:03 +02:00
derselbst
1d0cfd605f
prefer using enum for LADSPA state
2017-10-21 18:13:40 +02:00
derselbst
4911bc8de4
credit @mawe42 for rewriting LADSPA
2017-10-21 18:09:38 +02:00
derselbst
79cef163a1
fix cast operator precedence
2017-10-21 18:05:54 +02:00
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