mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
fix: if fetching BPM from vsti host fails, keep the previous BPM as defined by the user
This commit is contained in:
parent
9db6ecb3da
commit
c421748db9
@ -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
|
||||
|
@ -277,10 +277,7 @@ loop:
|
||||
p.recordingNoteArrived = false
|
||||
} else {
|
||||
if p.recording && len(p.recordingEvents) > 0 {
|
||||
bpm, ok := context.BPM()
|
||||
if !ok {
|
||||
bpm = 120
|
||||
}
|
||||
bpm, _ := context.BPM()
|
||||
p.trySend(PlayerRecordedMessage{
|
||||
BPM: bpm,
|
||||
Events: p.recordingEvents,
|
||||
|
Reference in New Issue
Block a user