refactor JACK MIDI port to allow writing from a non-process() thread, and move ARDOUR::MidiEvent into MIDI namespace along with midi_events.h header

git-svn-id: svn://localhost/ardour2/branches/3.0@3155 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-03-18 03:42:32 +00:00
parent d69f4e9e3d
commit eb4a1fdbb8
27 changed files with 214 additions and 109 deletions

View file

@ -432,7 +432,7 @@ SMFSource::write_unlocked (MidiRingBuffer& src, nframes_t cnt)
assert(time >= _timeline_position);
time -= _timeline_position;
const MidiEvent ev(time, size, buf);
const MIDI::Event ev(time, size, buf);
append_event_unlocked(Frames, ev);
if (_model)
@ -452,7 +452,7 @@ SMFSource::write_unlocked (MidiRingBuffer& src, nframes_t cnt)
void
SMFSource::append_event_unlocked(EventTimeUnit unit, const MidiEvent& ev)
SMFSource::append_event_unlocked(EventTimeUnit unit, const MIDI::Event& ev)
{
/*printf("%s - append chan = %u, time = %lf, size = %u, data = ", _path.c_str(),
(unsigned)ev.channel(), ev.time(), ev.size());
@ -886,7 +886,7 @@ SMFSource::load_model(bool lock, bool force_reload)
fseek(_fd, _header_size, 0);
uint64_t time = 0; /* in SMF ticks */
MidiEvent ev;
MIDI::Event ev;
size_t scratch_size = 0; // keep track of scratch and minimize reallocs