Your ROOT_URL in app.ini is https://source.parasitstudio.de:63000/ but you are visiting https://source.parasitstudio.de/wirtz/MicroDexed/src/commit/b3f13f3182f31527493c178857100fc1f652c240/audio_timer.cpp You should set ROOT_URL correctly, otherwise the web may not work correctly.
MicroDexed/audio_timer.cpp

43 lines
631 B

#include <Audio.h>
#include "config.h"
#include "audio_timer.h"
void AudioTimer::update(void)
{
audio_block_t *in;
in = receiveReadOnly(0);
if (in)
release(in);
tick++;
if (tick >= _steps)
{
if (step_function != NULL)
(*step_function)();
tick = 0;
}
}
uint32_t AudioTimer::get_tick(void)
{
return (tick);
}
void AudioTimer::set_bpm(uint8_t b)
{
bpm = b;
}
void AudioTimer::function(uint8_t stepping, void(*func)())
{
steps = stepping;
if (func != NULL)
{
step_function = func;
_steps = beat * float(bpm) * 4.0 / float(stepping) + 0.5;
}
else
step_function = NULL;
}