osci-render/Source/audio/LuaEffect.cpp

15 wiersze
465 B
C++
Czysty Zwykły widok Historia

2023-07-04 13:58:36 +00:00
#include "LuaEffect.h"
#include "../lua/LuaParser.h"
Vector2 LuaEffect::apply(int index, Vector2 input, std::vector<EffectDetails> details, double sampleRate) {
2023-07-04 13:58:36 +00:00
int fileIndex = audioProcessor.getCurrentFileIndex();
if (fileIndex == -1) {
return input;
}
std::shared_ptr<LuaParser> parser = audioProcessor.getCurrentFileParser()->getLua();
if (parser != nullptr) {
parser->setVariable("slider_" + name.toLowerCase(), details[0].value);
2023-07-04 13:58:36 +00:00
}
return input;
}