osci-render/Source/audio/LuaEffect.cpp

18 wiersze
542 B
C++
Czysty Zwykły widok Historia

2023-07-04 13:58:36 +00:00
#include "LuaEffect.h"
#include "../lua/LuaParser.h"
2024-01-07 16:17:20 +00:00
Point LuaEffect::apply(int index, Point input, const std::vector<double>& values, 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(), values[0]);
2023-07-04 13:58:36 +00:00
}
audioProcessor.customEffect->setVariable("slider_" + name.toLowerCase(), values[0]);
2023-07-04 13:58:36 +00:00
return input;
}