diff options
author | Robin Gareus <robin@gareus.org> | 2016-02-16 13:21:28 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-02-16 13:21:28 +0100 |
commit | 9a281963e143d1191d701f6f248a956bdaf9200d (patch) | |
tree | 9bba90acbae45d0b382cb22ff3071c9a96ac6c74 | |
parent | 51f9483aab5bf770161487f0c4df5e52e9a4da82 (diff) |
proper debug prints for Analyser
-rw-r--r-- | libs/ardour/ardour/debug.h | 1 | ||||
-rw-r--r-- | libs/ardour/debug.cc | 1 | ||||
-rw-r--r-- | libs/audiographer/src/general/analyser.cc | 10 |
3 files changed, 8 insertions, 4 deletions
diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h index 6ebf21a958..e46c84c3c8 100644 --- a/libs/ardour/ardour/debug.h +++ b/libs/ardour/ardour/debug.h @@ -77,6 +77,7 @@ namespace PBD { LIBARDOUR_API extern DebugBits BackendPorts; LIBARDOUR_API extern DebugBits VSTCallbacks; LIBARDOUR_API extern DebugBits FaderPort; + LIBARDOUR_API extern DebugBits ExportAnalysis; } } diff --git a/libs/ardour/debug.cc b/libs/ardour/debug.cc index 86afaf6917..7c46ec7853 100644 --- a/libs/ardour/debug.cc +++ b/libs/ardour/debug.cc @@ -74,3 +74,4 @@ PBD::DebugBits PBD::DEBUG::BackendThreads = PBD::new_debug_bit ("backendthreads" PBD::DebugBits PBD::DEBUG::BackendPorts = PBD::new_debug_bit ("backendports"); PBD::DebugBits PBD::DEBUG::VSTCallbacks = PBD::new_debug_bit ("vstcallbacks"); PBD::DebugBits PBD::DEBUG::FaderPort = PBD::new_debug_bit ("faderport"); +PBD::DebugBits PBD::DEBUG::ExportAnalysis = PBD::new_debug_bit ("ExportAnalysis"); diff --git a/libs/audiographer/src/general/analyser.cc b/libs/audiographer/src/general/analyser.cc index e59032f2f5..81c7d92ef4 100644 --- a/libs/audiographer/src/general/analyser.cc +++ b/libs/audiographer/src/general/analyser.cc @@ -18,6 +18,8 @@ #include "audiographer/general/analyser.h" #include "pbd/fastlog.h" +#include "pbd/compose.h" +#include "ardour/debug.h" using namespace AudioGrapher; @@ -34,7 +36,9 @@ Analyser::Analyser (float sample_rate, unsigned int channels, framecnt_t bufsize { assert (bufsize % channels == 0); assert (bufsize > 1); - //printf ("NEW ANALYSER %p r:%.1f c:%d f:%ld l%ld\n", this, sample_rate, channels, bufsize, n_samples); + + DEBUG_TRACE (PBD::DEBUG::ExportAnalysis, string_compose ("Analyser r:%1 c:%2 f:%3 d:%4", sample_rate, channels, bufsize, n_samples)); + if (channels > 0 && channels <= 2) { using namespace Vamp::HostExt; PluginLoader* loader (PluginLoader::getInstance ()); @@ -42,7 +46,6 @@ Analyser::Analyser (float sample_rate, unsigned int channels, framecnt_t bufsize assert (_ebur128_plugin); _ebur128_plugin->reset (); if (!_ebur128_plugin->initialise (channels, _bufsize, _bufsize)) { - printf ("FAILED TO INITIALIZE EBUR128\n"); delete _ebur128_plugin; _ebur128_plugin = 0; } @@ -56,7 +59,6 @@ Analyser::Analyser (float sample_rate, unsigned int channels, framecnt_t bufsize assert (_dbtp_plugin[c]); _dbtp_plugin[c]->reset (); if (!_dbtp_plugin[c]->initialise (1, _bufsize, _bufsize)) { - printf ("FAILED TO INITIALIZE DBTP %d\n", c); delete _dbtp_plugin[c]; _dbtp_plugin[c] = 0; } @@ -230,8 +232,8 @@ Analyser::process (ProcessContext<float> const & c) ARDOUR::ExportAnalysisPtr Analyser::result () { - //printf ("PROCESSED %ld / %ld samples\n", _pos, _n_samples); if (_pos == 0) { + DEBUG_TRACE (PBD::DEBUG::ExportAnalysis, string_compose ("Processed %1 / %2 samples", _pos, _n_samples)); return ARDOUR::ExportAnalysisPtr (); } if (_ebur128_plugin) { |