2021-02-20 18:13:51 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <VulcanoLE/Scripts/Spectrum.h>
|
|
|
|
|
2021-12-30 18:06:04 +01:00
|
|
|
#define VIZSIZE 10
|
2021-02-21 23:22:01 +01:00
|
|
|
|
|
|
|
using micro = std::chrono::duration<double, std::micro>;
|
2021-05-02 17:25:03 +02:00
|
|
|
using ms = std::chrono::duration<double, std::milli>;
|
2021-02-20 18:13:51 +01:00
|
|
|
|
|
|
|
namespace VIZ {
|
|
|
|
struct VisPlugins {
|
|
|
|
int mode = 0;
|
2021-02-21 23:22:01 +01:00
|
|
|
void init(HIDHelper *, AudioGrabber *);
|
2021-02-22 14:27:34 +01:00
|
|
|
void onStartup();
|
|
|
|
void onTick();
|
|
|
|
void onShutdown();
|
2021-02-20 18:13:51 +01:00
|
|
|
void setCurrentMode(int);
|
|
|
|
~VisPlugins();
|
2021-02-21 23:22:01 +01:00
|
|
|
VUtils::Environment *env{};
|
2021-02-20 18:13:51 +01:00
|
|
|
protected:
|
2021-05-02 17:25:03 +02:00
|
|
|
std::mutex guard;
|
2021-02-20 18:13:51 +01:00
|
|
|
VIZ *viz[VIZSIZE]{};
|
2021-02-21 23:22:01 +01:00
|
|
|
VIZ *currentVis{};
|
|
|
|
Vulcan121 *keyboard{};
|
|
|
|
AudioGrabber *grabber{};
|
|
|
|
std::chrono::time_point<std::chrono::system_clock, micro> start;
|
2021-05-02 17:25:03 +02:00
|
|
|
std::chrono::time_point<std::chrono::system_clock, ms> frameStart;
|
|
|
|
long frames = 0;
|
2021-02-20 18:13:51 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|