Commit graph

2222 commits

Author SHA1 Message Date
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
1f2c301cc3 Build fluidsynth for Android in RelWithDebInfo 2019-10-21 15:16:35 +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
derselbst
82c962afb2 Change Android build badge 2019-10-21 14:21:09 +02:00
derselbst
302dc704cd Split Mac and Windows CI build badges 2019-10-21 13:23:44 +02:00
derselbst
606c4d47b6 Turn implicit function declarations into errors 2019-10-21 13:01:50 +02:00
derselbst
34a18d2480 Update OS icons in README 2019-10-21 09:49:34 +02:00
derselbst
f891b6f2c2 Fix Android build status badge in README 2019-10-20 23:12:04 +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
derselbst
aafc59bde6 Fix Windows Azure Release Build 2019-10-19 18:20:09 +02:00
Tom M
cab46b40c1
Fix incorrect usage of fluid_ct2hz() (#568) 2019-10-18 21:41:43 +02:00
derselbst
3c4861c752 Add a unit test for fluid_ct2hz_real() 2019-10-18 21:03:00 +02:00
Tom M
5919be2ceb
Revise README (#566)
The readme has been revised. Most of the SoundFont related information was moved to the wiki. Obsolete documentation files have been removed.
2019-10-13 10:56:24 +02:00
derselbst
840953f54d Add more Cirrus FreeBSD CI builds 2019-10-07 13:25:12 +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
587fbf2e67 Fix broken previous merge.
Fixes build and closes #567.
2019-10-05 14:24:22 +02:00
derselbst
9ab3e3ab51 Merge branch '2.0.x' into master 2019-09-28 07:38:54 +02:00
derselbst
62b38b1c66 Minor typo in API docs 2019-09-27 16:53:27 +02:00
derselbst
ca7f7047ad Correctly define DEBUG macro 2019-09-27 14:05:13 +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
derselbst
9793c0def3 bump to 2.0.7 2019-09-24 16:23:55 +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
Tom M
7fac580ae3
Merge pull request #561 from FluidSynth/synth-default-mod
Minor cleanups
2019-09-23 18:03:06 +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
jjceresa
5f6914bb34 Add Sostenuto PDF documentation (#559)
This document explains what sostenuto pedal is compared to sustain pedal. It is intended for a musician playing live. It gives information about specifications and implementation in fluidsynth.
2019-09-14 17:19:43 +03:00
derselbst
c6030874ab Merge branch '2.0.x' into master 2019-08-25 11:00:07 +02:00
derselbst
cac2c6bf84 Fix example code in the API docs
order of object creation: audio driver must be last
2019-08-25 10:59:11 +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
dec5e98f23 Bump version to 2.0.6 2019-08-17 18:00:29 +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
Tom M
c596427949
Merge pull request #554 from FluidSynth/quiet-option
Add --quiet option to fluidsynth binary
2019-08-17 12:59:51 +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
c4ebd264ca Update default issue template 2019-08-15 14:31:21 +02:00
Tom M
690f84aeeb Update issue templates 2019-08-15 14:27:48 +02:00