Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ak5k committed Jan 16, 2024
1 parent d179112 commit f2c2f69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,17 @@ const char* defstring_GetEnabled = "bool\0\0\0"
*/
void SetEnabled(bool enable)
{
static audio_hook_register_t audio_hook{OnAudioBuffer, 0, 0, 0, 0, 0};
LinkSession::getInstance().running = enable;
LinkSession::getInstance().link.enable(enable);
if (enable)
{
Audio_RegHardwareHook(true, &audio_hook);
timerId = SetTimer(nullptr, 0, 12, &timerTick);
}
else
{
Audio_RegHardwareHook(false, &audio_hook);
KillTimer(nullptr, timerId);
}
}
Expand Down Expand Up @@ -730,9 +733,6 @@ const char* defstring_Blink_GetVersion = "double\0\0\0"

void Init()
{
static audio_hook_register_t audio_hook{OnAudioBuffer, 0, 0, 0, 0, 0};
Audio_RegHardwareHook(true, &audio_hook);

plugin_register("API_Blink_GetTimelineOffset", (void*)GetTimelineOffset);
plugin_register("APIdef_Blink_GetTimelineOffset",
(void*)defstring_GetTimelineOffset);
Expand Down

0 comments on commit f2c2f69

Please sign in to comment.