Commit graph

2503 commits

Author SHA1 Message Date
Tom M
e3957306e8
Update default value of audio.driver 2021-05-08 11:27:54 +02:00
Marcus Weseloh
6a67dff3a7 Make ALSA default audio driver on supported platforms
The jack driver has a potential side-effect of starting
a new server. ALSA does not have such side-effects
and therefore makes a better default audio driver.
2021-05-08 11:25:08 +02:00
Tom M
1525a6fc0b
Restore old behaviour of fluid_player_join() (#876)
This basically reverts #783 because it causes a deadlock in existing client code.
2021-05-07 22:50:09 +02:00
Christopher Snowhill
7068c13f71 Handle GM/GM2 mode on, GS reset, and XG reset, and reset the
synthesizer upon setting the mode.
2021-05-07 22:04:57 +02:00
Tom M
4231645fb8
Define _WIN32_WINNT during compilation (#871) 2021-05-07 09:45:17 +02:00
Carlo Bramini
f88f27c0da
[WAVEOUT] Dynamic alloc of WAVEHDR (#873)
It seems that the addition of multichannel output has broken the WaveOut driver.
If you try to run FluidSynth with -a waveout, you will get this message:

fluidsynth: audio.periods 8 exceeds internal limit 4

Actually, the default value for period is set to 8, so it will never work unless you change that value before opening the driver. Rather than lowering the default period value or rising the limit of the number of buffers, in my opinion it would be better to free the driver from this limitation, by allocating the needed amount of memory for WAVEHDR too.
Attached patch fixes this bug.
2021-05-03 20:16:40 +02:00
derselbst
0ea101721a Make users aware of relative sequencer tick error 2021-05-01 15:16:39 +02:00
derselbst
0825e815a8 Elaborate some error messages 2021-05-01 10:00:34 +02:00
Carlo Bramini
10510e486b
[WINDOWS] Fix declaration of GUIDs (try 2). (#868)
Supersedes and closes #867.
2021-04-29 21:03:19 +02:00
Tom M
7b3c2b87f7
Address clang-tidy10 warnings (#860) 2021-04-27 20:28:32 +02:00
Tom M
f69a47081a
Fix MinGW warnings (#861) 2021-04-27 20:27:56 +02:00
Tom M
c8c3966586
Use CHECK_SYMBOL_EXISTS when probing for functions (#859) 2021-04-25 14:49:03 +02:00
Tom M
00806600b6
fluid_compare_func_t const correctness (#858)
fluid_compare_func_t should receive const args.
2021-04-25 13:44:40 +02:00
Carlo Bramini
883ea24960
Remove useless braces. (#855) 2021-04-20 19:40:25 +02:00
Carlo Bramini
52baa228db Remove useless braces.
It is not really clear to me the reason because braces are written into the initialization of channel_mask_speakers[], since their presence causes these messages from the compiler:

fluid_dsound.c:63:5: warning: braces around scalar initializer

In my opinion, it is better to remove them.
2021-04-20 19:40:08 +02:00
Tom M
f55bc7990c
Merge pull request #848 from FluidSynth/crt-free
Make Windows CRT linkage user-selectable
2021-04-16 18:21:25 +02:00
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