109c41c355
Following the discussion about an API to pin and unpin preset samples in the sample cache here: https://lists.nongnu.org/archive/html/fluid-dev/2020-10/msg00016.html Short explanation of the change: Only the default loader currently supports dynamic sample loading, so I thought it might be a good idea to keep the changes for this feature mostly contained in the default loader as well. I've added two new preset notify flags (FLUID_PRESET_PIN and FLUID_PRESET_UNPIN) that are handled by the preset->notify callback and trigger the loading and possibly unloading of the samples. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
README.md | ||
test.h | ||
test_bug_635.c | ||
test_ct2hz.c | ||
test_jack_obtaining_synth.c | ||
test_pointer_alignment.c | ||
test_preset_pinning.c | ||
test_preset_sample_loading.c | ||
test_sample_cache.c | ||
test_sample_rate_change.c | ||
test_sample_validate.c | ||
test_seq_event_queue_remove.c | ||
test_seq_event_queue_sort.c | ||
test_seq_evt_order.c | ||
test_seq_scale.c | ||
test_seqbind_unregister.c | ||
test_sf3_sfont_loading.c | ||
test_sfont_loading.c | ||
test_snprintf.c | ||
test_synth_chorus_reverb.c | ||
test_synth_process.c |
This directory contains small executables to verify fluidsynths correct behaviour, i.e. unit tests.
Do not blindly use the tests as template for your application!
Although some tests might serve as educational demonstration of how to use certain parts of fluidsynth, they are not intended to do so! It is most likely that those tests will consist of many hacky parts that are necessary to test fluidsynth (e.g. including fluidsynth's private headers to access internal data types and functions). For user applications this programming style is strongly discouraged! Keep referring to the documentation and code examples listed in the API documentation.
Developers
To add a unit test just duplicate an existing one, give it a unique name and update the CMakeLists.txt by
- adding a call to
ADD_FLUID_TEST()
and - a dependency to the custom
check
target.
Execute the tests via make check
. Unit tests should use the VintageDreamsWaves-v2.sf2
as test soundfont.
Use the TEST_SOUNDFONT
macro to access it.