move new Waves backend debug bits into libs/pbd/debug.cc because backends are dynamically loaded AFTER command line parsing.

See comments in libs/pbd/debug.cc for more details
This commit is contained in:
Paul Davis 2014-10-29 22:34:12 -04:00
parent 4bc383e663
commit 2c1c92e8de
6 changed files with 21 additions and 63 deletions

View file

@ -1,24 +0,0 @@
/*
Copyright (C) 2010 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "debug.h"
uint64_t PBD::DEBUG::WavesMIDI = PBD::new_debug_bit ("WavesMIDI");
uint64_t PBD::DEBUG::WavesAudio = PBD::new_debug_bit ("WavesAudio");

View file

@ -1,35 +0,0 @@
/*
Copyright (C) 2014 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __ardour_waves_backend_debug_h__
#define __ardour_waves_backend_debug_h__
#include <stdint.h>
#include "pbd/debug.h"
namespace PBD {
namespace DEBUG {
extern uint64_t WavesMIDI;
extern uint64_t WavesAudio;
}
}
#endif /* __ardour_waves_backend_debug_h__ */

View file

@ -20,13 +20,12 @@
#include <iostream>
#include "pbd/error.h"
#include "pbd/debug.h"
#include "pbd/compose.h"
#include "waves_midi_device.h"
#include "waves_midi_event.h"
#include "debug.h"
// use non-zero latency because we want output to be timestapmed
#define LATENCY 0

View file

@ -38,7 +38,6 @@ def build(bld):
obj.framework = 'CoreMIDI'
obj.source = [
'debug.cc',
'waves_audiobackend.cc',
'waves_audiobackend.latency.cc',
'waves_audiobackend.midi.cc',

View file

@ -51,6 +51,20 @@ uint64_t PBD::DEBUG::EventLoop = PBD::new_debug_bit ("eventloop");
uint64_t PBD::DEBUG::AbstractUI = PBD::new_debug_bit ("abstractui");
uint64_t PBD::DEBUG::FileUtils = PBD::new_debug_bit ("fileutils");
/* 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.
*/
uint64_t PBD::DEBUG::WavesMIDI = PBD::new_debug_bit ("WavesMIDI");
uint64_t PBD::DEBUG::WavesAudio = PBD::new_debug_bit ("WavesAudio");
uint64_t PBD::debug_bits = 0x0;
uint64_t

View file

@ -45,7 +45,12 @@ namespace PBD {
LIBPBD_API extern uint64_t Pool;
LIBPBD_API extern uint64_t EventLoop;
LIBPBD_API extern uint64_t AbstractUI;
extern uint64_t FileUtils;
LIBPBD_API extern uint64_t FileUtils;
/* See notes in ../debug.cc on why these are defined here */
LIBPBD_API extern uint64_t WavesMIDI;
LIBPBD_API extern uint64_t WavesAudio;
}
}