TraceMixer.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #if DEBUG
  2. #include "Trace.h"
  3. /* channels */
  4. #define DEBUG_TRACE_ADD_REMOTE_USER \
  5. Trace::TraceGui("added remote channels group '" + String(user_id) + "'") ;
  6. #define DEBUG_REMOVE_CHANNELS \
  7. String user_id = channels->getComponentID() ; \
  8. Trace::TraceState("user parted => '" + user_id + "'") ; \
  9. Trace::TraceEvent("removing remote user '" + user_id + "'") ;
  10. /* mixer */
  11. #if TRACE_MIXER_COMPONENTS
  12. # define DEBUG_TRACE_MIXER_COMPONENTS_VB \
  13. if (this->masterChannels == nullptr || this->localChannels == nullptr || \
  14. this->prevScrollButton == nullptr || this->nextScrollButton == nullptr ) \
  15. Trace::TraceGuiVb("mixer resized - GUI not ready") ; \
  16. String dbg = "mixer resized " + String(getNumChildComponents()) + \
  17. " mixer components (" + \
  18. String(GUI::N_STATIC_MIXER_CHILDREN) + " static) =>" ; \
  19. for (int n = 0 ; n < getNumChildComponents() ; ++n) \
  20. { \
  21. Component* child = getChildComponent(n) ; String id ; \
  22. if (child == this->masterChannels) id = "masterChannels" ; \
  23. else if (child == this->prevScrollButton) id = "prevScrollButton" ; \
  24. else if (child == this->nextScrollButton) id = "nextScrollButton" ; \
  25. else if (child == this->localsResizer) id = "localsResizer" ; \
  26. else if (child == this->mastersResizer) id = "mastersResizer" ; \
  27. else id = child->getComponentID() ; \
  28. dbg += "\n component[" + String(n) + "] => " + String(id) ; \
  29. } \
  30. Trace::TraceGuiVb(dbg) ;
  31. #else // TRACE_MIXER_COMPONENTS
  32. # define DEBUG_TRACE_MIXER_COMPONENTS_VB ;
  33. #endif // TRACE_MIXER_COMPONENTS
  34. #else // DEBUG
  35. // channels
  36. #define DEBUG_TRACE_ADD_REMOTE_USER ;
  37. #define DEBUG_REMOVE_CHANNELS ;
  38. // mixer
  39. #define DEBUG_TRACE_MIXER_COMPONENTS_VB ;
  40. #endif // DEBUG