Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lazy soundfont unloading #736

Merged
merged 3 commits into from
Jan 3, 2021
Merged

Fix lazy soundfont unloading #736

merged 3 commits into from
Jan 3, 2021

Conversation

derselbst
Copy link
Member

This PR fixes the lazy soundfont unloading mechanism, i.e. fixes #727.

(Regression tests should be merged first to see that CI passes.)

@derselbst derselbst added the bug label Jan 2, 2021
@derselbst derselbst added this to the 2.1 milestone Jan 2, 2021
jjceresa and others added 3 commits January 3, 2021 09:47
If polyphony is exceeded and FluidSynth has to allocate a voice by
calling fluid_synth_free_voice_by_kill_LOCAL(), two problems occur:

 1)The value returned by fluid_synth_get_active_voice_count() never
   returns back to 0.
 2)SoundFont samples are not unref'd properly, and therefore if an attempt is
   made to unload the SoundFont, the deferred unload timer is started, and
   fluid_synth_sfunload_callback() unsuccessfully tries	to unload the SoundFont forever.

These 2 issues are fixed by this commit.
@derselbst derselbst marked this pull request as ready for review January 3, 2021 08:49
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 3, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@derselbst derselbst linked an issue Jan 3, 2021 that may be closed by this pull request
@derselbst derselbst merged commit 272b3b8 into 2.1.x Jan 3, 2021
@derselbst derselbst deleted the fix-sfunload branch January 3, 2021 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SoundFonts cannot be unloaded if polyphony is ever exceeded
1 participant