-
Notifications
You must be signed in to change notification settings - Fork 260
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 MIDI player tempo reset issues #711
Conversation
fixes multi task race condition using atomic functions.
Please, as I am not familiar with doxygen formatting rule, could you have a check , in particular for |
Looks good to me. I'll keep this open for a few days to give @glm35 a chance to test this. |
Ok. Thanks for reviewing and fixing API docs, and grammar. |
Yes, when no tempo change is given in a midi file, a default value of 120 bpm should be used. This is a MIDI file specification.
Yes, internally valid tempo value should be in the range [1..600000000] regardless if the value is in bpm or in us/quarter note. |
player. (2)Add separate enum values - fluid_player_set_tempo_type enum for fluid_player_set_tempo() - fluid_player_get_tempo_type enum for fluid_player_get_tempo()
…dsynth into fix-player-tempo
This is done in recent commit 0836a52 . One just need to call fluid_player_get_tempo() with FLUID_PLAYER_GET_TEMPO_USED_BPM or FLUID_PLAYER_GET_TEMPO_USED_MIDI. |
First of all, I'm glad to see that everything is working as expected. Thanks for testing @glm35! Regarding the
|
Ok. |
present. Instead, the existing functions fluid_player_get_bpm() and fluid_player_get_midi_tempo() should be continued to use. Those functions obtain the tempo the player is using right now.This might be - the tempo given by the MIDI file multiplied by the relative factor, or - the absolute tempo dictated by the client app.
Now, the These simplifications allows the caller to set the player in |
So, rather than ignoring the |
Rather than ignoring the tempo parameter with FLUID_PLAYER_TEMPO_INTERNAL, we use it to pass the multiplier directly
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.
Looks good now. I'll wait for the CI and then squash it. Thanks!
Kudos, SonarCloud Quality Gate passed! |
This PR addresses issue #707 according to the last discussion.
@glm35, please, your are welcome to pull this branch
fix-player-tempo
an test the new functionfluid_player_set_tempo()
, andfluid_player_get_tempo()
.