Answer event queries within the Wine VST host

This commit is contained in:
Robbert van der Helm
2020-02-09 20:05:47 +01:00
parent 73256d0055
commit 875308bd6f
5 changed files with 67 additions and 18 deletions
+23 -2
View File
@@ -1,7 +1,28 @@
// TODO: Do something useful here!
#include <vestige/aeffect.h>
#include <iostream>
#include "native-includes.h"
// `native-includes.h` has to be included before any other files as otherwise we
// might get the wrong version of certain libraries
#include "../common/communication.h"
int main() {
std::cout << "Hello, world!" << std::endl;
// TODO: The program should terminate automatically when stdin gets closed
// TODO: Remove debug
while (true) {
auto event = read_object<Event>(std::cin);
EventResult response;
if (event.opcode == effGetEffectName) {
response.return_value = 1;
response.result = "Hello, world!";
} else {
response.return_value = 0;
}
write_object(std::cout, response);
}
}