summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-01-07 02:39:38 +0000
committerDavid Robillard <d@drobilla.net>2010-01-07 02:39:38 +0000
commit2d3e27ef80e4fc8704390ea7a878068b5ae6a370 (patch)
treec57b7e83b480c4547f0db99df59c5223ee62536b /src
parent1c217d7a8af8842f9b602383bb0b3e4a49209082 (diff)
downloadingen-2d3e27ef80e4fc8704390ea7a878068b5ae6a370.tar.gz
ingen-2d3e27ef80e4fc8704390ea7a878068b5ae6a370.tar.bz2
ingen-2d3e27ef80e4fc8704390ea7a878068b5ae6a370.zip
Fix compilation with --log-debug.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2356 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/client/OSCClientReceiver.cpp4
-rw-r--r--src/engine/OSCEngineReceiver.cpp5
-rw-r--r--src/engine/PatchImpl.cpp7
-rw-r--r--src/engine/internals/Note.cpp5
-rw-r--r--src/engine/internals/Trigger.cpp1
-rw-r--r--src/shared/OSCSender.cpp5
6 files changed, 19 insertions, 8 deletions
diff --git a/src/client/OSCClientReceiver.cpp b/src/client/OSCClientReceiver.cpp
index bb3c098a..9a1808a2 100644
--- a/src/client/OSCClientReceiver.cpp
+++ b/src/client/OSCClientReceiver.cpp
@@ -38,7 +38,11 @@ OSCClientReceiver::OSCClientReceiver(int listen_port, SharedPtr<Shared::ClientIn
, _listen_port(listen_port)
, _st(NULL)
{
+#ifdef LOG_DEBUG
+ start(true);
+#else
start(false); // true = dump, false = shutup
+#endif
}
diff --git a/src/engine/OSCEngineReceiver.cpp b/src/engine/OSCEngineReceiver.cpp
index e0b176bc..95823c1d 100644
--- a/src/engine/OSCEngineReceiver.cpp
+++ b/src/engine/OSCEngineReceiver.cpp
@@ -76,8 +76,9 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t
free(lo_url);
}
- // For debugging, print all incoming OSC messages
- //lo_server_add_method(_server, NULL, NULL, generic_cb, NULL);
+#ifdef LOG_DEBUG
+ lo_server_add_method(_server, NULL, NULL, generic_cb, NULL);
+#endif
// Set response address for this message.
// It's important this is first and returns nonzero.
diff --git a/src/engine/PatchImpl.cpp b/src/engine/PatchImpl.cpp
index 4dc61a21..c2d60de8 100644
--- a/src/engine/PatchImpl.cpp
+++ b/src/engine/PatchImpl.cpp
@@ -27,6 +27,7 @@
#include "DuplexPort.hpp"
#include "Engine.hpp"
#include "ProcessSlave.hpp"
+#include "ingen-config.h"
using namespace std;
using namespace Raul;
@@ -466,10 +467,8 @@ PatchImpl::compile() const
#ifdef LOG_DEBUG
debug << path() << " compiled {" << endl;
- for (size_t i=0; i < process_order->size(); ++i) {
- assert(process_order->at(i));
- debug << " " << process_order->at(i)->path() << endl;
- }
+ for (size_t i=0; i < compiled_patch->size(); ++i)
+ debug << " " << compiled_patch->at(i).node()->path() << endl;
debug << "}" << endl;
#endif
diff --git a/src/engine/internals/Note.cpp b/src/engine/internals/Note.cpp
index 76659cfd..9ed45c96 100644
--- a/src/engine/internals/Note.cpp
+++ b/src/engine/internals/Note.cpp
@@ -35,6 +35,7 @@
#define LOG(s) s << "[NoteNode] "
using namespace std;
+using namespace Raul;
namespace Ingen {
namespace Internals {
@@ -353,7 +354,7 @@ NoteNode::free_voice(ProcessContext& context, uint32_t voice, FrameTime time)
} else {
// No new note for voice, deactivate (set gate low)
#ifdef LOG_DEBUG
- LOG(debug) << "Note off: key " << (int)note_num << " voice " << voice << endl;
+ LOG(debug) << "Note off: key " << (*_voices)[voice].note << " voice " << voice << endl;
#endif
((AudioBuffer*)_gate_port->buffer(voice).get())->set_value(0.0f, context.start(), time);
(*_voices)[voice].state = Voice::FREE;
@@ -368,7 +369,7 @@ NoteNode::all_notes_off(ProcessContext& context, FrameTime time)
assert(time - context.start() < _buffer_size);
#ifdef LOG_DEBUG
- LOG(debug) << "All notes off @ " << offset << endl;
+ LOG(debug) << "All notes off @ " << time << endl;
#endif
// FIXME: set all keys to Key::OFF?
diff --git a/src/engine/internals/Trigger.cpp b/src/engine/internals/Trigger.cpp
index 7c05a1d3..440e9a63 100644
--- a/src/engine/internals/Trigger.cpp
+++ b/src/engine/internals/Trigger.cpp
@@ -26,6 +26,7 @@
#include "OutputPort.hpp"
#include "ProcessContext.hpp"
#include "util.hpp"
+#include "ingen-config.h"
#define LOG(s) s << "[TriggerNode] "
diff --git a/src/shared/OSCSender.cpp b/src/shared/OSCSender.cpp
index 2d9cbbc4..151a3f40 100644
--- a/src/shared/OSCSender.cpp
+++ b/src/shared/OSCSender.cpp
@@ -20,6 +20,7 @@
#include <stdarg.h>
#include "raul/log.hpp"
#include "OSCSender.hpp"
+#include "ingen-config.h"
using namespace std;
using namespace Raul;
@@ -82,6 +83,10 @@ OSCSender::send(const char *path, const char *types, ...)
if (!_enabled)
return 0;
+#ifdef LOG_DEBUG
+ info << "[OSCSender] " << path << " (" << types << ")" << endl;
+#endif
+
va_list args;
va_start(args, types);