Commit graph

1401 commits

Author SHA1 Message Date
Arthur Chaloin
676923757c
Fix race condition in fluid_player_callback (#783)
Co-authored-by: Arthur Chaloin <arthur.chaloin@gmail.com>
2021-02-27 13:09:48 +01:00
Arthur Chaloin
13185d32b2
Add optional per tick callback to player (#780)
Co-authored-by: Arthur Chaloin <arthur.chaloin@gmail.com>
Co-authored-by: derselbst <tom.mbrt@googlemail.com>
2021-02-26 21:05:31 +01:00
jjceresa
04c30be0b9 update comment 2021-02-08 10:23:01 +01:00
derselbst
66407e2584 Prevent MIDI player from playing immediately after creation 2021-02-08 10:23:01 +01:00
derselbst
2172e1b009 Rename player_step to player_seek 2021-02-08 10:23:01 +01:00
derselbst
9f3eee0dd5 Document player commands which cannot be used in command file 2021-02-08 10:23:01 +01:00
derselbst
d5cb8d312e Fix player_seek command in user command file 2021-02-08 10:23:01 +01:00
jjceresa
77f5bee296
Fix player position displayed in fluid_handle_player_cde() (#775)
This PR fixes the player position displayed in fluid_handle_player_cde() when calling fluid_player_seek().
2021-02-07 22:45:22 +01:00
derselbst
9690c0dd73 Merge branch '2.1.x' into master 2021-02-07 13:52:19 +01:00
derselbst
aebc4837dd Simplify control flow to allow auto-vectorization by compiler 2021-02-07 11:05:33 +01:00
derselbst
25b0503ba7 Avoid audible clicks when rapidly chaning panning 2021-02-07 11:05:33 +01:00
Tom M
0d76403f9f
Parallelize SF3 loading (#746) 2021-02-06 20:32:17 +01:00
jjceresa
616fca3d8d Elaborate out-of-polyphony error message 2021-02-06 16:57:32 +01:00
Tom M
8745f542c2
Merge pull request #747 from FluidSynth/oboe-phil
Update Oboe driver
2021-02-06 10:43:07 +01:00
derselbst
641605294c Introduce audio.oboe.sample-rate-conversion-quality setting 2021-01-30 19:31:51 +01:00
Chris Xiong
712707fe87
Add WASAPI driver. (#754)
This driver is currently tested and verified to work on:
 - Windows Vista x64 VM
 - Windows 7 x64 VM
 - Windows 10 1909 x64 (VM and Laptop)
 - Windows 10 21296 x64 on a ThinkPad X1 Yoga 1st Gen with 3 different sound cards (Conexant CX20753/4, Scarlett Solo Gen 2, Aureon 7.1 USB)

This driver is capable of reaching very low latency in exclusive mode (~6ms on Scarlett Solo with 48kHz).
2021-01-29 18:11:17 +01:00
derselbst
b84e8b83e0 Merge branch '2.1.x' into master 2021-01-29 14:42:04 +01:00
derselbst
dc3d7b8ffa Fix possible NULL deref
when allocation of drybuf fails
2021-01-29 14:07:01 +01:00
derselbst
4d76a6ad85 Restore int16 sample format for waveout and dsound
Addresses #760
2021-01-29 13:59:21 +01:00
jjceresa
8322d95425
Fix waveout driver crash (#759)
This PR addresses issue https://github.com/FluidSynth/fluidsynth/issues/758.

It ensures that the `internal buffer size` used by waveout device driver and the `extra buffers size` required by fluid_synth_process() are both coherent (i.e they should be of same size). To ensure this, both kind of buffers are now dependent of`audio.period` and `audio.period-size settings`.
2021-01-29 13:56:57 +01:00
rncbc
cd28701d52 Allow the MIDI file player restart on-demand (#755)
Resets the default sample timer properly, allowing the internal
MIDI file player to restart its playlist on any other time but
the initial first.

Lets Qsynth play any MIDI files that are drag-n-dropped, anytime
after the first, following synth engine initialization.
2021-01-28 11:25:13 +01:00
derselbst
c7878dec74 Update API docs of fluid_settings_getstr_default() 2021-01-28 11:15:23 +01:00
derselbst
4b5afca76c Fix a double-free when issuing the info command on string setting
Fixes #756.
2021-01-28 10:34:39 +01:00
derselbst
70abf1953f Add a comment for issue #751 2021-01-23 17:50:40 +01:00
derselbst
4fd7899d61 Merge branch '2.1.x' into master 2021-01-23 17:16:26 +01:00
derselbst
fff51822eb Disable floating point underflow exceptions
They often occur in reverb, chorus and IIR and break our CI for no good reason.
2021-01-23 16:00:42 +01:00
Chris Xiong
8e9d361651 chorus: avoid overwriting input buffer when storing samples in the delay line.
In `fluid_rvoice_mixer.c`:`fluid_rvoice_mixer_process_fx()`:

If an audio processing callback is used, `mix_fx_to_out` would be `FALSE`. As a result, `in_ch` and `out_ch_l` points to the same buffer.

In `fluid_chorus.c`:`fluid_chorus_processreplace()`:
```C
        /* process stereo unit */
        /* store the chorus stereo unit d_out to left and right output */
        left_out[sample_index]  = d_out[0] * chorus->wet1  + d_out[1] * chorus->wet2;
        right_out[sample_index] = d_out[1] * chorus->wet1  + d_out[0] * chorus->wet2;

        /* Write the current input sample into the circular buffer */
        push_in_delay_line(chorus, in[sample_index]);
```

Here the chorus processing code writes to the left output buffer (which will overwrite the input buffer in this case) before the sample from the input buffer is stored into the delay buffer, making the chorus output all zeros. If no audio processing callback is used, `mix_fx_to_out` would be `TRUE` and `in` and `left_out` will not point to the same buffer, therefore the order doesn't matter.

Simply swapping the two steps should be a sufficient fix. This patch also apply the same change to `fluid_chorus_processmix` only for the sake of consistency (since they are almost exact copies of each other).

Resolves #751.
2021-01-23 15:49:26 +01:00
derselbst
1fefa4d2f2 Merge pull request #745 from chirs241097/winadrv-cb
Add support for new_fluid_audio_driver2 to dsound and waveout drivers.
2021-01-23 15:08:24 +01:00
Chris Xiong
64121229ea Add support for multiple stereo outputs when callbacks are used. 2021-01-23 15:06:40 +01:00
derselbst
d547b569ad Leave framesPerCallback unspecified 2021-01-22 19:48:54 +01:00
derselbst
998eeee471 Elaborate API docs of fluid_audio_func_t 2021-01-22 19:46:03 +01:00
Chris Xiong
908494524b Consistency changes and removal of other unnecessary stuff. 2021-01-20 11:55:29 +08:00
derselbst
c9c80a5fde Oboe driver can have lower latency 2021-01-19 18:48:52 +01:00
derselbst
2cfd56bb10 Modernize Oboe driver 2021-01-19 18:48:52 +01:00
Chris Xiong
772f62fc91 Add support for new_fluid_audio_driver2 while using the waveout driver. 2021-01-19 10:25:24 +08:00
Chris Xiong
9562ae6009 Add support for new_fluid_audio_driver2 while using the dsound driver. 2021-01-19 10:24:40 +08:00
jjceresa
4f2cb370a1
Add shell commands to the MIDI File Player (#713) 2021-01-15 19:04:02 +01:00
Tom M
ca6bcda7d9
Merge pull request #739 from FluidSynth/parse-cmd3
Handle settings-related commands in user command file early
2021-01-10 12:08:19 +01:00
jjceresa
2cada68e02
Fix MIDI player tempo reset issues (#711) 2021-01-10 12:01:28 +01:00
derselbst
20ff3f866c Avoid unknown command errors when parsing settings early 2021-01-09 19:44:18 +01:00
derselbst
9bb048f27f Don't print warning when parsing early 2021-01-09 18:51:46 +01:00
derselbst
40ed09367a Parse set commands from config file early 2021-01-09 18:51:33 +01:00
Mauro Carvalho Chehab
4e8f570d32 Don't warn when parsing config files
When fluid_shell is called from fluid_source(), is is currently
printing this message:

    Received EOF while reading commands, exiting the shell.

Suppress it.
2021-01-08 23:48:40 +01:00
Mauro Carvalho Chehab
3d805e9a03 Only change a set if the value actually changed
That prevents warnings about changing a non-realtime parameter
set command is issued, but the value is identical to the
previous one.
2021-01-08 23:47:39 +01:00
derselbst
e04cd572cb Merge branch '2.1.x' into master 2021-01-03 21:37:32 +01:00
derselbst
272b3b8717 Update API docs on fluid_synth_sfunload() 2021-01-03 18:30:16 +01:00
jjceresa
cf424de5cf delete_fluid_synth() may not unload soundfonts still used by rvoices 2021-01-03 18:30:16 +01:00
jjceresa
0d38823527 SoundFonts cannot be unloaded if polyphony is ever exceeded
If polyphony is exceeded and FluidSynth has to allocate a voice by
calling fluid_synth_free_voice_by_kill_LOCAL(), two problems occur:

 1)The value returned by fluid_synth_get_active_voice_count() never
   returns back to 0.
 2)SoundFont samples are not unref'd properly, and therefore if an attempt is
   made to unload the SoundFont, the deferred unload timer is started, and
   fluid_synth_sfunload_callback() unsuccessfully tries	to unload the SoundFont forever.

These 2 issues are fixed by this commit.
2021-01-03 18:30:16 +01:00
Tom M
5c1cfe6a5f
Regression tests for #727 (#735)
This PR adds regression tests for #727, ensuring that soundfonts are correctly unloaded via the lazy-timer-unloading mechanism.
2021-01-03 09:42:42 +01:00
Tom M
6339feb106 Update API docs on settings recycling 2021-01-03 09:41:46 +01:00
derselbst
57f40ea91c Fix heap-use-after free 2021-01-03 09:41:46 +01:00
derselbst
03cf8e28f6 Add a unit test for issue 733 2021-01-03 09:41:46 +01:00
Tom M
4bfeff5764
Elaborate API docs on voice state 2021-01-01 22:27:25 +01:00
derselbst
26710f1076 Bump to 2.1.6 2021-01-01 21:26:12 +01:00
jjceresa
0ae16f6a2b
Check first MIDI files then Soundfonts files in fluidsynth.c (#731) 2020-12-31 10:28:12 +01:00
Tom M
a14c70cbbd
Fix the fluid_synth_set_sample_rate() change problem for jack driver (#722) 2020-12-31 10:25:53 +01:00
derselbst
1be0e5ae7c Log error when audio callback function fails
Addresses #724
2020-12-28 18:08:38 +01:00
Tom M
9a25e71b02
Add FLUID_SEQ_SCALE event type (#723) 2020-12-27 17:53:36 +01:00
derselbst
0853cac6a3 Fix doxygen warnings 2020-12-27 10:48:07 +01:00
derselbst
bc056b576b Print error if fluid_is_soundfont() fails 2020-12-22 13:16:30 +01:00
derselbst
3c84dcc816 Update API docs about UTF8 filenames 2020-12-22 11:30:14 +01:00
derselbst
ed34742824 Add log messages to fluid_fopen() 2020-12-22 11:30:14 +01:00
getraid-gg
1cdeebef37 Enable the use of UTF-8 filenames under Windows (#718)
While `fopen` (used through the macro `FLUID_FOPEN`) uses UTF-8 on *nix, it's restricted to ANSI on Windows. A change to enable using paths containing non-ANSI characters was suggested before in issue #128 but was rejected due to requiring large parts of both the public API and private implementation to be modified to accommodate Windows.

This PR instead changes the macro definition for `FLUID_FOPEN` from `fopen` to a new wrapper, `fluid_fopen`. This wrapper is defined in `fluidsynth_priv.h` and defined in `fluid_sys.c` (following the pattern of `fluid_alloc`). Under Windows, it converts the `const char*` UTF-8 parameters to Unicode `wchar_t*` strings using the Windows API function `MultiByteToWideChar` and opens the file using the Windows API-specific `_wfopen`. On all other platforms, it simply calls `fopen`.

The public API is unchanged. This solution will require Windows users of the API to convert UTF-16 strings to UTF-8 (which then get converted back into UTF-16 anyway), but that's still an improvement over only being able to use ANSI paths.

This PR also adds a new test, `test_utf8_open`, which tests `FLUID_FOPEN` directly and through `fluid_is_soundfont` and `fluid_synth_sfload` using a new soundfont file, `sf2/â– VintageDreamsWaves-v2â– .sf2`, which is just a copy of `VintageDreamsWaves-v2.sf2` with Unicode characters in the filename.
2020-12-22 11:30:14 +01:00
Carlo Bramini
f15147d43a
Replace g_ascii_strtoll() with FLUID_STRTOL() (#717) 2020-12-16 09:15:04 +01:00
Carlo Bramini
3719c58246
Make some strings const (#716) 2020-12-16 00:05:28 +01:00
Chris Xiong
9b485fad7c
Handle GS SysEx messages for setting whether a channel is used for rhythm part. (#708)
Some MIDI files that uses the GS standard uses channels other than channel 10 as percussion channel. Currently FluidSynth ignores the messages setting that up, causing notes meant to be played with a drum instrument played with a melodic instrument or vice versa. This patch will partially fix the issue.

Currently the implementation in this patch doesn't cover a specific "quirk" in Roland GS Modules: they seem to remember the last used instrument in the selected mode. This patch simply sets the instrument number to 0 instead.

A test file is attached. If played correctly (with `-o synth.device-id=16`) no out of place drum or piano sounds should be heard.

[wikipedia_MIDI_sample_gstest.mid.gz](https://github.com/FluidSynth/fluidsynth/files/5610727/wikipedia_MIDI_sample_gstest.mid.gz)
2020-11-29 00:20:04 +01:00
Nathan Umali
33c147402b
Update owner of the SoundFont registered trademark. (#706)
As of the time of this PR, the SoundFont registered trademark is owned by Creative Technology Ltd.
http://tmsearch.uspto.gov/bin/showfield?f=doc&state=4803:rj74xq.2.1
http://assignments.uspto.gov/assignments/q?db=tm&qt=sno&reel=&frame=&sno=74325965
2020-11-25 12:31:16 +01:00
jjceresa
c9b187bd85
Fx unit api (#673)
This PR addresses #669 point 2.1.
It proposes set/get API functions to change/read fx unit parameters.
The deprecated shell commands are updated. Now the commands line have 2 parameters:
- first parameter is the fx unit index.
- second parameter is the value to apply to the fx unit.
2020-11-22 21:02:06 +01:00
Marcus Weseloh
a9135faf70 Structure the large synth header into subgroups
Also include version.h and ladspa.h in the Synthesizer group.
2020-11-12 21:27:00 +01:00
Marcus Weseloh
9248032feb SoundFont API
Includes Generators, Modulators, Loader etc
2020-11-12 21:27:00 +01:00
Marcus Weseloh
7f1ac22869 Miscellaneous group 2020-11-12 21:27:00 +01:00
Marcus Weseloh
4a40695541 Settings documentation 2020-11-12 21:27:00 +01:00
Marcus Weseloh
39ae70793a MIDI Seqencer documentation 2020-11-12 21:27:00 +01:00
Marcus Weseloh
4185b25d6f MIDI input group
Contains MIDI Driver, MIDI Router, MIDI Player and MIDI Events
2020-11-12 21:27:00 +01:00
Marcus Weseloh
66b7c19893 Audio output group
With subgroups Audio Driver and File Renderer
2020-11-12 21:27:00 +01:00
Marcus Weseloh
af68288628 Command Shell group for all shell related commands
With subgroups for command handler, shell and server.
2020-11-12 21:27:00 +01:00
Marcus Weseloh
109c41c355
Add public API to pin and unpin presets to the sample cache (#698)
Following the discussion about an API to pin and unpin preset samples in the sample cache here:
https://lists.nongnu.org/archive/html/fluid-dev/2020-10/msg00016.html

Short explanation of the change:

Only the default loader currently supports dynamic sample loading, so I thought it might be a good idea to keep the changes for this feature mostly contained in the default loader as well. I've added two new preset notify flags (FLUID_PRESET_PIN and FLUID_PRESET_UNPIN) that are handled by the preset->notify callback and trigger the loading and possibly unloading of the samples.
2020-10-31 13:23:15 +01:00
jjceresa
032700f4e1
Add hint message when compiled without getopt support (#697) 2020-10-27 17:57:21 +01:00
jjceresa
42819d3e40 avoid an unlikely race condition 2020-10-27 14:01:37 +01:00
Marcus Weseloh
c8fea77528 Fix possible uninitialized use of dry_idx variable 2020-10-26 21:01:59 +01:00
Marcus Weseloh
7fc56567ca Remove unused variable 2020-10-26 20:59:44 +01:00
jjceresa
5b8f3cbbc2
Ensure WaveOut compatibility with Win9X/NT (#687) 2020-10-14 17:54:56 +02:00
Tom M
97615ef2cf
Promote Controller/Pressure/Bend event functions to 32bits (#670) 2020-10-08 16:33:52 +02:00
derselbst
d64ab70709 Fix build on Windows 9x/ME
Addresses #679
2020-10-04 20:42:08 +02:00
derselbst
94dbb9601e Add proper unicode support to Windows error reporting 2020-10-04 13:40:26 +02:00
derselbst
66d916a34a Fix Windows build 2020-10-04 13:32:38 +02:00
derselbst
abc89d7d6c Improve error reporting in Waveout and DSound drivers 2020-10-04 13:21:15 +02:00
jjceresa
b5da68393c
Fix minor bug in windows audio driver (#680) 2020-10-04 12:39:54 +02:00
jjceresa
b55884b273
Make winmidi driver multi devices capable. (#677) 2020-09-27 14:22:56 +02:00
derselbst
90ba627794 Remove a FIXME 2020-09-13 13:38:38 +02:00
derselbst
e48e48121b Remove a FIXME
Not aware of any problems caused by the old glib thread API. It will be removed sooner or later anyway.
2020-09-13 13:38:38 +02:00
derselbst
f6038ea194 Add comment into empty block 2020-09-13 13:38:38 +02:00
derselbst
dceb6e9835 Remove a FIXME
I have no clue what it refers to or what it's meant by that.
2020-09-13 13:38:38 +02:00
derselbst
c94ccdfed1 Remove a FIXME
I don't see any 'allocation' of preset. And ALL public synth functions have a mutex lock which might potentially block when called from synth context, but only then if the client app pessimizes this situation by extensively calling the synth from outside the synth context.
2020-09-13 13:38:38 +02:00
derselbst
0b8fa2e386 Remove a FIXME
I don't see any problem calling fluid_channel_init() from within synth context
2020-09-13 13:38:38 +02:00
derselbst
18fdafe37f Fix another NULL dereference
Access to field 'zone' results in a dereference of a null pointer (loaded from variable 'pr'), if size is negative. However, size should be unsigned.
2020-09-13 13:38:38 +02:00
derselbst
c4cd8bfc24 Fix a NULL dereference
Access to field 'zone' results in a dereference of a null pointer (loaded from variable 'prev_preset'), if `size` is negative. Problem is: Parameter `size` is `chunk.size` and should be unsigned.
2020-09-13 13:38:38 +02:00
derselbst
ec74ed905b Fix an impossible NULL deref 2020-09-13 13:38:38 +02:00
derselbst
7ff98227c6 Remove dead code 2020-09-13 13:38:38 +02:00
Tom M
4c1292d8ab
Remove fluid_event_any_control_change() from public API (#674)
Originally, I have only marked it deprecated. But since we have an SOVERSION bump next release and because this function was only meant for internal usage, I think it's safe to remove it right now.
2020-09-12 10:40:57 +02:00
derselbst
6776569abe Deprecate fluid_event_any_control_change() 2020-09-11 22:22:35 +02:00
derselbst
23b270c08b Merge branch '2.1.x' into master 2020-09-06 14:54:26 +02:00
jjceresa
f94cee0a50
Add multi channels support for audio driver. (#667)
This PR addresses #665.

1) Add new functions for multi channels support: `fluid_synth_write_float_channels()`, `fluid_synth_write_s16_channels()`
2) `dsound` and `waveout` driver make use of this support. tested on 2 audio devices: 
    - creative SB Live! (6 channels).
    - Realtek: ALC889A (8 channels).
2020-09-02 21:31:50 +02:00
jjceresa
57af8803f2
Mapping of fx unit output to dry buffers in mix mode. (#668)
Currently, all fx unit output (in mix mode) are mapped to the `first buffer`.
This is not appropriate for synth.audio-groups > 1

This PR allows the mapping of fx output based on `fx unit index` and `synth.audio-groups` value.
This allows us to get the `fx output `mixed to the respective  `buffer` on which a `MIDI channel` is mapped.
For example: with `synth.audio-groups = 3` and  `synth.effect-groups = 3`:
- MIDI chan 0 (dry + fx0) is mapped to buf 0
- MIDI chan 1 (dry + fx1) is mapped to buf 1
- MIDI chan 2 (dry + fx2) is mapped to buf 2
2020-09-02 21:10:31 +02:00
Tom M
aea6644324
Use a runtime check to detect version of libinstpatch (#666)
It could be that during runtime an older version of libinstpatch is used than the one fluidsynth was compiled against. In this case, libinstpatch will fail to load DLS fonts, because libinstpatch's initialization semantics don't match those compiled into fluidsynth.
2020-08-31 20:35:21 +02:00
jjceresa
c76949e6d3
Limiting audio-channels to audio-groups (#663) 2020-08-22 13:24:41 +02:00
derselbst
fa6f9c3570 Remove unused member variable 2020-08-17 18:23:43 +02:00
derselbst
4b83ee55c0 Merge branch '2.1.x' into master 2020-08-10 20:35:42 +02:00
jjceresa
3ee2bbed96 fix NULL permitted for out and fx pointer buffer
Closes #659
2020-08-10 20:33:42 +02:00
Tom M
31c4e12ac9
Update Travis CI (#658)
* update to Ubuntu Focal
* use clang10
* avoid unintentional fallbacks to  default `/usr/bin/c++` compiler
* fix related compiler warnings
2020-07-28 21:05:01 +02:00
derselbst
3c94f6366d Merge branch '2.1.x' into master 2020-07-12 13:03:59 +02:00
derselbst
2393aef3bd Fix printf format warnings 2020-07-12 12:55:32 +02:00
derselbst
62b715483f Merge branch '2.1.x' into master 2020-07-09 19:39:21 +02:00
derselbst
d7abe8bdfd Fix a possible race condition during midi autoconnect 2020-07-09 19:30:32 +02:00
derselbst
eac0de0345 Fix a NULL deref in jack driver 2020-07-09 19:10:11 +02:00
derselbst
85f94c61c9 Fix passing arguments from incompatible pointer type 2020-07-08 19:20:13 +02:00
derselbst
d73135fc48 Merge branch '2.1.x' into master 2020-07-05 16:32:47 +02:00
derselbst
c5293fc753 Fix an uninitialized memory access
that could possibly trigger an FPE trap for instruments that use the exclusive class generator
2020-06-28 14:58:02 +02:00
derselbst
4261848dd4 Fix regression introduced in a89399476e
Mentioned commit broke fluid_synth_start() when using a DLS soundfont.
2020-06-26 17:38:49 +02:00
Tom M
aa32da0a47
Properly handle overlapping notes when using fluid_event_note() (#637) 2020-06-15 08:38:56 +02:00
Tom M
e16ca05a58
Avoid num_samples from becoming negative (#653)
For Soundfonts bigger 2GiB, num_samples becomes negative. When being passed to safe_fread() it's promoted to long long and when being passed to fread(), it's cast to size_t. Works fine in twos-complement, but still is not nice.
2020-06-08 09:24:23 +02:00
Tom M
0d98c47545
Revise the sequencer's event queue (#604)
Proposing a new event queue for the sequencer, based on prior discussion:
https://lists.nongnu.org/archive/html/fluid-dev/2019-12/msg00001.html

With this change fluidsynth will require a C++98 compliant compiler.

Consider this as RFC, feedback is welcome.

The "pain-points" from the discussion:

#### 1. It is slow.

Done (thanks to heap sort), see runtime of `test_seq_event_queue_sort`.

#### 2. A meaningful ordering for events with the same tick has not been considered.

Done, see comments in `fluid_seq_queue.cpp`.

#### 3. Complicated implementation

Now uses one single event queue, which requires C++98. Implemented similarly to std::priority_queue by using heap sort.

The "queue" I use currently is of type `std::deque`. `deque` does not provide preallocation. `std::vector` does provide it. However, `std::deque` has the huge advantage that appending additional elements is cheap. For `std::vector` appending new elements would require to reallocate all the memory and copy it to the new array. So,

* either use `std::deque` with the risk that memory allocation may occur during `fluid_sequencer_send_at()`, or
* use `std::vector` with a preallocated pool of events and make `fluid_sequencer_send_at()` when the `vector` runs out of capacity.

Comments?

#### 4. Events that have been processed are deleted and gone.

After having thought about this more, this is the correct behavior. After events have been dispatched, they must be released to free underlying memory, see point 3. For the very rare case that a client (e.g. fluid_player) may require those events in the future, the client should be responsible for storing the events somewhere.

#### 5. The sequencer supports the system timer as alternative time source.

The conclusion from the mailing list was that the system timer can be removed. This has been done.

#### 6. Time Scaling

Time scaling can now be used for arbitrary tempo changes. The previous implementation was capable of that as well, however, the time-scale was limited to 1000. The only limitation for the scale is now >0, see `test_seq_scale`.

### Other Points

* `fluid_sequencer_remove_events()` turned out to be broken before, as it did not remove all events from the queue. This has been fixed, see `test_seq_event_queue_remove`.

* Consider the following code executed by `threadA`:

```c
fluid_sequencer_send_at(event0);
fluid_sequencer_set_time_scale(); // new scale
fluid_sequencer_send_at(event1);
```

The new scale will be definitely applied to `event1`. However, if another concurrently running `threadB` executes `fluid_sequencer_process()`, it was previously not clear, whether the new scale was also applied to event0. This depends on whether `event0` was still in the `preQueue`, and this depends on `event0.time` and the tick count that `fluid_sequencer_process()` is being called with. This has been changed. As of now, events are queued with their timestamp AS-IS. And only the latest call to `fluid_sequencer_set_time_scale()` is being considered during `fluid_sequencer_process()`. This makes the implementation very simple, i.e. no events need to be changed and the sequencer doesn't have to be locked down. On the other hand, it means that `fluid_sequencer_set_time_scale()` can only be used for tempo changes when called from the sequencer callback. In other words, if `threadA` executes the code above followed by `fluid_sequencer_process()`, `event0` and `event1` will be executed with the same tempo, which is the latest scale provided to the seq. Is this acceptable? The old implementation had the same limitation. And when looking through the internet, I only find users who call `fluid_sequencer_set_time_scale()` from the sequencer callback. Still, this is a point I'm raising for discussion.
2020-05-26 17:16:22 +02:00
Tom M
9995fd88b2
Support loading SoundFonts >2GiB on Windows (#629)
Since sizeof(long) == 4 even on 64 bit Windose, big files cannot be
loaded natively via the ANSI C file API. This change makes fluidsynth's
file callback API use long long, which is guaranteed to be at least 64
bit wide.
2020-05-26 16:53:59 +02:00
derselbst
19a20eb852 Fix another NULL deref related to #635 2020-05-23 15:31:48 +02:00
derselbst
a865ac33d9 Remove SDL2 not inited warning for upcoming release
Addresses #649
2020-05-19 19:44:47 +02:00
derselbst
9ad2bcaa10 Quote MIDI device names
Addresses #650
2020-05-19 16:39:07 +02:00
derselbst
4f1fdc0df7 Fix unicode string comparison 2020-05-19 16:39:07 +02:00
derselbst
45efbd97c0 Revise log messages in new_fluid_winmidi_driver()
Addresses #650.
2020-05-19 16:39:07 +02:00
derselbst
69e7eca670 Fix notes not being played that start at the value of seek_ticks
Fixes #646
2020-05-17 09:56:35 +02:00
jjceresa
d63524683f
Fix ordering of operations (#647) 2020-05-09 09:31:51 +02:00
derselbst
304096add7 Update API docs about synthesis context 2020-05-02 20:12:01 +02:00
jjceresa
8a3eaf9b18
Make fluidsynth call ipatch_close() (#644) 2020-05-02 14:31:34 +02:00
derselbst
87a6debba0 Replace custom version check by GLIB_CHECK_VERSION 2020-05-02 13:42:10 +02:00
derselbst
87c7599e63 Remove unused variable 2020-05-02 13:24:33 +02:00
jjceresa
6aea18bef4
Allow the reverb to pre allocate delay lines. (#638)
This PR allows the reverb to pre-allocate the memory needed for the maximum sample-rate of the synth. That means that on sample rate change there are no memory allocation and the function fluid_revmodel_samplerate_change() should always return FLUID_OK.

The PR addresses discussion in #608.
2020-05-01 13:26:52 +02:00
jjceresa
791dac6736
Stop dsound properly. (#642)
Stopping `dsound `before stopping `audio thread` avoid dsound playing transient glitches between the time audio task is stopped and dsound will be released. These short trailing glitches are particularly audible when captured by a reverb connected on output.
2020-04-30 19:51:24 +02:00
Tom M
e2d435dad6
Fix a NULL deref in delete_rvoice_mixer_threads() (#641)
The function attempts to lock a mutex that might have not been created yet, due to a previous error.
2020-04-30 19:49:58 +02:00
jjceresa
ff14432cd9
Make chorus capable of sample rate change. (#639) 2020-04-27 18:07:22 +02:00
Tom M
a89399476e
Fix a NULL pointer deref if dynamic-sample-loading is enabled (#636) 2020-04-25 17:26:21 +02:00
derselbst
85cf123d38 Guard against multiple calls to fluid_player_seek()
Addresses #634
2020-04-22 17:28:47 +02:00
derselbst
893f48e4a2 Amend 69cfa781eb
Remove incorrect atomic read from player->seek_ticks. Addresses #634
2020-04-20 15:57:59 +02:00
derselbst
69cfa781eb Fix a race condition while fluid_player is seeking
Fixes #634
2020-04-19 12:08:48 +02:00
derselbst
f15b8e5447 Update API docs
for fluid_get_sysconf() and fluid_get_userconf()
2020-04-18 23:56:59 +02:00
Tom M
85237e4fc8
Fix cross-compilation from Win32 to ARM using vcpkg (#630)
For some reason, the configure command must be specified explicitly in the `gentables` build step. Otherwise, the ARM target compiler will be used to build `make_tables` rather than the host compiler. 

Now that microsoft/vcpkg#10485 has been completed, an ARM CI build can be added to AppVeyor. Also, the build status table in the README has been updated.
2020-04-08 11:13:42 +02:00
derselbst
631c9798cb Update API docs on fluid_player_set_bpm()
Resolves #624
2020-03-20 19:57:43 +01:00
derselbst
eff728753b Update API docs 2020-03-08 09:55:09 +01:00
Tom M
cc85d285b5
Fix a memory leak in Oboe driver (#626) 2020-03-07 14:15:13 +01:00
Tom M
c9d023230a
Add verbose error logging for opensles and oboe (#627) 2020-03-07 14:14:28 +01:00
derselbst
cabb219285 Update API docs 2020-03-07 13:42:09 +01:00
derselbst
ddbd0afcc8 Fix a possible NULL dereference 2020-03-03 16:48:24 +01:00
derselbst
33f687704f Exit with error when invalid commandline arguments are supplied
Resolves #623
2020-03-03 16:46:50 +01:00
derselbst
a359e7f222 Turn SDL2 initialization message into a warning
Resolves #622
2020-03-03 16:15:32 +01:00
derselbst
7ea9e21081 Fix build of OSS driver if soundcard.h is not in sys/ 2020-02-16 16:43:20 +01:00
derselbst
ab15b32656 Bump to 2.1.1 2020-02-16 15:59:11 +01:00
derselbst
d5424462b5 Update documentation of --verbose option 2020-02-14 13:40:50 +01:00
Tom M
aa3f5a52fd
Make printing debug messages runtime configurable (#619)
Supplying --verbose to the fluidsynth executable now prints debug messages to stdout. Debug messages are still being printed by default when fluidsynth was compiled in debug mode.
2020-02-13 17:09:20 +01:00
Tom M
2bbe9272bb
Merge pull request #614 from FluidSynth/sfsampletype
Hardening fluid_sample_validate() against invalid flag combinations
2020-02-13 17:07:57 +01:00
derselbst
b3939138d4 Extend error logging in alsa driver 2020-02-08 18:55:26 +01:00
derselbst
2759d9e087 Remove unused member SFSample::samfile 2020-02-02 15:25:53 +01:00
derselbst
df58a440f2 Warn if ogg sample is not ogg compressed 2020-02-02 15:19:27 +01:00
derselbst
93a170ca58 Minor API doc update 2020-02-01 14:37:35 +01:00
Tom M
af2342ac43
Solve the sequencer client unregistering problem (#610)
Responsibility for calling fluid_sequencer_unregister_client() in case of FLUID_SEQ_UNREGISTERING events has been moved to fluid_sequencer_send_now(). In other words, a FLUID_SEQ_UNREGISTERING event now really unregisters the client, no matter how the client's callback function looks like.

Avoids leaking the sequencer clients if implementations do not unregister them explicitly.

Also fixes another memory leak if fluid_sequencer_register_fluidsynth() clients were unregistered with fluid_sequencer_unregister_client() rather than by sending an unregistering event.
2020-02-01 14:32:35 +01:00
derselbst
dcc9c27acf Hardening fluid_sample_validate() against invalid flag combinations
e.g. unknown compression types, multiple exclusive flags or no flags at all
2020-01-24 15:57:08 +01:00
derselbst
5070fe8419 Attempt to fix double free in jack driver 2020-01-23 14:43:42 +01:00
derselbst
5b3ec92cec Fix a memory leak in the file renderer 2020-01-19 16:17:00 +01:00
Tom M
c85ad53d60
Deprecate usage of the system timer for the sequencer (#599)
Deprecate usage of the system timer for the sequencer and print a warning if the system timer is used.
2020-01-19 15:37:42 +01:00
Tom M
3610372ae5
Workaround for jack sample rate mismatch (#607)
During the creation of a jack audio driver, it is checked whether the sample-rate of the settings object matches jack's rate. If not, it was adjusted previously via fluid_synth_set_sample_rate(). Due to the deprecation of that function and removal of real-time capability of the synth.sample-rate setting, a regression was introduced in 5fbddcecc3 causing the synth's sample-rate to be not updated.

This workaround obtains the synth via the settings instance and for now calls the deprecated sample-rate set function.
2020-01-19 15:36:15 +01:00
derselbst
7f816029ab Fix a few integer truncation warnings 2020-01-10 17:07:58 +01:00
derselbst
6b42f27724 Remove redundant call to fluid_event_set_time()
It's already done by fluid_sequencer_send_at()
2020-01-02 11:14:25 +01:00
derselbst
68371d382b Update API doc of fluid_sequencer_add_midi_event_to_buffer() 2020-01-02 11:14:04 +01:00
luz.paz
45f8e0a868 Fix various typos
Found via `codespell -q 3 -L uint -S ./ChangeLog -L dur`
2019-12-17 20:11:49 +01:00
derselbst
13c6e98936 Guard the sequencer API 2019-12-14 18:38:27 +01:00
Tom M
cd199cfdc8
Remove unused tracing code from sequencer (#596) 2019-12-14 18:09:29 +01:00
derselbst
4af42bd8ea Update API docs about queuing seq events 2019-12-13 16:02:25 +01:00
derselbst
08848864d2 Elaborate API docs
fluid_synth_all_sounds_off() and fluid_synth_all_notes_off()
2019-12-06 17:24:58 +01:00
Foster McLane
19eacc6b60 Fix undefined behaviour in get_num_outputs in CoreAudio driver (#594)
See discussion in #591 for details. Basically an incorrect size was
being allocated for the CoreAudio buffer list for a device. It was being
allocated by a VLA (which already did not quite fit the semantics of the
list) and the length calculated could be 0 (instead of the size of the
struct with no buffers elements) causing undefined behaviour.

This corrects it to allocate the amount of memory required by the
CoreAudio framework function and adds a check for the size retrieval and
for the dynamic allocation. This change passed UBSan in my test where
before the change it did not.

Fixes #591
2019-11-13 22:13:54 +02:00
jjceresa
bebb5571ae Make Fine Tune destination of default modulator Pitch-Wheel-To-pitch (#590) 2019-11-08 21:26:07 +01:00
Tom M
99268a3e99
FIXME: ensure that the decompressed OGG sample is 16-bit mono (#589) 2019-11-08 16:13:28 +01:00
Tom M
56e0cfd7c1
Merge pull request #586 from FluidSynth/typecheck-fluid-log
Improve type-checking of fluid_log() format specifiers
2019-11-04 16:44:51 +01:00
Tom M
4c980c5860
Remove unused macros from config.h (#588) 2019-11-04 16:44:32 +01:00
derselbst
77ad8c1c87 Replace LASH_ENABLED by HAVE_LASH
As recommended in #587
2019-11-03 12:34:50 +01:00
Carlo Bramini
47e6cdaf50 Remove redundant check on HAVE_LASH (#587) 2019-11-03 12:32:49 +01:00
derselbst
5fbddcecc3 Remove real-time capability from synth.sample-rate setting
Addresses #585
2019-11-03 11:11:02 +01:00
derselbst
60bcdd4457 Add deprecation attribute to fluid_synth_set_sample_rate() 2019-11-03 10:55:29 +01:00
derselbst
0541864628 Fix incorrect printf format specifiers 2019-11-03 09:30:26 +01:00
derselbst
405d4bc48b Move global variable delay_length to inner scope 2019-11-03 09:20:41 +01:00
derselbst
a7162f1ef1 Fix -Wsign-compare in fluid_chorus.c 2019-11-03 08:43:46 +01:00
derselbst
accae4ef82 Add missing header guards 2019-11-03 08:41:20 +01:00
jjceresa
fdbd13e77c Make reverb output independent of sample rate (#584)
Fixes #581
2019-11-01 16:26:46 +01:00
derselbst
56dd87ebf1 Deprecate fluid_synth_set_sample_rate()
Addresses #585
2019-10-31 09:29:55 +01:00
derselbst
f7eb9e0c17 Make fluid_is_soundfont() DLS aware 2019-10-31 08:47:14 +01:00
jjceresa
d4b3a08f53 fix comment in fluid_rvoice_calc_amp() (#583) 2019-10-27 18:05:18 +01:00
derselbst
e739246ef7 Fix broken #ifdef 2019-10-27 17:10:33 +01:00
derselbst
644668a776 Merge branch '2.0.x' into master 2019-10-27 16:52:45 +01:00
Tom M
38b929e501
Fix broken voice mixing (#582)
This fixes a regression introduced in 907ec27a9e

When rendering a voice, there are 3 cases to consider: silent, playing,
and finished. When optimizing away the memset, I incorrectly assumed that
a voice cannot switch between playing and silence (like crazy) while
rendering FLUID_MIXER_MAX_BUFFERS_DEFAULT. Apparently this does not
hold true, esp. when rendering at sample rates ~96kHz.
2019-10-27 16:45:07 +01:00
derselbst
68c7989d0d Ensure NDEBUG disables assertions 2019-10-27 09:40:37 +01:00
Tom M
59be52ea3b
fluidsynth exec: let option -j connect MIDI devices as well (#578) 2019-10-26 12:28:16 +02:00
derselbst
64d4fe0402 Fix chorus buffer line being partly uninitialized 2019-10-25 15:26:27 +02:00
jjceresa
ee5294c060 move fluid_profile_ref_var() (#577) 2019-10-23 19:56:22 +02:00
jjceresa
0288466f40 Chorus enhancement. (#548)
This adds new LFO modulators:
 - these modulators are computed on the fly, instead of using lfo lookup table. Advantages:
      - Avoiding a lost of 608272 memory bytes when lfo speed is low (0.3Hz).
      - Allows to diminish the lfo speed lower limit to 0.1Hz instead of 0.3Hz.
        A speed of 0.1 is interesting for chorus. Using a lookup table for 0.1Hz
        would require too much memory (1824816 bytes).
      - Make use of first-order all-pass interpolator instead of bandlimited interpolation.
      - Although lfo modulator is computed on the fly, cpu load is lower than using
        lfo lookup table with bandlimited interpolator.

Also adds a stereo unit controlled by WIDTH macro. WIDTH [0..10] value define a stereo separation between left and right.
 - When 0, the output is monophonic.
 - When > 0 , the output is stereophonic.

 WIDTH is currently fixed to maximum value to provide maximum stereo effect.
2019-10-23 16:41:13 +02:00
derselbst
171f3396a4 Format fluid_synth_write_*() 2019-10-23 14:33:34 +02:00
derselbst
988ec6d799 Add proper fluid_ret_val_if_fail checks for rendering functions 2019-10-23 14:33:34 +02:00
Carlo Bramini
8aef0930c6 Speedup rendering functions (#573) 2019-10-23 13:33:22 +02:00
derselbst
eef361eb35 Update API doc of fluid_synth_noteon() 2019-10-22 18:12:50 +02:00
Tom M
64cee5537d
Handle deprecation of GTimeVal (#575)
`GTimeVal` has been deprecated in glib 2.62 . While switching to `g_get_monotonic_time()`, I realized that we could simply reuse `fluid_utime()` for that purpose.
2019-10-22 17:39:08 +02:00
derselbst
dfcf5c019f Add a unit test for fluid_synth_write_float 2019-10-22 16:08:41 +02:00
derselbst
5a42e8147f Extend comment in fluid_ct2hz_real() 2019-10-22 14:37:08 +02:00
Tom M
fa7354a336
More efficient implementation of fluid_ct2hz() (#569)
This provides a less branchy and therefore more instruction-cache-friendly version of fluid_ct2hz(), which also significantly reduces the number of floating-point comparisons.
2019-10-22 13:09:42 +02:00
derselbst
41e77afe84 Merge branch '2.0.x' into master 2019-10-22 11:39:42 +02:00
Stefan Westerfeld
50dd443c20 Fix bugs in fluid_sample_set_sound_data with copy enabled
- memset should clear all the memory
- end position should be at the end of sample data

Closes #576

Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
2019-10-21 21:03:14 +02:00
derselbst
ca5108d81c Fix "declaration-after-statement" in opensles driver 2019-10-21 14:35:17 +02:00
derselbst
6e45cfc308 Move declaration of fluid_alloc() to fluidsynth_priv.h
Fixes build of opensles, oboe and coreaudio.
2019-10-21 14:27:05 +02:00
Jon Latané
d312def0ce Android CircleCI Build (#574) 2019-10-20 23:09:23 +02:00
Carlo Bramini
6895731df2 Remove GLIB macros for int <=> pointer conversion (#572)
The synthesizer is using stdint types for a long time, perhaps for consistency, it would be worth to get rid of the GLIB macros for integer to pointer conversion and viceversa, and use just a type cast for that purpose.
2019-10-19 18:25:31 +02:00
Tom M
cab46b40c1
Fix incorrect usage of fluid_ct2hz() (#568) 2019-10-18 21:41:43 +02:00
derselbst
bf06638178 Add missing declaration of fluid_alloc to fluid_instpatch 2019-10-05 16:55:26 +02:00
derselbst
d80c704a7b Merge branch '2.0.x' into master 2019-10-05 16:55:10 +02:00
derselbst
a94bc82a3c Initialize allocated memory to garbage
for debug builds.
2019-10-05 16:43:53 +02:00
derselbst
24e7c5090b Minor update to the synth API 2019-10-05 14:43:17 +02:00
derselbst
9ab3e3ab51 Merge branch '2.0.x' into master 2019-09-28 07:38:54 +02:00
derselbst
44453ff232 Ensure the reverb engine is initialized after synth creation
The parameters (roomsize, level, etc.) of the reverb effects unit are initialized at the very end of `new_fluid_synth()` with `fluid_synth_set_reverb_full_LOCAL()`.
This however only adds an update-event to the `rvoice_mixer` queue.
The call to `fluid_synth_process_event_queue()` in `new_fluid_synth()` should make sure, that this event is dispatched and triggers the actual update.
However, the event is not dispatched immediately, because the rvoice event queue has not been committed yet, that is, a call to `fluid_rvoice_eventhandler_flush()` is missing.

So, although a reverb param initialization event has been queued, the reverb params still are garbage initialized (on Windows to some `-6.2774385622041925e+66`).

The next call to through the synth's public API will flush the queue and finally dispatch the update event, but when will it happen?

1. If the soundfont is specified as command-line argument, this call will happen before the audio driver starts rendering.
2. If the soundfont is loaded via shell command `load`, the audio driver will first start rendering audio, after updating the reverb.

Case 1. is trivial, everything works as it should.
Case 2. is interesting. Since the synth already started rendering audio by using that uninitialized reverb unit, the reverb engine's internal buffer is completely filled up with noise. Before outputting that signal to sound card, the sound is clipped to `1.0f`. That's the click we hear at the beginning. And because the reverb is so loud, the rendered audio signal stays 1.0f for quite a long time (...or always, can't tell).

Why is it not reproducible on Linux? Because GCC and Clang (AFAIK) leave all values uninitialized after allocating memory. And because malloc() often return zero-initialized memory, the reverb params seem to be nicely zero-initialized. MSVC however, always initializes memory with garbage, which is why we "hear" this resonance disaster.

Solution: Just update the reverb params via public API, which implicitly calls `fluid_rvoice_eventhandler_flush()`.

Fixes #563.
2019-09-27 14:01:40 +02:00
Tom M
17042f4dc1
Add a public wrapper function for free() (#562)
to allow proper deallocation for programming languages other than C.
2019-09-24 16:14:34 +02:00
jjceresa
22142245ca fix comment in fluid_synth_remove_default_mod() 2019-09-22 16:12:32 +02:00
jjceresa
02134d6959 optimize fluid_delete_synth() 2019-09-22 03:21:09 +02:00
jjceresa
b9421409aa optimize fluid_synth_remove_default_mod() 2019-09-22 02:56:14 +02:00
jjceresa
c4c05533bb check mode param beforehand in fluid_synth_add_default_mod() 2019-09-22 02:53:10 +02:00
derselbst
1e7a5f594d Merge branch '2.0.x' into master 2019-08-19 16:39:36 +02:00
derselbst
f78486a50b Update developer docs 2019-08-17 18:01:01 +02:00
derselbst
6d8f338d42 Fix order of object creation in fluidsynth binary
Fixes a use-after-free when the MIDI player is deleted before the audio
driver, because the synthesis thread is still actively making callbacks
on the sample timer, which is deleted by the player though.
2019-08-17 16:17:00 +02:00
derselbst
686556decc Fix documentation of fluid_player_stop()
Addresses #550
2019-08-17 16:04:14 +02:00
derselbst
58022a11fa Regression fix for fluid_player_join()
df893bbfa4 caused to wait for the system timer thread to join for ever.
2019-08-17 16:04:14 +02:00
Tom M
5351d9dcb9
Fix various memory leaks in the fluidsynth binary (#555) 2019-08-17 14:36:35 +02:00
Marcus Weseloh
bfe954a0fe Supress log messages < PANIC on Windows
As Windows logs to stdout by default.
2019-08-17 11:32:55 +02:00
Marcus Weseloh
1b2e61519a Add quiet mode option to fluidsynth binary
Enabling the option supresses the default welcome message and
some other text output that normally gets printed to stdout.

It also slightly changes the way the welcome message and argument
errors are handled: in case of an argument error, the welcome message
is never printed.
2019-08-17 09:51:28 +02:00
derselbst
81a86e33ab Correctly restart playback after fluid_player_stop()
Fixes #550
2019-08-15 16:21:12 +02:00
derselbst
df893bbfa4 Fix use-after-free in fluid_player_stop()
Previously, sample timers were deleted in fluid_player_stop() which caused a use-after-free when at the same time the sample timers were advanced by the synthesizer thread. This was incorrectly addressed in 5d3f727547 . Deleting sample timers is now done in delete_fluid_player(). A broken application could still crash if it does not respect the order of object creation though. At least now, this issue is properly documented.
2019-08-15 16:18:55 +02:00
derselbst
03511aef3a Merge branch '2.0.x' into master 2019-08-08 19:51:44 +02:00
Tom M
5c795791c1
Suppress abort() dialog on windows (#549) 2019-08-06 17:29:49 +02:00
derselbst
743601930a Fix two uninitialized memory accesses in new_fluid_synth()
In an out of memory situation, fluid_synth_t::voice and fluid_synth_t::channel may not be fully initialized, causing a NULL dereference and heap corruption in delete_fluid_synth().
2019-08-02 15:09:29 +02:00
derselbst
6a6015f047 Fix build if -Denable-fpe-check=1 on windows 2019-08-02 13:53:14 +02:00
Carlo Bramini
d6c51cd2cc Aid constant folding in fluid_rev.c (#547) 2019-07-16 17:47:25 +02:00
derselbst
bbbb499efd Remove unused member fluid_defpreset_t::defsfont 2019-07-11 20:58:13 +02:00
Carlo Bramini
a02f1379d8 Add support for C99 math functions, if available (#545) 2019-07-07 11:02:31 +02:00
derselbst
2be598b8e9 Amend documentation of fluid_synth_set_gen() 2019-07-02 18:38:19 +02:00
derselbst
db1740b7e9 Avoid conflicts with libinstpatch's default SF2 modulators
By default, libinstpatch silently adds all SF2 default modulators to the
converted DLS voices. Since fluidsynth respects the modulators provided
by libinstpatch, those modulators would conflict with the default
modulator list managed by fluidsynth. This is only noticeable, if the
user used fluidsynth's API to manipulate default modulators.
2019-07-02 14:15:00 +02:00
derselbst
c093b20c31 Fix premature exit of the fluid_shell on WinXP
When compiled with compatibility for WinXP (toolset v141_xp), read() may return 0 (EOF) rather than '\n' which led to an early exit of the shell after a single user input.
2019-06-29 09:10:07 +02:00
Carlo Bramini
0b17a84ced Cleanup floating-point arithmetics (#543)
* avoid unnecessary floating-point promotion to double when compiled `WITH_FLOAT==1`
* remove redundant calculations and reorder floating-point constants to allow better constant folding
2019-06-27 17:20:13 +02:00
Tom M
030a497aa5
fix build with glib < 2.28 (#540)
g_clear_object() was not yet available
2019-06-22 10:22:23 +02:00
Carlo Bramini
580a4d16e0 Make const string really const (#536) 2019-06-09 13:30:43 +03:00
Tom M
e49b5ed201
Support Loading DLS Files (#493)
Fixes #320
2019-05-11 05:31:56 +02:00