jack-transport: possibly uninitialized `position->beats_per_minute` in `update_bpm`. · Issue #7 · zynthian/jack-smf-utils · GitHub
More Web Proxy on the site http://driver.im/
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
Using jack-smf-player under jack-transport mode (i.e., without -t flag) causes all events in the MIDI file to be sent immediately regardless of freewheel setting.
Environment
OS: Alpine Linux v3.21
JACK server: JACK2 (jackdmp)
Version: master
Investigation
My understanding is that timebase callback is currently disabled in jack-smf-player.c#L576 which was supposed to provide the BBT information based on the documentation.
Therefore, the update_bpm function might be called with BBT field uninitialized. In my environment, the uninitialized value is often a tiny double, which passed the zero check and assigned to position->beats_per_minute and further used for time calculation jack-smf-player.c#L346, leading to the incorrect playback speed.
Solution
A quick solution is to check the BBT bitmask against position->valid and skip the BPM update if the information is not included, see this commit.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Problem
Using
jack-smf-player
under jack-transport mode (i.e., without-t
flag) causes all events in the MIDI file to be sent immediately regardless of freewheel setting.Environment
Investigation
My understanding is that timebase callback is currently disabled in jack-smf-player.c#L576 which was supposed to provide the BBT information based on the documentation.
Therefore, the
update_bpm
function might be called with BBT field uninitialized. In my environment, the uninitialized value is often a tiny double, which passed the zero check and assigned toposition->beats_per_minute
and further used for time calculation jack-smf-player.c#L346, leading to the incorrect playback speed.Solution
A quick solution is to check the BBT bitmask against
position->valid
and skip the BPM update if the information is not included, see this commit.The text was updated successfully, but these errors were encountered: