diff --git a/src/voicemachineApp.cpp b/src/voicemachineApp.cpp index c686757..7b13006 100644 --- a/src/voicemachineApp.cpp +++ b/src/voicemachineApp.cpp @@ -72,6 +72,8 @@ class VoiceMachineApp : public App { std::map _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); + } } }