MCPcopy Create free account
hub / github.com/Ableton/link / tickTask

Function tickTask

examples/esp32/main/main.cpp:42–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void tickTask(void* userParam)
43{
44 ableton::Link link(120.0f);
45 link.enable(true);
46
47 if (PRINT_LINK_STATE)
48 {
49 xTaskCreate(printTask, "print", 8192, &link, 1, nullptr);
50 }
51
52 gpio_set_direction(LED, GPIO_MODE_OUTPUT);
53
54 while (true)
55 {
56 const auto state = link.captureAudioSessionState();
57 const auto phase = state.phaseAtTime(link.clock().micros(), 1.);
58 gpio_set_level(LED, fmodf(phase, 1.) < 0.1);
59 vTaskDelay(1);
60 }
61}
62
63extern "C" void app_main()
64{

Callers

nothing calls this directly

Calls 2

enableMethod · 0.45
microsMethod · 0.45

Tested by

no test coverage detected