You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of fluidsynth 2.1.0 this function has been deprecated. Changing the sample-rate is generally not considered to be a real-time use-case, as it always produces some audible artifact ("click", "pop") on the dry sound and effects (because LFOs for chorus and reverb need to be reinitialized). The sample-rate change may also require memory allocation deep down in the effect units. However, this memory allocation may fail and there is no way for the caller to know that, because the actual change of the sample-rate is executed during rendering. This function cannot (must not) do the sample-rate change itself, otherwise the synth needs to be locked down, causing rendering to block. Esp. do not use this function if this synth instance is used by an audio driver, because the audio driver cannot be notified by this sample-rate change. Long story short: don't use it.
The text was updated successfully, but these errors were encountered:
The annoying thing with this is that the setting needs to be set before creating the synthesizer, but the sample rate to use is only known after setting the music stream callback from the mixer. So the music callback needs to handle the situation where the synthesizer is not yet ready, which means a mutex and atomic flag are definitely needed.
nielsmh
added a commit
to nielsmh/OpenTTD
that referenced
this issue
Feb 7, 2020
Version of OpenTTD
master
Expected result
Compiles without warnings
Actual result
Steps to reproduce
Compile
From http://www.fluidsynth.org/api/synth_8h.html#ac89771633b393c807e5d5766f5a219b0 :
The text was updated successfully, but these errors were encountered: