Commit graph

2188 commits

Author SHA1 Message Date
derselbst
8a4033e2e1 mention fluid_player_seek() in API docs 2017-12-03 21:37:25 +01:00
derselbst
6eb450b40c silence -Wdocumentation warnings 2017-12-03 20:31:00 +01:00
carlo-bramini
7be328a357 Simpler implementation of WINMIDI driver. 2017-12-03 19:37:20 +01:00
derselbst
82450e0ee1 remove FLUID_NUM_MOD macro from public API 2017-12-03 18:39:24 +01:00
derselbst
76d4028aeb calculate voice amplitudes on-the-fly
no need for saving them in fluid_voice_t
2017-12-03 18:28:22 +01:00
derselbst
d086ca8046 refactor fluid_voice_update_param() 2017-12-03 17:55:31 +01:00
derselbst
6e59d3bca9 use fluid_voice_gen_value() rather than _GEN macro 2017-12-03 16:24:10 +01:00
derselbst
c30d519572 return -1 in fluid_midi_file_getc()
closes #93
2017-12-03 15:13:26 +01:00
carlo-bramini
cdfe8d3d7d Include fixes 2 (#296)
Remove redundant includes
2017-12-03 13:12:27 +01:00
derselbst
0f737708c7 optimize fluid_voice_t in size 2017-12-02 18:25:58 +01:00
Marcus Weseloh
8525e420b0 Allow overwriting the compile-time flags for gcc/clang. 2017-12-02 17:38:41 +01:00
Marcus Weseloh
a3aef4b2ee Add ability to mark channels as important in overflow priority calculation
FluidSynths overflow priority calculation, that determines which voice to
kill if the current polyphony limit has been reached, treats all channels
as equal. Only percussion channels can get a user defined score added to
their priority.

In certain use-cases there can be a number of MIDI channels that are much
more important than other ones, and not just percussion channels. For
example, a channel playing a constant pad sound which would be very
noticeable if killed.

This change adds two new synth.overflow settings:
- synth.overflow.important
- synth.overflow.important-channels

They add the ability to mark MIDI channels as "important" and have
the overflow calculation add a user defined score to voices on those
channels.
2017-12-02 15:57:21 +01:00
Marcus Weseloh
0a57c4cf0a Document synth.overflow.* settings 2017-12-02 15:54:45 +01:00
derselbst
80063d58f1 Merge branch 'master' into cleanup3 2017-12-02 13:04:49 +01:00
Marcus Weseloh
3973b9566d Add float-typed wrapper for fluid_settings_getnum
Avoids the need to store the value in a local double before assigning
it to the target variable.
2017-12-02 12:19:47 +01:00
Marcus Weseloh
ac5aa418ae Use float instead of fluid_real_t for overflow parameters and calculations 2017-12-02 12:19:47 +01:00
Tom M
7d3ea52171
Merge pull request #293 from FluidSynth/settings-cleanup
Settings cleanup and refactor
2017-12-02 11:15:00 +01:00
derselbst
50923b3f0e remove redundant string termination
already done by FLUID_STRNCPY macro
2017-12-02 11:01:31 +01:00
Marcus Weseloh
ba48024f59 Ensure that fluid_synth_set_reverb_on is protect by api mutex
The function calls fluid_synth_update_mixer, which should only be
called with the mutex held.

This also removes the need for fluid_synth_t::with_reverb to be an atomic.
fluid_synth_t::with_chorus was already protected by the mutex and doesn't
need to be an atomic either.
2017-12-01 21:35:03 +01:00
Marcus Weseloh
ee227986e5 Explicity set overflow settings in new_fluid_synth
Removes the need for faked callback calls.
2017-12-01 21:24:31 +01:00
Marcus Weseloh
69cf9e1ec2 overflow settings callback should use passed value, not query settings 2017-12-01 21:18:30 +01:00
Marcus Weseloh
6b79c05dc2 Rename setting callbacks to clarify their purpose 2017-12-01 21:09:06 +01:00
Marcus Weseloh
750ffc003b Cleanup settings callback signatures to avoid error hiding casts
Removes the need to cast the callback functions when registering them.
Also makes the needed cast from (void *) to (fluid_synth_t *) explicit
in the callback handlers.
2017-12-01 21:02:21 +01:00
Marcus Weseloh
1b5cf26000 Change settings callback to return void
The callback return value is not used anywhere anyway.
2017-12-01 20:51:21 +01:00
Marcus Weseloh
6ab0cc3024 Refactor and cleanup fluid_settings_set* functions
- backwards incompatible: remove "yes", "no" support for int settings via
  fluid_settings_setstr
- backwards incompatible: remove silent setting creation of named setting
  does not exist
- Unlock settings mutex before calling into an update callback, to
  avoid possible deadlock with FluidSynth API mutex
2017-12-01 20:21:07 +01:00
Marcus Weseloh
4b090c2afb Use case-insensitive string match for boolean settings 2017-12-01 19:29:29 +01:00
Marcus Weseloh
9f579d99f3 Remove callback and data parameters from settings_register_* functions
Callback functions and user data can be set with the previously added
functions. And callbacks are only used in a single place in new_fluid_synth,
all other calls to setttings_register_* set those two params to NULL,
so lets remove them everywhere.
2017-11-30 22:57:19 +01:00
Marcus Weseloh
5cd03e0171 Add dedicated functions for registering update callbacks on settings
This avoids having to duplicate the default, min, max and hint values
when setting a callback function for an existing setting.
2017-11-30 22:56:01 +01:00
derselbst
35f679d16d mention removed enum vals in API doc 2017-11-30 13:34:33 +01:00
derselbst
c7675a8269 bump version to 2.0 2017-11-30 13:25:40 +01:00
derselbst
68d812ae30 remove *_LAST enum values from public API doc
addresses #186
2017-11-30 13:18:38 +01:00
derselbst
cde8517c5a make sure doxygen generates ladspa-related docs 2017-11-30 13:01:16 +01:00
derselbst
01040409ba exclude private headers from public API doc generation 2017-11-30 12:55:20 +01:00
derselbst
ce6c5cadcb fix build 2017-11-29 13:56:05 +01:00
derselbst
8fca88942d Merge branch 'master' into sm24 2017-11-29 10:03:42 +01:00
derselbst
5bc1f57ec5 mention ladspa functions in API docs 2017-11-27 18:30:20 +01:00
derselbst
73806d653c remove orphaned fluid_synth_set_midi_router() decl. 2017-11-27 18:04:21 +01:00
derselbst
c5cdcb8eda remove deprecated fluid_synth_reset_tuning() 2017-11-27 18:01:19 +01:00
derselbst
70a1c82a5e remove deprecated fluid_synth_select_tuning() 2017-11-27 18:00:50 +01:00
derselbst
0bb8726583 remove deprecated fluid_synth_create_octave_tuning() 2017-11-27 17:56:03 +01:00
derselbst
7140e971ec remove deprecated fluid_synth_create_key_tuning() 2017-11-27 17:52:58 +01:00
derselbst
62df9178ae remove deprecated fluid_synth_get_channel_info()
it provided functionality in between of fluid_synth_get_program() and fluid_synth_get_channel_preset(), which however was not visible from the user perspective
2017-11-27 17:49:10 +01:00
derselbst
9f366f3320 move SAMPLETYPE macros to enum 2017-11-27 17:38:33 +01:00
derselbst
4d65e07156 get rid of redundant fluid_sample_refcount macro
and access field directly
2017-11-27 17:27:37 +01:00
derselbst
4776b7e407 remove macro fluid_sfont_get_id() from public API 2017-11-27 17:19:29 +01:00
derselbst
52872305f2 move FLUID_NUM_MOD to public voice header 2017-11-27 17:11:06 +01:00
derselbst
9900d5f151 rename fluid_mod_new|delete() to match naming conventions 2017-11-27 16:58:27 +01:00
Tom M
c94f747c04
Merge pull request #291 from FluidSynth/file-callback
Add file callbacks to fluid_sfloader_t
2017-11-27 16:54:27 +01:00
Tom M
621c84f6a1
Merge branch 'master' into file-callback 2017-11-27 14:52:20 +01:00
derselbst
3b1a4ccad0 clarify API doc of fluid_synth_add_sfloader() 2017-11-27 14:41:26 +01:00