@@ -21,15 +21,17 @@ class IAudioService : public QObject
2121
2222public slots:
2323 virtual void update (DspConfig* config) = 0;
24- virtual void reloadLiveprog () = 0;
24+
2525 virtual void reloadService () = 0;
2626
2727 virtual IAppManager* appManager () = 0;
28+ virtual DspHost* host () = 0;
2829
2930 virtual std::vector<IOutputDevice> sinkDevices () = 0;
3031 virtual DspStatus status () = 0;
3132
32- virtual void enumerateLiveprogVariables () = 0;
33+ void reloadLiveprog ();
34+ void enumerateLiveprogVariables ();
3335
3436 void handleMessage (DspHost::Message msg, std::any arg);
3537
@@ -43,6 +45,29 @@ public slots:
4345
4446};
4547
48+ inline void IAudioService::reloadLiveprog ()
49+ {
50+ host ()->reloadLiveprog ();
51+ }
52+
53+ #include < iostream>
54+ inline void IAudioService::enumerateLiveprogVariables ()
55+ {
56+ auto vars = this ->host ()->enumEelVariables ();
57+
58+ for (const auto & var : vars)
59+ {
60+ if (std::holds_alternative<std::string>(var.value ))
61+ std::cout << std::boolalpha << var.name << " \t\t " << std::get<std::string>(var.value ) << " \t " << var.isString << std::endl;
62+ else
63+ std::cout << std::boolalpha << var.name << " \t\t " << std::get<float >(var.value ) << " \t " << var.isString << std::endl;
64+ }
65+
66+ std::cout << " -------------------" << std::endl;
67+
68+ emit eelVariablesEnumerated (vars);
69+ }
70+
4671inline void IAudioService::handleMessage (DspHost::Message msg, std::any value)
4772{
4873 switch (msg)
0 commit comments