Commit Graph

2587 Commits

Author SHA1 Message Date
Tom M 86e876f7a0
Merge pull request #849 from chirs241097/wasapi
A few fixes for the WASAPI driver
2021-04-16 18:20:00 +02:00
Chris Xiong 5eff4e592e wasapi: correctly render effects if no custom audio processing is used.
I couldn't find a conceivable use case for calling `new_fluid_audio_driver2`
with `fluid_synth_process` as its callback in client code... So I took the
lazy route.

If custom audio processing is indeed used, nothing would be changed by this
patch. It still gets no effects buffer (like the vast majority of other
drivers).
2021-04-16 18:34:11 +08:00
Chris Xiong 0d627c7c0b wasapi: use device period size in shared mode. 2021-04-16 18:21:36 +08:00
Pedro López-Cabanillas 03fb32c979
WASAPI driver reorganization (#839)
Avoid initializing COM in the caller's thread context.

See also: #833
2021-04-14 09:35:35 +02:00
derselbst 92de920274 Update Windows CI images to windows-2019 2021-04-13 21:29:20 +02:00
derselbst 5988bc6d1c Make sure WinXP builds use statically linked CRT 2021-04-13 21:28:36 +02:00
derselbst b990f765c2 Remove statically linked CRT workaround
Leave it to the user to override CMAKE_MSVC_RUNTIME_LIBRARY.
2021-04-13 21:12:25 +02:00
derselbst ab4eebaf5b Clarify API documentation of fluid_free() 2021-04-13 21:07:37 +02:00
jjceresa 149e08f181
Fix incomplete chorus reverb help strings (#845) 2021-04-12 10:10:03 +02:00
Marcus Weseloh aa966e4c31
Fix a memory leak if a setting is registered multiple times (#844)
If a string setting is registered multiple times, the previous
default value wasn't freed, leading to a memory leak.
2021-04-11 19:32:43 +02:00
Marcus Weseloh aad6288955
Merge pull request #823 from FluidSynth/refactor-and-fix-sffile-defsfont
Refactor of sffile and defsfont code, including some bugfixes
2021-04-11 00:25:43 +02:00
jjceresa c72abf4e0c
Fix typos in fx API documentation (#841) 2021-04-10 22:47:10 +02:00
Marcus Weseloh 7e4c843d7b
Update feature request issue template (#837)
Many discussions happen on GitHub now, so update the issue template
to point people there as well.
2021-04-10 16:34:12 +02:00
derselbst d2754028b4 Merge branch 'master' into refactor-and-fix-sffile-defsfont 2021-04-10 16:30:05 +02:00
Tom M 487156c3ed
Merge pull request #818 from FluidSynth/defsfont-integration-test
Add defsfont integration test
2021-04-10 16:03:31 +02:00
Marcus Weseloh 92947586fb Cross-platform fixes for test utils
Use executable suffix to make test work on Windows and
specify explicit output directory for dump_sfont tool.

Uses a generator expression $<0:> to prevent VS and Xcode from
adding per-config subdirectories to the RUNTIME_OUTPUT_DIRECTORY
2021-04-10 15:44:14 +02:00
Marcus Weseloh 703f158c99 Ensure that we only try to dump font loaded by the defsfont loader
No the cleanest way to check which loader created the sfont,
but as it is just a test tool, it might be good enough...
2021-04-10 15:44:14 +02:00
Marcus Weseloh cc186512ed Add integration tests for defsfont loader
Runs the new dump_sfont utility on the test soundfonts and
compares them against the stored representation. Raise an error
if there are any differences.
2021-04-10 15:44:14 +02:00
Marcus Weseloh 736caf9d21 Add ability to get name of generator from gen index
Used in dump_sfont test utility.
2021-04-10 15:44:13 +02:00
Marcus Weseloh 522b751f4f New dump_sfont utility to output a defsfont as YAML
Intended to be used in integration tests to compare the output
against a previously generated output.
2021-04-10 15:44:13 +02:00
Marcus Weseloh 1b61e1fbd3 Add fluid_list function to find index of data in list
Will be used in the defsfont dump utility.
2021-04-10 15:37:41 +02:00
Tom M 8a39c5aea4
Zone Validation Test (#826)
This is my implementation of a unit test to verify the preset and instrument zone validation behaviour.
2021-04-10 15:33:12 +02:00
Marcus Weseloh 1eda0ae863
Merge pull request #834 from FluidSynth/fix-gcc-warnings
Fix two gcc warnings
2021-04-10 15:27:46 +02:00
Marcus Weseloh 74ccd9cb9d Fix maybe-uninitialized warning in gcc 9.3 2021-04-10 12:06:32 +02:00
Marcus Weseloh 614fcab9cc Fix missing initializer warnings on gcc 9.3 2021-04-10 12:04:05 +02:00
Tom M ebbaff32bf
Fix typo in --help 2021-04-08 13:30:40 +02:00
Vladimir Davidovich 30c899973d
Fix failure to create the audio driver on macOS (#828)
The deprecated Component Manager for hosting Audio Components is not supported when rebuilding against the 11.00 or later SDK.
Co-authored-by: Vladimir Davidovich <thy.ringo@gmail.com>
2021-04-07 21:32:59 +02:00
Tom M 2173fdcab3
Run GitHub Actions on forked pull requests 2021-04-07 21:30:43 +02:00
Tom M ddb13e36c5
Collect coverage during test execution (#825) 2021-04-03 17:34:48 +02:00
Marcus Weseloh 5ebd4d3d26 Speedup SF2 loading by using prepend instead of append on samples
Using prepend both in sffile and defsfont reduces insert complexity
to O(1) and does not affect the final order of the sample list, as
the reversed order of the samples in sffile is reversed again in
defsfont.
2021-03-28 15:00:43 +02:00
Marcus Weseloh 0f8e2c7fde Refactor load_igen and load_pgen
Cleanup of the code structure and fix of the ineffective
check for global zones that are not first in list.

Fixes #813
2021-03-27 22:42:57 +01:00
Marcus Weseloh dfbef11da0 Remove instsamp hack
This change removes the need for the instsamp hack in instrument
and preset zones. The sampleid and instrument generators are
treated as any other generator and simply passed to the defsfont
import functions. Those read the two generators and use the
index to look up valid samples and instruments.

Both generators are then reset to GEN_UNUSED again, just to make
sure that the rest of FluidSynth doesn't get confused. But that might
not be necessary.
2021-03-27 22:42:57 +01:00
Marcus Weseloh 6ca9b21740 Add more invalid generators for presets and instruments
Presets should not contain sampleid generators, instruments
should not contain instrument generators.
2021-03-27 22:42:57 +01:00
Marcus Weseloh 6b63c80d3d Remove code duplication by re-using enum from fluid_gen.h
We already have an enum for all generator values, so there is
no need to define another list in the loader code.
2021-03-27 22:42:57 +01:00
Marcus Weseloh c4d38a7125 Fix preset generator validity checks
The previous implementation used 0 as end-of-list sentinel
value. But 0 is also the id of the first generator in the
invalid_preset_gen list. This effectively prevented checks
for invalid preset generators.

Also contains some code cleanup to make the check for invalid
instrument generators similar to invalid preset generators.

Fixes #821
2021-03-27 22:42:57 +01:00
Marcus Weseloh 259aecedf2 Remove unused macros 2021-03-27 22:42:57 +01:00
Marcus Weseloh 84704ea440 Remove Gen_MaxValid macro
Not really necessary, checking against Gen_Last is just as
understandable and removes a macro.
2021-03-27 22:42:57 +01:00
Marcus Weseloh 359af770a3 Rename Gen_Dummy to Gen_last to clarify the purpose 2021-03-27 22:42:57 +01:00
Marcus Weseloh b61abdd907 Remove unused structs in sffile code 2021-03-27 22:42:57 +01:00
Marcus Weseloh 16d2f43509 Remove unused library, genre and morphology fields
Those fields are not used anywhere, so let's simply remove them.
2021-03-27 22:42:57 +01:00
Tom M 8413c35aca
Fix a regression in fluid_player_stop() (#822)
fluid_player_stop() should not set the STOPPING state, when the player has already finished. Introduced in 676923757c.
2021-03-27 18:35:00 +01:00
derselbst 3f5394a15d Bump version to 2.2.0 2021-03-27 17:46:01 +01:00
Marcus Weseloh 661a06b504
Merge pull request #820 from FluidSynth/player-reset-between-songs
Reset synth after end, not before start of song
2021-03-27 00:49:29 +01:00
Marcus Weseloh 7dd870f498 Update player.reset-synth doc with new behaviour 2021-03-24 20:41:48 +01:00
Marcus Weseloh 9a4b95a742 Reset the synth after the end, not before the start of a song
This change prevents an unnecessary synth reset before the first
MIDI song is played. It allows changing synth parameters via a
config file without having to unset the player.reset-synth setting.
2021-03-24 20:41:18 +01:00
Marcus Weseloh d13c4965e1
Update api_doc_build.yml
Fix ubuntu version to 18.04 to keep doxygen
version stable. Latest ubuntu has a new version
which breaks the current API docs layout
2021-03-19 19:50:40 +01:00
Tom M a3d0a56996
Update API docs
Make breaking changes a bit more obvious.
2021-03-17 20:11:46 +01:00
Tom M c32faa7b17
Parallelize SF2 loading (#812)
The loading of SF2 samples can be parallelized as well, at least for bigger soundfonts like the Stgiga 4GB monster.

The following test is performed with hot-caches:

`time src/fluidsynth -i -a alsa Stgiga\'s\ HiDef\ Soundfont\ \(2019-05-25\).sf2`

Serial version:
```
real    0m15,460s
user    0m14,163s
sys     0m1,192s
```

Parallelized version proposed by this PR:
```
real    0m5,851s
user    0m14,089s
sys     0m1,194s
```
2021-03-17 19:41:33 +01:00
Tom M ea5ebe4813
Merge pull request #815 from FluidSynth/fluid-sffile-variable-renaming
Rename variables in fluid_sffile.c for easier readability
2021-03-16 08:47:28 +01:00
Tom M 5ae72f8c74
Merge branch 'master' into fluid-sffile-variable-renaming 2021-03-15 21:40:16 +01:00