Commit graph

1321 commits

Author SHA1 Message Date
derselbst
69113aad89 Format Pipewire driver 2021-12-11 17:00:30 +01:00
derselbst
3bc4e88903 Use FLUID_FREE 2021-12-11 17:00:04 +01:00
derselbst
94c459970e Fix pipewire build 2021-12-11 16:59:36 +01:00
Eli M
6292e2c04d Add PipeWire driver to the build system
Signed-off-by: E. Melucci <eli@meluc.ci>
2021-12-07 17:17:16 +01:00
Eli M
c831deb81c Add PipeWire driver to the audio drivers list 2021-12-07 17:17:16 +01:00
Eli M
5b36a556fe Implement PipeWire driver
Signed-off-by: E. Melucci <eli@meluc.ci>
2021-12-07 17:17:16 +01:00
Bill Peterson
a3dd7fddcb
Rewind playlist if calling fluid_player_play after all loops complete (#994) 2021-10-30 15:01:58 +02:00
Nikos Chantziaras
de05ef2a1c
Fix static mingw linking issues (#990)
* add missing link to libmman
* more complete list of private dependencies in pkg-config file
2021-10-17 18:12:49 +02:00
Yu Qing
7ef8652326
fix windows related encoding problems (#984) 2021-10-03 12:15:57 +02:00
Bill Peterson
6c593180ce
Per-channel ALL_SOUND_OFF when seeking/stopping player (#980)
- Only send all sound off on channels which had notes playing
- Send it as ALL_SOUND_OFF CC to a MIDI router to route it to a different synth channel afterwards
2021-09-28 21:29:26 +02:00
Tom M
fab1ca1ca9
Revert "cmake: export targets" 2021-08-30 16:07:53 +02:00
Tom M
ec0d6e011e
Merge pull request #943 from pedrolcl/wip-cmake-export-targets
cmake: export targets
2021-08-28 23:50:04 +02:00
Tom M
c1e286629f
Fix NULL deref in delete_fluid_ladspa_effect() (#963) 2021-08-23 20:04:44 +02:00
Pedro López-Cabanillas
f023d7e014 Reverted PRIVATE in target_link_libraries() and clarifications 2021-08-02 11:31:43 +02:00
Pedro López-Cabanillas
64a7787e90 fixes and simplifications
* FluidSynthConfigVersion.cmake is created with ${VERSION} instead of
${LIB_VERSION_INFO}
* FluidSynthConfig.cmake.in simplified: it doesn't need to include the
version file.
* Simplified BUILD_INTERFACE generator expression as suggested
2021-08-02 11:31:43 +02:00
Pedro López-Cabanillas
cf5fbac9af cmake: export targets
The build system creates two exported targets:
- The executable FluidSynth::fluidsynth
- The library FluidSynth::libfluidsynth

A downstream project using CMake can find and link the library target
directly with cmake (without needing pkg-config) this way:

~~~
project(sample LANGUAGES C)
find_package ( FluidSynth )
if (FluidSynth_FOUND)
  add_executable( sample sample.c )
  target_link_libraries ( sample PRIVATE FluidSynth::libfluidsynth )
endif ()
~~~

After installing fluidsynth in a prefix like "$HOME/Fluidsynth3":
cmake -DCNAKE_PREFIX_PATH="$HOME/Fluidsynth3/;..."

Instead installing, the build directory can be used directly, for
instance:

cmake -DFluidSynth_DIR="$HOME/fluidsynth-2.2.2/build/" ...
2021-08-02 11:31:43 +02:00
Tom M
8e56188316
Define socklen_t in according to a feature test (#949)
Co-authored-by: KO Myung-Hun <komh@chollian.net>
2021-07-28 11:00:27 +02:00
Evan Miller
c68a10ca13
Restore support for Mac OS X 10.5 and earlier (#947)
Expands on #803 and closes #946.

Tested on macOS 11.4 as well as 10.4.
2021-07-28 10:20:48 +02:00
Atsushi Eno
4240d31e51
Implement Android Oboe audio error recovery mode. (#940)
Context: https://github.com/FluidSynth/fluidsynth/discussions/931

There is a new settings "audio.oboe.error-recovery-mode" which has
string value of "Reconnect" (default) or "Stop".

Under `Reconnect` mode, it automatically recreate AudioStream for the
same audio device ID (which is the default = valid device, unless a
specific ID is specified). The behavior is the same as OpenSLES.

In the future Fluidsynth might want to provide consistent error handling
mode for audio device unplugged state, but so far this change makes apps
behave not too weird.
2021-07-15 21:40:07 +02:00
luz paz
e4c8ef080c Fix source comment typos
Found via `codespell -q 3 -S ChangeLog -L bloc,blocs,capela,parms,readd,seh`
2021-07-10 08:44:35 -04:00
Curtis "Fjord" Hawthorne
346331020b
Update license header (#937) 2021-07-09 20:32:47 +02:00
Bill Peterson
be79856caa
Only send all_notes_off when stopping player (#934) 2021-07-06 11:04:59 +02:00
Tamás Korodi
e096919477
Select soundfont samples by frequency instead of midi note numbers (#932)
For detuned channels it might be better to use another key for Soundfont sample selection
giving better approximations for the pitch than the original key.
Example: play key 60 on 6370 Hz => use tuned key 64 for sample selection

This feature is only enabled for melodic channels.
For drum channels we always select Soundfont samples by key numbers.
2021-07-05 00:47:47 +02:00
Pedro López-Cabanillas
7ff164d8ab
wasapi: increase initialization timeout to 2 seconds, same as shutdown timeout (#929)
The 2 seconds timeout was chosen for consistency, but the reason to increase the initialization timeout is that one of my test devices (Asus T101HA, Windows 10) fails to initialize the wasapi driver with a timeout error most of the times.
2021-07-02 17:09:44 +02:00
Bill Peterson
bfca737a7c
autoconnect all available effects ports (#927)
Step through all available effects outputs and connect them to jack inputs, and wrap around if there are fewer input ports than effects outputs.
2021-06-30 18:44:14 +02:00
Tom M
92089e0a0f
Make audio.jack.autoconnect connect all available ports (#923) 2021-06-27 11:45:52 +02:00
Pedro López-Cabanillas
6b7fc061eb
fix for bug#915 fluidsynth.exe short option '-Q' not working when compiled with getopt (#916) 2021-06-13 10:46:47 +02:00
Tom M
f81caf37f1
Fix multiplication result may overflow 'int' before it is converted to 'size_t'. (#911) 2021-06-12 09:59:30 +02:00
Tom M
d709339ab5
Fix ordering of NoteOn Vel=0 events (#908) 2021-06-11 22:57:54 +02:00
jjceresa
de478947bf
When playing the same note more than once the (#905)
When playing the same note more than once the previous note is forced in release stage except if pedaling (sostenuto or sustain) is active. This makes it sound more like a real piano. See https://lists.nongnu.org/archive/html/fluid-dev/2021-06/msg00001.html
2021-06-11 22:40:17 +02:00
Paul
768fa225db
fix typo (#902) 2021-05-30 23:04:40 +02:00
Tom M
aba9485a9c
Fix import library naming clash (#893) 2021-05-26 14:18:19 +02:00
jjceresa
eda2fb21b0
Fix bad router behaviour. (#891)
Each input event has values (chan, par1, par2) that could be changed by a rule.
After a rule had been applied on any value and the value is out of range, the event
can be ignored or the value can be clamped depending of the type of the event:
- To get full benefice of the rule the value is clamped and the event
  passed to the output.
- To avoid MIDI messages conflicts at the output, the event is ignored
  (i.e not passed to the output).

chan value: event is ignored regardless of the event type
par1: event is ignored for PROG_CHANGE or CONTROL_CHANGE type, par1 is clamped otherwise.
par2: par2 is clamped regardless of the event type.
2021-05-24 16:26:56 +02:00
Tom M
8446023255
Add more test cases for UTF8 filenames (#889) 2021-05-12 17:41:55 +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
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
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
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