The existing ctests cannot be simply used in Android tests because
everything is compiled as standalone executable with `main()` function.
Since Android 11+ does not support standalone executables, those test
`main()` functions are converted as unique functions and then picked up
in this test's native-lib CMakeLists.txt.
Since those tests depend on libfluidsynth internals, we cannot simply
link with libfluidsynth.so. We instead compile the library with OBJ files.
gettext is known as cause of problem for running host tool in target ABI
in our builds, and the latest script still had the issue.
https://github.com/atsushieno/aap-lv2-fluidsynth/actions/runs/914453645
This fixes the problem by explicitly specifying that the build host is
x86_64 linux.
If you want to reuse the script on other platforms, you have to edit it.
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.
Previously, cmake only tested for a specific version of libsndfile and then assumed, it has OGG/Vorbis support. However, libsndfile may still be compiled without OGG/Vorbis support. If this is the case, fluidsynth should refuse to load SF3 files. Otherwise the attempt to load SF3 files would fail with a bunch of error messages.
The solution of this PR proposes to lookup the private libs listed in sndfile.pc and see whether it includes "vorbis".
Libsndfile was unintentionally compiled without OGG/Vorbis support. That's because libopus was missing. When compiling libsndfile with autotools [you get a nice warning](9349a566e2/configure.ac (L381-L386)). When using CMake you don't...
Solution: Compile libopus before compiling libsndfile. Now it reports
```
-- The following features have been enabled:
* ENABLE_EXTERNAL_LIBS, enable FLAC, Vorbis, and Opus codecs
```