13
0

minor tweaks to debug output and comments and header order

git-svn-id: svn://localhost/ardour2/branches/3.0@9285 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-04-04 21:48:17 +00:00
parent d043ee396b
commit 3a40d9ef6b
3 changed files with 11 additions and 6 deletions

View File

@ -745,7 +745,9 @@ AudioDiskstream::overwrite_existing_buffers ()
mixdown_buffer = new Sample[size];
gain_buffer = new float[size];
/* reduce size so that we can fill the buffer correctly. */
/* reduce size so that we can fill the buffer correctly (ringbuffers
* can only handle size-1, otherwise they appear to be empty)
*/
size--;
uint32_t n=0;

View File

@ -24,6 +24,8 @@
#include <stdlib.h>
#include "pbd/error.h"
#include "evoral/EventList.hpp"
#include "ardour/debug.h"
@ -34,8 +36,6 @@
#include "ardour/session.h"
#include "ardour/midi_ring_buffer.h"
#include "pbd/error.h"
#include "i18n.h"
using namespace ARDOUR;

View File

@ -219,7 +219,7 @@ MidiSource::midi_read (Evoral::EventSink<framepos_t>& dst, framepos_t source_sta
}
_model_iter_valid = true;
} else {
DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("*** %1 use cached iterator for %1 / %2\n", _name, source_start, start));
DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("*** %1 use cachediterator for %1 / %2\n", _name, source_start, start));
}
_last_read_end = start + cnt;
@ -231,13 +231,16 @@ MidiSource::midi_read (Evoral::EventSink<framepos_t>& dst, framepos_t source_sta
/* convert event times to session frames by adding on the source start position in session frames */
dst.write (time_frames + source_start, i->event_type(), i->size(), i->buffer());
DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("%1: add event @ %2 type %3 size = %4\n",
_name, time_frames + source_start, i->event_type(), i->size()));
if (tracker) {
Evoral::MIDIEvent<Evoral::MusicalTime>& ev (*(Evoral::MIDIEvent<Evoral::MusicalTime>*) (&(*i)));
if (ev.is_note_on()) {
DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("\t%1 add note on %2 @ %3 velocity %4\n", _name, (int) ev.note(), time_frames, (int) ev.velocity()));
DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("\t%1 track note on %2 @ %3 velocity %4\n", _name, (int) ev.note(), time_frames, (int) ev.velocity()));
tracker->add (ev.note(), ev.channel());
} else if (ev.is_note_off()) {
DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("\t%1 add note off %2 @ %3\n", _name, (int) ev.note(), time_frames));
DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("\t%1 track note off %2 @ %3\n", _name, (int) ev.note(), time_frames));
tracker->remove (ev.note(), ev.channel());
}
}