Skip to content

Commit

Permalink
fix(DmPerformance): insert a groove message at time 0 if the segment …
Browse files Browse the repository at this point in the history
…does not have one
  • Loading branch information
lmichaelis committed May 12, 2024
1 parent b4406a5 commit 0414311
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Performance.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,14 @@ static void DmPerformance_handleSegmentMessage(DmPerformance* slf, DmMessage_Seg
DmMessageQueue_add(&slf->control_queue, m, mt, DmQueueConflict_REPLACE);
}

// If we don't yet have a command, add it!
DmMessage cmd;
cmd.type = DmMessage_COMMAND;
cmd.time = 0;
cmd.command.command = DmCommand_GROOVE;
cmd.command.groove_level = 1;
DmMessageQueue_add(&slf->control_queue, &cmd, 0, DmQueueConflict_KEEP);

slf->segment = DmSegment_retain(sgt);
slf->segment_start = slf->time;

Expand Down

0 comments on commit 0414311

Please sign in to comment.