-
Notifications
You must be signed in to change notification settings - Fork 267
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 bug reported in issue 727 #729
Conversation
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.
…s(). initialize voice->sample to NULL in fluid_voice_stop().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks surprisingly simple. I haven't tested it yet, I may have an opportunity later to do so.
@@ -4629,6 +4628,9 @@ fluid_synth_check_finished_voices(fluid_synth_t *synth) | |||
else if(synth->voice[j]->overflow_rvoice == fv) | |||
{ | |||
fluid_voice_overflow_rvoice_finished(synth->voice[j]); | |||
|
|||
/* Decrement voice count */ | |||
synth->active_voice_count--; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency I think it would be better to move this call into fluid_voice_overflow_rvoice_finished()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I see you did it earlier and the unit tests failed. Perhaps you could just add a small comment to explain why the decrement must be put here.
…shed(), fluid_synth_check_finished_voices
Kudos, SonarCloud Quality Gate passed! |
Closed in favor of #736 which is based on |
This PR addresses issues reported in #727