X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fdebug.cc;h=de29a99b05f0608661a3c18fa0b7b244fa606e3b;hb=a107b95307658af9f881e453362c1388ffac2463;hp=4677f696ae406bc833e0811ba5a8bf3a10f43455;hpb=6a847f553c9e274c8b1a464590e41ae78018af45;p=ardour.git diff --git a/libs/ardour/debug.cc b/libs/ardour/debug.cc index 4677f696ae..de29a99b05 100644 --- a/libs/ardour/debug.cc +++ b/libs/ardour/debug.cc @@ -23,96 +23,33 @@ #include "ardour/debug.h" -#include "i18n.h" - using namespace std; -void -ARDOUR::debug_print (const char* prefix, string str) -{ - cerr << prefix << ": " << str; -} - -void -ARDOUR::set_debug_bits (uint64_t bits) -{ - debug_bits = bits; -} - -int -ARDOUR::parse_debug_options (const char* str) -{ - char* p; - char* sp; - uint64_t bits = 0; - char* copy = strdup (str); - - p = strtok_r (copy, ",", &sp); - - while (p) { - if (strcasecmp (p, "list") == 0) { - list_debug_options (); - free (copy); - return 1; - } - - if (strcasecmp (p, "all") == 0) { - ARDOUR::set_debug_bits (~0ULL); - free (copy); - return 0; - } - - if (strncasecmp (p, "midisourceio", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::MidiSourceIO; - } else if (strncasecmp (p, "midiplaylistio", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::MidiPlaylistIO; - } else if (strncasecmp (p, "mididiskstreamio", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::MidiDiskstreamIO; - } else if (strncasecmp (p, "snapbbt", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::SnapBBT; - } else if (strncasecmp (p, "configuration", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::Configuration; - } else if (strncasecmp (p, "latency", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::Latency; - } else if (strncasecmp (p, "processors", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::Processors; - } else if (strncasecmp (p, "graph", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::Graph; - } else if (strncasecmp (p, "destruction", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::Destruction; - } else if (strncasecmp (p, "mtc", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::MTC; - } else if (strncasecmp (p, "transport", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::Transport; - } else if (strncasecmp (p, "slave", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::Transport; - } else if (strncasecmp (p, "sessionevents", strlen (p)) == 0) { - bits |= ARDOUR::DEBUG::SessionEvents; - } - - p = strtok_r (0, ",", &sp); - } - - free (copy); - ARDOUR::set_debug_bits (bits); - return 0; -} +uint64_t PBD::DEBUG::MidiSourceIO = PBD::new_debug_bit ("midisourceio"); +uint64_t PBD::DEBUG::MidiPlaylistIO = PBD::new_debug_bit ("midiplaylistio"); +uint64_t PBD::DEBUG::MidiDiskstreamIO = PBD::new_debug_bit ("mididiskstreamio"); +uint64_t PBD::DEBUG::SnapBBT = PBD::new_debug_bit ("snapbbt"); +uint64_t PBD::DEBUG::Configuration = PBD::new_debug_bit ("configuration"); +uint64_t PBD::DEBUG::Latency = PBD::new_debug_bit ("latency"); +uint64_t PBD::DEBUG::Processors = PBD::new_debug_bit ("processors"); +uint64_t PBD::DEBUG::ProcessThreads = PBD::new_debug_bit ("processthreads"); +uint64_t PBD::DEBUG::Graph = PBD::new_debug_bit ("graph"); +uint64_t PBD::DEBUG::Destruction = PBD::new_debug_bit ("destruction"); +uint64_t PBD::DEBUG::MTC = PBD::new_debug_bit ("mtc"); +uint64_t PBD::DEBUG::Transport = PBD::new_debug_bit ("transport"); +uint64_t PBD::DEBUG::Slave = PBD::new_debug_bit ("slave"); +uint64_t PBD::DEBUG::SessionEvents = PBD::new_debug_bit ("sessionevents"); +uint64_t PBD::DEBUG::MidiIO = PBD::new_debug_bit ("midiio"); +uint64_t PBD::DEBUG::MackieControl = PBD::new_debug_bit ("mackiecontrol"); +uint64_t PBD::DEBUG::MidiClock = PBD::new_debug_bit ("midiclock"); +uint64_t PBD::DEBUG::Monitor = PBD::new_debug_bit ("monitor"); +uint64_t PBD::DEBUG::Solo = PBD::new_debug_bit ("solo"); +uint64_t PBD::DEBUG::AudioPlayback = PBD::new_debug_bit ("audioplayback"); +uint64_t PBD::DEBUG::Panning = PBD::new_debug_bit ("panning"); +uint64_t PBD::DEBUG::LV2 = PBD::new_debug_bit ("lv2"); +uint64_t PBD::DEBUG::CaptureAlignment = PBD::new_debug_bit ("capturealignment"); +uint64_t PBD::DEBUG::PluginManager = PBD::new_debug_bit ("pluginmanager"); +uint64_t PBD::DEBUG::AudioUnits = PBD::new_debug_bit ("audiounits"); +uint64_t PBD::DEBUG::ControlProtocols = PBD::new_debug_bit ("controlprotocols"); +uint64_t PBD::DEBUG::CycleTimers = PBD::new_debug_bit ("cycletimers"); -void -ARDOUR::list_debug_options () -{ - cerr << _("The following debug options are available. Separate multipe options with commas.\nNames are case-insensitive and can be abbreviated.") << endl << endl; - cerr << "\tAll" << endl; - cerr << "\tMidiSourceIO" << endl; - cerr << "\tMidiPlaylistIO" << endl; - cerr << "\tMidiDiskstreamIO" << endl; - cerr << "\tSnapBBT" << endl; - cerr << "\tConfiguration" << endl; - cerr << "\tLatency" << endl; - cerr << "\tGraph" << endl; - cerr << "\tDestruction" << endl; - cerr << "\tMTC" << endl; - cerr << "\tTransport" << endl; - cerr << "\tSlave" << endl; - cerr << "\tSessionEvents" << endl; -}