Skip to content

Commit

Permalink
change function WriteIn signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Jun 13, 2024
1 parent 11140f6 commit c7613de
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions hvcc/generators/c2daisy/templates/HeavyDaisy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ daisy::MidiUsbHandler midiusb;
{% endif %}
// int midiOutCount;
// uint8_t* midiOutData;
void CallbackWriteIn(HeavyContext& hv);
void LoopWriteIn(HeavyContext& hv);
void CallbackWriteIn(Heavy_{{patch_name}}* hv);
void LoopWriteIn(Heavy_{{patch_name}}* hv);
void CallbackWriteOut();
void LoopWriteOut();
void PostProcess();
Expand Down Expand Up @@ -252,7 +252,7 @@ int main(void)
{% endif %}
Display();
{% if loop_write_in|length > 0 %}
LoopWriteIn(*hv);
LoopWriteIn(hv);
{% endif %}
{% if output_parameters|length > 0 %}
LoopWriteOut();
Expand Down Expand Up @@ -288,7 +288,7 @@ void audiocallback(daisy::AudioHandle::InputBuffer in, daisy::AudioHandle::Outpu
{% endif %}
{% if parameters|length > 0 %}
hardware.ProcessAllControls();
CallbackWriteIn(*hv);
CallbackWriteIn(hv);
{% endif %}
hv->process((float**)in, (float**)out, size);
{% if output_parameters|length > 0 %}
Expand Down Expand Up @@ -474,29 +474,29 @@ static void printHook(HeavyContextInterface *c, const char *printLabel, const ch
/** Sends signals from the Daisy hardware to the PD patch via the receive objects during the main loop
*
*/
void LoopWriteIn(HeavyContext& hv)
void LoopWriteIn(Heavy_{{patch_name}}* hv)
{
{% for param in loop_write_in %}
{% if param.bool %}
if ({{param.process}})
hv.sendBangToReceiver((uint32_t) HV_{{patch_name|upper}}_PARAM_IN_{{param.hash_enum|upper}});
hv->sendBangToReceiver((uint32_t) HV_{{patch_name|upper}}_PARAM_IN_{{param.hash_enum|upper}});
{% else %}
hv.sendFloatToReceiver((uint32_t) HV_{{patch_name|upper}}_PARAM_IN_{{param.hash_enum|upper}}, {{param.process}});
hv->sendFloatToReceiver((uint32_t) HV_{{patch_name|upper}}_PARAM_IN_{{param.hash_enum|upper}}, {{param.process}});
{% endif %}
{% endfor %}
}

/** Sends signals from the Daisy hardware to the PD patch via the receive objects during the audio callback
*
*/
void CallbackWriteIn(HeavyContext& hv)
void CallbackWriteIn(Heavy_{{patch_name}}* hv)
{
{% for param in callback_write_in %}
{% if param.bool %}
if ({{param.process}})
hv.sendBangToReceiver((uint32_t) HV_{{patch_name|upper}}_PARAM_IN_{{param.hash_enum|upper}});
hv->sendBangToReceiver((uint32_t) HV_{{patch_name|upper}}_PARAM_IN_{{param.hash_enum|upper}});
{% else %}
hv.sendFloatToReceiver((uint32_t) HV_{{patch_name|upper}}_PARAM_IN_{{param.hash_enum|upper}}, {{param.process}});
hv->sendFloatToReceiver((uint32_t) HV_{{patch_name|upper}}_PARAM_IN_{{param.hash_enum|upper}}, {{param.process}});
{% endif %}
{% endfor %}
}
Expand Down

0 comments on commit c7613de

Please sign in to comment.