Skip to content

Commit 4cc1b7a

Browse files
committed
LiveprogIDE: add variable watch feature
1 parent 92eb4da commit 4cc1b7a

File tree

4 files changed

+5
-17
lines changed

4 files changed

+5
-17
lines changed

src/audio/base/DspHost.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,9 +721,9 @@ void DspHost::reloadLiveprog(DspConfig* config)
721721
LiveProgDisable(cast(this->_dsp));
722722
}
723723

724-
std::list<EelVariable> DspHost::enumEelVariables()
724+
std::vector<EelVariable> DspHost::enumEelVariables()
725725
{
726-
std::list<EelVariable> vars;
726+
std::vector<EelVariable> vars;
727727

728728
compileContext *c = (compileContext*)cast(this->_dsp)->eel.vm;
729729
for (int i = 0; i < c->varTable_numBlocks; i++)

src/audio/base/DspHost.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DspHost
3030
bool update(DspConfig* config, bool ignoreCache = false);
3131
void updateFromCache();
3232
void reloadLiveprog(DspConfig* config = nullptr);
33-
std::list<EelVariable> enumEelVariables();
33+
std::vector<EelVariable> enumEelVariables();
3434
void dispatch(Message msg, std::any value);
3535

3636
private:

src/audio/base/IAudioService.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public slots:
3939
void eelCompilationStarted(const QString& scriptName);
4040
void eelCompilationFinished(int ret, const QString& retMsg, const QString& msg, const QString& scriptName, float initMs);
4141
void eelOutputReceived(const QString& output);
42-
void eelVariablesEnumerated(const std::list<EelVariable>& vars);
42+
void eelVariablesEnumerated(const std::vector<EelVariable>& vars);
4343
void convolverInfoChanged(const ConvolverInfoEventArgs& args);
4444
void outputDeviceChanged(const QString& deviceName, const QString& deviceId);
4545

@@ -50,21 +50,9 @@ inline void IAudioService::reloadLiveprog()
5050
host()->reloadLiveprog();
5151
}
5252

53-
#include <iostream>
5453
inline void IAudioService::enumerateLiveprogVariables()
5554
{
5655
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-
6856
emit eelVariablesEnumerated(vars);
6957
}
7058

src/subprojects/EELEditor

0 commit comments

Comments
 (0)