Commit graph

550 commits

Author SHA1 Message Date
derselbst
c56d09be6c elaborate on "bank offsets" 2017-12-29 22:10:04 +01:00
derselbst
9e39479f55 update API doc of fluid_synth_[bank|sfont]_select() 2017-12-29 21:57:54 +01:00
derselbst
272b807383 fallback to glibs C99 compliant *snprintf() functions
rather than microsofts non compliant extension functions
2017-12-29 17:51:57 +01:00
carlo-bramini
3e9052535b Use only g_usleep() in fluid_msleep(). 2017-12-28 16:55:52 +01:00
carlo-bramini
cb1e93cd7c Use fluid_msleep() into JACK driver. 2017-12-28 12:28:26 +01:00
carlo-bramini
f638fd90ba Introduce fluid_msleep function. 2017-12-27 21:36:07 +01:00
Tom M
2d83700dc7
Merge pull request #315 from carlo-bramini/misc-fixes-3
Remove redundant includes and avoid zero-size array if MIDI input unavailable.
2017-12-27 18:04:06 +01:00
derselbst
be9caa1953 Merge branch 'master' of https://github.com/FluidSynth/fluidsynth 2017-12-27 17:24:44 +01:00
carlo-bramini
9c59ad9eb8 Optimize memory usage for fluid_audio_driver_register() (#314) 2017-12-27 17:24:13 +01:00
carlo-bramini
20b7143ba9
Avoid zero-size array if MIDI input unavailable. 2017-12-24 14:55:39 +01:00
carlo-bramini
c6a2b0ceba
Use FLUID_MUTEX_INIT instead of G_STATIC_MUTEX_INIT 2017-12-24 14:46:39 +01:00
carlo-bramini
74122f2d6d
Remove redundant include. 2017-12-24 14:43:06 +01:00
carlo-bramini
806b3d68e1
Check for JACK_SUPPORT 2017-12-24 14:41:39 +01:00
carlo-bramini
771fa8191a
Remove redundant include 2017-12-24 14:39:40 +01:00
derselbst
870a9a8232 make fluid_synth_error() const correct 2017-12-21 20:00:39 +01:00
derselbst
51cc2656e1 add internal note about fluid_midi_parser_parse() 2017-12-21 14:57:09 +01:00
derselbst
5f45c6d97b Revert "make fluid_midi_parser_parse() public"
This reverts commit 4568e551b9. Would allow fluidsynth to be abused as midi parser.

Closes #150
2017-12-21 14:52:06 +01:00
jjceresa
5be4f31822 Explicit cast for rvoice_event_handler functions (#312)
Explicit casts to avoid narrowing conversion warnings.
2017-12-21 14:48:58 +01:00
carlo-bramini
4203e10220 Use FLUID_CHORUS_DEFAULT_TYPE properly. (#311) 2017-12-18 20:03:18 +01:00
derselbst
610b6743be explicit casts to avoid narrowing conversion warnings
fixes #310
2017-12-18 19:14:12 +01:00
derselbst
bf5dbc60cf adjust return value of fluid_server_join()
to be consistent with ladspa API
2017-12-17 11:45:42 +01:00
derselbst
c61bcdca70 silence "network support disabled" warnings
one is enough
2017-12-17 11:42:46 +01:00
carlo-bramini
8025f788d3 Disable network at compile time (option) (#307) 2017-12-17 10:25:54 +01:00
derselbst
4568e551b9 make fluid_midi_parser_parse() public
to enable realtime byte to fluid_midi_event_t parsing

fixes #108
addresses #150
2017-12-16 15:08:47 +01:00
derselbst
5e0649158b fix build on macosx
fixes #305
2017-12-15 19:06:43 +01:00
derselbst
ca9080d73f abstract usage of G_UNLIKELY through custom macro 2017-12-14 20:04:24 +01:00
Tom M
e4f338d014
Merge pull request #304 from carlo-bramini/tcpip-win32-fix
Fix crash to TCP server (WIN32).
2017-12-14 16:54:51 +01:00
Tom M
a82ddb8d08
Merge branch 'master' into sm24 2017-12-13 20:12:47 +01:00
carlo-bramini
46733af348 Fix crash to TCP server (WIN32). 2017-12-13 20:08:42 +01:00
derselbst
f231df5608 remove redundant fluid_real_t casts
in rvoice_dsp
2017-12-12 21:06:11 +01:00
derselbst
05a4989498 avoid bad function cast warnings 2017-12-12 21:02:21 +01:00
derselbst
0dde0c1aff mark voice helper functions inline
fluid_voice_calculate_gain_amplitude()
fluid_rvoice_get_sample()
2017-12-12 20:54:40 +01:00
Tom M
deb0658205
add support for lyrics and text midi events (#299)
* partly applied karaoke patch from ticket #111
* allow MIDI_SET_TEMPO in playback_callback
2017-12-11 19:35:07 +01:00
derselbst
84124e3230 doc the DOCMEs 2017-12-10 17:31:11 +01:00
derselbst
5806d9e9cc display sample type for fluidsynth --version 2017-12-09 22:20:25 +01:00
derselbst
c02a5ae5ce remove redundant VERSION macro
use FLUIDSYNTH_VERSION instead
2017-12-09 22:09:24 +01:00
derselbst
97a4e1aa1c fix a bug when reading 24 bit soundfonts 2017-12-09 20:03:37 +01:00
derselbst
29d194ed6d Revert "adjust voice gain for 24bit samples"
This reverts commit 1629f9f997. Accidentally committed to wrong master branch instead of sm24.
2017-12-09 16:48:57 +01:00
derselbst
b130763545 adjust voice gain for 24bit samples 2017-12-09 16:48:36 +01:00
derselbst
1629f9f997 adjust voice gain for 24bit samples 2017-12-08 20:24:17 +01:00
derselbst
9a21e10e10 add 24bit sample support to rvoice_dsp interpolation functions 2017-12-08 18:23:18 +01:00
derselbst
7de0e02a82 Merge branch 'master' into sm24 2017-12-07 18:58:12 +01:00
Tom M
ea8ac50333
Merge branch 'master' into cleanup3 2017-12-07 17:11:35 +01:00
Tom M
e4972c5038
Merge pull request #298 from carlo-bramini/winmidi-improvements
Simpler implementation of WINMIDI driver.
2017-12-06 19:22:53 +01:00
derselbst
a4e43d3543 re-introduce fluid_synth_set_gen2()
to reduce API breakage
2017-12-06 12:18:06 +01:00
derselbst
a808e28f8b cleanup winmidi driver 2017-12-05 22:57:28 +01:00
Tom M
e0e319cf30
Merge pull request #294 from FluidSynth/overflow-important-channels
New feature for overflow calculation: specify important channels
2017-12-05 09:22:54 +01:00
Marcus Weseloh
ae48793c28 Replace loop with memset 2017-12-04 18:53:47 +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
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