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
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
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
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
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
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
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
9900d5f151
rename fluid_mod_new|delete() to match naming conventions
2017-11-27 16:58: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
derselbst
a13cb63103
avoid buffer overrun in fluid_synth_nwrite_float()
2017-11-26 22:12:12 +01:00
Tom M
6c5e1d9ae0
Merge pull request #290 from carlo-bramini/bsd-socket-fixes
...
Cleanup redundant socket implementation.
2017-11-26 14:12:40 +01:00
derselbst
e7ff72df46
make fluid_socket_*() helper functions static
2017-11-26 14:05:22 +01:00
jjceresa
c564fd6d5a
Portaudio driver - unique device identification ( #289 )
...
Changes the format of portaudio device names to ensure uniqueness of device names.
Without uniqueness of device names the driver was unable to select the device chosen by the user.
Fixes #284 .
2017-11-26 13:39:01 +01:00
carlo-bramini
44985b1212
INVALID_SOCKET can be into fluid_sys.c, near SOCKET_ERROR. No need to have it in fluidsynth_priv.h
2017-11-26 11:07:09 +01:00
carlo-bramini
4ccf7217b0
Fix comment to the right #endif
2017-11-26 11:02:24 +01:00
derselbst
8fb1f500e0
validate param of new_fluid_defsfloader()
2017-11-26 08:55:19 +01:00
derselbst
ae29be83d8
no need to expose delete_fluid_defsfloader()
...
fluid_sfloader_t::free() can be used instead
2017-11-25 22:56:00 +01:00
derselbst
5c5423df32
update API doc about new_fluid_defsfloader()
2017-11-25 22:54:48 +01:00
derselbst
31592fee64
fix return value check for fseek
2017-11-25 22:35:05 +01:00
derselbst
3c39d68294
change fluid_sfloader_t::free() to return void
2017-11-25 22:32:00 +01:00
derselbst
f55e90aa80
expose new_fluid_defsfloader() to public API
...
to enable custom soundfont loading
2017-11-25 22:24:01 +01:00
derselbst
96356cbf9d
correctly check return values for file callback functions
2017-11-25 22:12:59 +01:00
derselbst
d02eaf6585
continue file callback implementation
2017-11-25 21:43:13 +01:00
derselbst
09c084e776
fix build
2017-11-25 20:41:31 +01:00
mikelow
1e65ba1a49
add fluid_file_callbacks struct to fluid_defsfont
...
to perform file operations through callbacks
2017-11-25 20:35:42 +01:00
carlo-bramini
763b1f39a5
Minor fix, no need to include glib.h, fluidsynth_priv.h includes it already.
2017-11-25 14:54:28 +01:00
carlo-bramini
f26258cd1f
Unified BSD socket source, for WIN32 and POSIX.
2017-11-25 14:50:52 +01:00
derselbst
4178bbdb72
avoid signedness warnings
...
on platforms where char is unsigned
2017-11-25 12:29:07 +01:00
Tom M
a7fe5c4257
Merge pull request #283 from FluidSynth/ladspa
...
Polishing of LADSPA subsystem
2017-11-25 11:45:49 +01:00
derselbst
4051b6da28
cleanup fluid_ladspa.h
2017-11-25 11:17:44 +01:00
derselbst
6484440ee1
enforce signedness when reading MThd
2017-11-25 10:43:03 +01:00
derselbst
6931644a4d
avoid glib assertion if plugin not found
2017-11-25 10:14:33 +01:00
Tom M
a1623f673f
Merge pull request #288 from FluidSynth/misc-fixes
...
remove unused code + fix compiler warnings
2017-11-24 20:17:41 +01:00
derselbst
e567df3f40
add doxygen since to fluid_audio_driver_register()
2017-11-24 17:45:07 +01:00
Marcus Weseloh
267325f107
char is unsigned on some platforms/compilers (e.g. on Linaro ARM 2016.11)
2017-11-24 12:30:10 +01:00
Marcus Weseloh
c57507a518
Remove statics that are unused if libsndfile is not available
2017-11-24 12:23:30 +01:00
Marcus Weseloh
49d19be9c8
Include glib as system includes, to get rid of annoying glib warnings in gcc
2017-11-24 11:30:14 +01:00
Marcus Weseloh
1f4a6008b8
Fix indentation to get rid of GCC "not guarded by if" warnings
2017-11-24 11:29:38 +01:00
Marcus Weseloh
f1d28bdeb9
Remove unused fluid_track_* methods
...
fluid_track_count_events
fluid_track_first_event
fluid_track_get_name
2017-11-24 11:09:34 +01:00
Marcus Weseloh
5f6003e465
Remote unused fluid_player_count_tracks, fluid_player_get_track
2017-11-24 10:57:00 +01:00
Marcus Weseloh
432929c18c
Make use of fluid_tuning_set_name where appropriate
...
Also add memory allocation error checks and initialize fluid_tuning_t
after allocation.
2017-11-24 10:51:52 +01:00
Marcus Weseloh
c605380aa8
Remove unused fluid_tuning_set_key and fluid_is_empty
2017-11-24 10:31:02 +01:00
Marcus Weseloh
a1343103f1
run_adding_gain can safely be set while LADSPA is active
2017-11-24 10:22:13 +01:00
Marcus Weseloh
036cb1d347
Remove unused macros from fluid_rev
2017-11-23 11:12:24 +01:00
Marcus Weseloh
58f5b87074
Clarify and cleanup the denormal handling in fluid_rev
2017-11-23 11:12:24 +01:00
Marcus Weseloh
b742b9a58e
Remove unused fluid_voice_mix function
2017-11-23 11:12:24 +01:00
Marcus Weseloh
3ec593a6aa
Add missing check for memory allocation error on chorus effect
2017-11-23 11:12:24 +01:00
derselbst
7ed5d1f1d8
update docs about upper roomsize threshold
2017-11-22 16:56:51 +01:00
Tom M
eb5945bb2c
make dsound use the desktop window handle ( #286 )
...
* Dsound driver is now making use of an already existing window handle: the desktop window
* Removing of fluid_dll.c because it has becoming useless
* avoid a potential deadlock when calling functions within DllMain()
* remove obsolete fluid_set_hinstance() and fluid_get_hinstance() from public API
2017-11-22 16:42:48 +01:00
Tom M
e50dd8ed4c
Merge pull request #264 from FluidSynth/register-adriver
...
support for registering audio drivers based on actual needs
2017-11-22 14:03:52 +01:00
derselbst
c56943cfc6
complete 24bit sample support for sfloader
2017-11-21 21:41:12 +01:00
Marcus Weseloh
88092e8c9d
Better documentation and err param handling for fluid_ladspa_check
2017-11-21 09:30:31 +01:00
derselbst
0802fdfe5e
use FLUID_STRDUP rather than custom copy
2017-11-21 09:14:19 +01:00
derselbst
45bc334333
add 24 bit sample support to fluid_cached_sampledata_load()
2017-11-21 09:03:12 +01:00
Marcus Weseloh
04285fcf48
Validate params in all public API functions of LADSPA subsystem
2017-11-20 20:35:24 +01:00
Marcus Weseloh
ce8fa7c387
Only include gmodule and define dyn loading macros if LADSPA is enabled
2017-11-20 20:13:25 +01:00
derselbst
c0cd1887db
Revert "make dsound driver using the desktop window handle ( #269 )"
...
This reverts commit be6e1ab88a
. Forgot to take public API HInstance getter/setter into account.
2017-11-20 20:05:02 +01:00
Marcus Weseloh
2f19e80d38
Rename buffer_count to num_buffers
2017-11-20 19:59:47 +01:00
Marcus Weseloh
645d8c5da4
Release the API lock when returning from fluid_ladspa_add_host_ports
2017-11-20 19:58:05 +01:00
Marcus Weseloh
e312f5bedd
Use TRUE/FALSE for boolean flag
2017-11-20 19:56:42 +01:00
Marcus Weseloh
c7da1ef511
Fix typos and clarify comments
2017-11-20 19:55:06 +01:00
Marcus Weseloh
a328dce437
Remove includes that are already in fluid_ladspa.h
2017-11-20 19:40:26 +01:00
Tom M
d24c2a1179
Merge branch 'master' into register-adriver
2017-11-20 16:39:15 +01:00
jjceresa
be6e1ab88a
make dsound driver using the desktop window handle ( #269 )
...
* Dsound driver is now making use of an already existing window handle: the desktop window
* Removing of fluid_dll.c because it has becoming useless
* avoid a potential deadlock when calling functions within DllMain()
2017-11-20 16:33:12 +01:00
Tom M
2aa612b764
Merge pull request #280 from FluidSynth/reverb-settings-adjust
...
Reverb settings adjustements
2017-11-20 16:15:06 +01:00
Tom M
c675d2667a
fix grammar
2017-11-20 16:10:22 +01:00
Marcus Weseloh
89646783d1
Only require gmodule if LADSPA is enabled
...
Also remove the now unused libdl support, as it was only used by LADSPA,
which has been changed to use gmodule instead.
2017-11-19 21:45:00 +01:00
Marcus Weseloh
72d32da33d
Remove redundant declarations of public API functions
2017-11-19 17:27:07 +01:00
Marcus Weseloh
0786d8a37f
Remove unused define
2017-11-19 14:43:19 +01:00
Marcus Weseloh
e94b7f8003
Remove unused include in fluid_ladspa.c
2017-11-19 14:31:36 +01:00
Marcus Weseloh
79c32301f2
Move fluid_synth_get_ladspa_fx to synth, typedef to types.
2017-11-19 14:29:32 +01:00
derselbst
1bd85ffba7
remove meaningless multiplication
...
value never read
2017-11-18 21:43:21 +01:00
Marcus Weseloh
e511992680
Expose LADSPA functions via public API
...
Always compile in fluid_ladspa.h and c to that the LADSPA API functions
are always exposed, but use dummy functions that return failure (NULL,
FLUID_FAILED or FALSE) if LADSPA isn't available.
2017-11-18 20:48:30 +01:00
Marcus Weseloh
1863c618e8
Add function to get LADSPA effects instance from synth
2017-11-18 20:48:30 +01:00
derselbst
02d5ce331c
remove meaningless statement in fluid_conv.c
2017-11-18 20:15:57 +01:00
jjceresa
219ae7556b
Minor coding changes
2017-11-16 14:04:54 +01:00
jjceresa
dc38ba7bc5
Avoiding level/width dependency
...
Adding a compensation to cancel level versus width dependency settings.
2017-11-16 01:33:44 +01:00
jjceresa
fe2fd682e5
Clipping upper limit of roomsize to 1.0f
...
This will avoid the output amplitude growing exponentially.
2017-11-16 00:30:14 +01:00
jjceresa
b71e1230e2
Adjust the upper limit of roomsize.
...
The upper limit is narrowed from 1.2 to 1.0 value to avoid output
growing exponentially.
2017-11-16 00:16:34 +01:00
derselbst
1815ca880f
Merge branch 'master' into sm24
2017-11-15 21:01:34 +01:00
derselbst
fd7bc44b0b
call fluid_synth_all_notes_off() directly
2017-11-15 17:13:23 +01:00
derselbst
7dee2c18e9
implement handling of FLUID_SEQ_ALLSOUNDSOFF
2017-11-15 17:10:26 +01:00
Tom M
415fdbd89b
Merge pull request #275 from carlo-bramini/cmake-win32-1
...
Improvements to cmake for win32 and other bits.
2017-11-15 10:56:58 +01:00
derselbst
bbc6a6098a
Remove unused _fluid_midi_router_t::synth
2017-11-15 10:52:12 +01:00
derselbst
31cc93f2fc
readd HAVE_IO_H check to config.cmake
...
fix compiler warnings
2017-11-15 10:32:15 +01:00
derselbst
a8a7dba0df
remove obsolete config_win32.h from src/CMakeLists.txt
2017-11-15 10:12:13 +01:00
carlo-bramini
acf2395a41
Revert "Use alloca()/_alloca() on C89/C90 compilers without VLA"
...
This reverts commit b8766aef67
.
2017-11-14 23:11:23 +01:00
carlo-bramini
e18c8c3ae4
Revert "Fix macros for alloca/_alloca usage (not a source of problems in current code)."
...
This reverts commit 15b31be962
.
2017-11-14 23:07:47 +01:00
Marcus Weseloh
9dc7a4e52c
Merge branch 'master' into ladspa
2017-11-13 22:30:41 +01:00
derselbst
ecdd6e2a8a
avoid pointless MSVC warnings
...
return value in void function
2017-11-13 20:32:02 +01:00
loki666
3908917aab
return FLUID_FAIL when sampletype is OGG but not compiled with LIBSNDFILE_SUPPORT
2017-11-13 15:21:30 +01:00
carlo-bramini
15b31be962
Fix macros for alloca/_alloca usage (not a source of problems in current code).
2017-11-12 16:57:11 +01:00
carlo-bramini
48941897b9
No need to increment string pointer at exit.
2017-11-12 16:27:36 +01:00
carlo-bramini
4a5648141c
glib.h is already included by fluidsynth_priv.h
2017-11-12 16:26:50 +01:00
carlo-bramini
b8766aef67
Use alloca()/_alloca() on C89/C90 compilers without VLA
2017-11-12 16:16:34 +01:00
carlo-bramini
f9ca336a2d
Check if pulse driver is installed and enabled.
2017-11-12 14:56:57 +01:00
carlo-bramini
3fb1bf8d5c
Remove includes already into fluidsynth_priv.h with #ifdef...#endif
2017-11-12 14:53:26 +01:00
carlo-bramini
d1dd24f45a
Remove obsolete config_win32.cmake
2017-11-12 13:26:08 +01:00
carlo-bramini
582d316f9f
Remove obsolete config_win32.h
2017-11-12 13:24:36 +01:00
Marcus Weseloh
e844b3567c
Fix typo in FLUID_STRNCASECMP for Windows
2017-11-12 11:00:20 +01:00
Marcus Weseloh
50b50e765d
Remove debug print statement
2017-11-12 00:54:10 +01:00
Marcus Weseloh
9509628da1
Use glib dynamic librar loading functions
2017-11-12 00:53:57 +01:00
derselbst
13728ed0bd
update API doc about fluid_audio_driver_register()
2017-11-11 15:27:35 +01:00
derselbst
52b892c534
consistently use fluid_seq_id_t for new API
...
ABI breaking change
2017-11-11 12:18:09 +01:00
derselbst
696c736b2f
introduce separate type for client IDs
2017-11-11 12:14:13 +01:00
derselbst
c7a02bd812
make fluid_settings_foreach_t const correct
2017-11-11 11:09:17 +01:00
derselbst
12a9692211
make fluid_settings_foreach_option_t const correct
2017-11-11 11:04:12 +01:00
Tom M
180038d416
Merge pull request #271 from fabiangreffrath/cmake_mingw_libname
...
fix library file names when building with MinGW and CMake
2017-11-10 20:58:23 +01:00
derselbst
4571d996b3
remove unused forward declarations
2017-11-10 20:49:06 +01:00
derselbst
f2c4cfb6b6
remove orphaned /src/unused/ dir
2017-11-10 20:48:37 +01:00
Marcus Weseloh
007cd2b5fc
Merge branch 'master' into ladspa
...
Resolve conflicts in:
src/bindings/fluid_ladspa.c
2017-11-10 19:36:30 +01:00
Marcus Weseloh
b2aed2b317
Fix compilation error if LADSPA is not enabled
2017-11-10 19:09:04 +01:00
Tom M
987aa33486
Merge pull request #263 from FluidSynth/rm-def-mod
...
support removing default modulators
2017-11-10 16:41:56 +01:00
Marcus Weseloh
1a91e971d4
Always prepare the reverb and chorus sends when LADSPA is active
...
This change enables users to disable the internal reverb and chorus
and process the mixed down reverb and chorus send signals using
LADSPA plugins.
2017-11-10 15:37:00 +01:00
Fabian Greffrath
9a205c0b8b
fix library file names when building with MinGW and CMake
...
We have applied this patch to the mingw-w64-fluidsynth package [1] in
MSYS2 to recieve the same library file names when building with CMake
as we got when building with Autotools.
[1] https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-fluidsynth
2017-11-10 13:20:14 +01:00
Tom M
a13cf153d9
Merge pull request #265 from FluidSynth/delete-refactor
...
refactor destructor functions to return void if possible and make them safe when called with NULL
2017-11-08 15:45:49 +01:00
Marcus Weseloh
87c37f305d
Explicity create left and right host buffers
...
Makes it possible to create a single host buffer node for the
effect sends.
2017-11-07 23:49:57 +01:00
Marcus Weseloh
4b2414761b
Reapply "make struct _fluid_ladspa_fx_t opaque" effects from 5afb1a854b
2017-11-07 23:49:57 +01:00
Marcus Weseloh
9f6ef4e67e
Cleanup API and docs
...
- Rename functions to clarify purpose
- Group functions in header by purpose
- Cleanup doc comments
- Remove unused members from structs
2017-11-07 23:49:57 +01:00
Marcus Weseloh
6508d36bea
Remove some macros and cleanup comments
2017-11-07 23:49:57 +01:00
Marcus Weseloh
1ba0450f3a
Remove enum for output mode, use a simple flag instead
2017-11-07 23:49:57 +01:00
Marcus Weseloh
be38fa98e3
Cleanup ladspa commands and add more comments
...
Remove the <effect name>:<port name> syntax for ladspa_link again,
better to have them as two separate arguments. Also remove the
<lib name>:<plugin label> syntax, use separate args where as well.
2017-11-07 23:49:57 +01:00
Marcus Weseloh
61ea5e19db
Remove the node concept completely from LADSPA api
2017-11-07 23:49:57 +01:00
Marcus Weseloh
9af97fb02b
Add note that LADSPA doesn't need very long command lines anymore
2017-11-07 23:49:57 +01:00