Skip to content

Commit

Permalink
make sure we use a float
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Oct 13, 2024
1 parent 4300592 commit cf88338
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hvcc/generators/c2dpf/templates/hostTransportEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void {{class_name}}::hostTransportEvents(uint32_t frames)
if (timePos.frame == 0)
{
_context->sendMessageToReceiverV(HV_HASH_MIDIREALTIMEIN, 0,
"ff", (float) MIDI_RT_RESET, 0);
"ff", (float) MIDI_RT_RESET, 0.0);
reset = true;
}

Expand All @@ -21,19 +21,19 @@ void {{class_name}}::hostTransportEvents(uint32_t frames)
if (timePos.frame == 0)
{
_context->sendMessageToReceiverV(HV_HASH_MIDIREALTIMEIN, 0,
"ff", (float) MIDI_RT_START, 0);
"ff", (float) MIDI_RT_START, 0.0);
}
if (! reset)
{
_context->sendMessageToReceiverV(HV_HASH_MIDIREALTIMEIN, 0,
"ff", (float) MIDI_RT_CONTINUE, 0);
"ff", (float) MIDI_RT_CONTINUE, 0.0);
}
}
}
else if (this->wasPlaying)
{
_context->sendMessageToReceiverV(HV_HASH_MIDIREALTIMEIN, 0,
"ff", (float) MIDI_RT_STOP, 0);
"ff", (float) MIDI_RT_STOP, 0.0);
}
this->wasPlaying = timePos.playing;

Expand All @@ -53,7 +53,7 @@ void {{class_name}}::hostTransportEvents(uint32_t frames)
double delayMs = 1000*(nextClockTick - sampleAtCycleStart)/getSampleRate();
if (delayMs >= 0.0) {
_context->sendMessageToReceiverV(HV_HASH_MIDIREALTIMEIN, delayMs,
"ff", (float) MIDI_RT_CLOCK, 0);
"ff", (float) MIDI_RT_CLOCK, 0.0);
}
nextClockTick += samplesPerTick;
}
Expand Down

0 comments on commit cf88338

Please sign in to comment.