fix: if fetching BPM from vsti host fails, keep the previous BPM as defined by the user

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2023-07-17 21:56:17 +03:00
parent 9db6ecb3da
commit c421748db9
3 changed files with 7 additions and 4 deletions

View File

@ -161,6 +161,9 @@ func (m *Model) ProcessPlayerMessage(msg PlayerMessage) {
case PlayerCrashMessage:
m.panic = true
case PlayerRecordedMessage:
if e.BPM == 0 {
e.BPM = float64(m.song.BPM)
}
song := RecordingToSong(m.song.Patch, m.song.RowsPerBeat, m.song.Score.RowsPerPattern, e)
m.SetSong(song)
m.instrEnlarged = false