This commit is contained in:
gauthiier 2022-03-20 16:07:58 +01:00
parent 4ed3ee2435
commit 554b10a8f7

View File

@ -72,6 +72,8 @@ class VoiceMachineApp : public App {
std::map<uint64_t, protocol::endpoint> _connections;
std::mutex _command_mutex;
bool _debug = false;
// VoiceAloud audio = VoiceAloud(100, 0.5f);
};
@ -128,7 +130,10 @@ void VoiceMachineApp::stage_config()
console() << "command: " << cmd << endl;
if(cmd == "save") save_config();
else if (cmd == "clear") clear();
else if(cmd == "clear") clear();
else if(cmd == "DEBUG") {
_debug = m[1].boolean();
}
});
} catch (ci::Exception &exc) {
@ -240,6 +245,10 @@ void VoiceMachineApp::draw()
if(_current_voice){
Rectf bounds( 40, _current_voice->_tex->getAscent() + 40, getWindowWidth() - 40, getWindowHeight() - 40 );
_current_voice->draw(bounds);
if(_debug){
gl::color(Color(1, 0, 0));
gl::drawStrokedRect(bounds);
}
}
}