add PBD::DEBUG bits for WavesAudio and WavesMIDI
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 13 May 2015 23:37:15 +0000 (19:37 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 29 Jun 2015 18:18:14 +0000 (14:18 -0400)
libs/pbd/debug.cc
libs/pbd/pbd/debug.h

index 25ebb64850e58771a0aa3101114871c903495e71..9150cd68839a087e9ed8ee6693f94e237072631e 100644 (file)
@@ -54,6 +54,19 @@ DebugBits PBD::DEBUG::AbstractUI = PBD::new_debug_bit ("abstractui");
 DebugBits PBD::DEBUG::FileUtils = PBD::new_debug_bit ("fileutils");
 DebugBits PBD::DEBUG::Configuration = PBD::new_debug_bit ("configuration");
 
+/* These are debug bits that are used by backends. Since these are loaded dynamically,
+   after command-line parsing, defining them in code that is part of the backend
+   doesn't make them available for command line parsing. Put them here.
+
+   This is sort of a hack, because it means that the debug bits aren't defined
+   with the code in which they are relevant. But providing access to debug bits
+   from dynamically loaded code, for use in command line parsing, is way above the pay grade
+   of this debug tracing scheme.
+*/
+
+DebugBits PBD::DEBUG::WavesMIDI = PBD::new_debug_bit ("WavesMIDI");
+DebugBits PBD::DEBUG::WavesAudio = PBD::new_debug_bit ("WavesAudio");
+
 DebugBits PBD::debug_bits;
 
 DebugBits
index e4fa5254812031114cb2f1f947b331bce366f84c..828851bfe5638c37a7efa29ec40ee2de75082855 100644 (file)
@@ -51,6 +51,11 @@ namespace PBD {
                LIBPBD_API extern DebugBits AbstractUI;
                LIBPBD_API extern DebugBits Configuration;
                LIBPBD_API extern DebugBits FileUtils;
+
+               /* See notes in ../debug.cc on why these are defined here */
+
+                LIBPBD_API extern DebugBits WavesMIDI;
+                LIBPBD_API extern DebugBits WavesAudio;
        }
 }