[beast/devel: 32/77] BSE: use BSE_KEY_DEBUG() for sequencer debugging
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/devel: 32/77] BSE: use BSE_KEY_DEBUG() for sequencer debugging
- Date: Wed, 1 May 2013 17:30:01 +0000 (UTC)
commit a71b851ed079a1f7a928a3b25a9dc6c9558f24ac
Author: Tim Janik <timj gnu org>
Date: Sun Apr 7 19:09:58 2013 +0200
BSE: use BSE_KEY_DEBUG() for sequencer debugging
bse/bsesequencer.cc | 29 +++++++++++++----------------
1 files changed, 13 insertions(+), 16 deletions(-)
---
diff --git a/bse/bsesequencer.cc b/bse/bsesequencer.cc
index 48b3fd4..a526f2d 100644
--- a/bse/bsesequencer.cc
+++ b/bse/bsesequencer.cc
@@ -14,8 +14,8 @@
#include <string.h>
#include <vector>
-#define CHECKTRACE() UNLIKELY (bse_trace_args.sequencer)
-#define SEQTRACE(...) do { if (CHECKTRACE()) sfi_debug_channel_printf (bse_trace_args.sequencer, NULL,
__VA_ARGS__); } while (0)
+#define SDEBUG(...) BSE_KEY_DEBUG ("sequencer", __VA_ARGS__)
+
#define BSE_SEQUENCER_FUTURE_BLOCKS (7)
namespace Bse {
@@ -327,7 +327,7 @@ Sequencer::sequencer_thread ()
{
Bse::TaskRegistry::add ("Sequencer", Rapicorn::ThisThread::process_pid(),
Rapicorn::ThisThread::thread_pid());
sequencer_thread_self = &ThreadInfo::self();
- SEQTRACE ("SEQ:thrdstrt: now=%llu", Bse::TickStamp::current());
+ SDEBUG ("thrdstrt: now=%llu", Bse::TickStamp::current());
Bse::TickStampWakeupP wakeup = Bse::TickStamp::create_wakeup ([&]() { this->wakeup(); });
bse_message_setup_thread_handler();
BSE_SEQUENCER_LOCK();
@@ -382,7 +382,7 @@ Sequencer::sequencer_thread ()
}
while (pool_poll_Lm (-1));
BSE_SEQUENCER_UNLOCK();
- SEQTRACE ("SEQ:thrdstop: now=%llu", Bse::TickStamp::current());
+ SDEBUG ("thrdstop: now=%llu", Bse::TickStamp::current());
Bse::TaskRegistry::remove (Rapicorn::ThisThread::thread_pid());
}
@@ -452,13 +452,13 @@ Sequencer::process_track_SL (BseTrack *track, double start_stamp, uint start_tic
if (!part && next)
{
part = bse_track_get_part_SL (track, next, &start, &next);
- SEQTRACE ("SEQ:trackjmp: tick=%u fast forward to first part part=%p now=%llu", start_tick, part,
Bse::TickStamp::current());
+ SDEBUG ("trackjmp: tick=%u fast forward to first part part=%p now=%llu", start_tick, part,
Bse::TickStamp::current());
}
if (!part || (next == 0 && start + part->last_tick_SL < start_tick))
{
track->track_done_SL = !bse_midi_receiver_voices_pending (midi_receiver, track->midi_channel_SL);
- SEQTRACE ("SEQ:trackchk: tick=%u next=%u part=%p done=%u now=%llu", // part==NULL || start + (part ?
part->last_tick_SL : 0) < start_tick
- start_tick, next, part, track->track_done_SL, Bse::TickStamp::current());
+ SDEBUG ("trackchk: tick=%u next=%u part=%p done=%u now=%llu", // part==NULL || start + (part ?
part->last_tick_SL : 0) < start_tick
+ start_tick, next, part, track->track_done_SL, Bse::TickStamp::current());
part = NULL;
}
while (part && start < bound)
@@ -501,13 +501,10 @@ Sequencer::process_part_SL (BsePart *part, double start_stamp, uint start_tick,
freq);
bse_midi_receiver_push_event (midi_receiver, eon);
bse_midi_receiver_push_event (midi_receiver, eoff);
- if (CHECKTRACE())
- {
- SEQTRACE ("SEQ:note-on: tick=%llu midinote=%-3d velocity=%02x freq=% 10f now=%llu",
- uint64 (eon->delta_time), note->note, bse_ftoi (note->velocity * 128), freq,
Bse::TickStamp::current());
- SEQTRACE ("SEQ:note-off: tick=%llu midinote=%-3d velocity=%02x freq=% 10f now=%llu",
- uint64 (eoff->delta_time), note->note, bse_ftoi (note->velocity * 128), freq,
Bse::TickStamp::current());
- }
+ SDEBUG ("note-on: tick=%llu midinote=%-3d velocity=%02x freq=% 10f now=%llu",
+ uint64 (eon->delta_time), note->note, bse_ftoi (note->velocity * 128), freq,
Bse::TickStamp::current());
+ SDEBUG ("note-off: tick=%llu midinote=%-3d velocity=%02x freq=% 10f now=%llu",
+ uint64 (eoff->delta_time), note->note, bse_ftoi (note->velocity * 128), freq,
Bse::TickStamp::current());
note++;
}
}
@@ -522,8 +519,8 @@ Sequencer::process_part_SL (BsePart *part, double start_stamp, uint start_tick,
bse_dtoull (start_stamp + (node->tick - start_tick) *
stamps_per_tick),
BseMidiSignalType (cev->ctype), cev->value);
bse_midi_receiver_push_event (midi_receiver, event);
- SEQTRACE ("SEQ:control: tick=%llu midisignal=%-3d value=%f now=%llu",
- uint64 (event->delta_time), cev->ctype, cev->value, Bse::TickStamp::current());
+ SDEBUG ("control: tick=%llu midisignal=%-3d value=%f now=%llu",
+ uint64 (event->delta_time), cev->ctype, cev->value, Bse::TickStamp::current());
}
node++;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]