Merged with trunk R1010

git-svn-id: svn://localhost/ardour2/branches/midi@1011 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2006-10-26 03:15:49 +00:00
parent 22e41063d5
commit af105afe6c
3 changed files with 5 additions and 27 deletions

View file

@ -273,6 +273,8 @@ AudioRegion::_read_at (const SourceList& srcs, Sample *buf, Sample *mixdown_buff
nframes_t position, nframes_t cnt, nframes_t position, nframes_t cnt,
uint32_t chan_n, nframes_t read_frames, nframes_t skip_frames) const uint32_t chan_n, nframes_t read_frames, nframes_t skip_frames) const
{ {
//cerr << _name << "._read_at(" << position << ") - " << _position << endl;
nframes_t internal_offset; nframes_t internal_offset;
nframes_t buf_offset; nframes_t buf_offset;
nframes_t to_read; nframes_t to_read;

View file

@ -129,33 +129,9 @@ MidiRegion::_read_at (const SourceList& srcs, MidiRingBuffer& dst,
jack_nframes_t position, jack_nframes_t dur, jack_nframes_t position, jack_nframes_t dur,
uint32_t chan_n, jack_nframes_t read_frames, jack_nframes_t skip_frames) const uint32_t chan_n, jack_nframes_t read_frames, jack_nframes_t skip_frames) const
{ {
/*
MidiEvent ev;
RawMidi data[4];
const char note = rand()%30 + 30; //cerr << _name << "._read_at(" << position << ") - " << _position << endl;
ev.buffer = data;
ev.time = position;
ev.size = 3;
data[0] = 0x90;
data[1] = note;
data[2] = 120;
dst.write(ev);
ev.buffer = data;
ev.time = (jack_nframes_t)(position + (9/10.0 * dur));
assert(ev.time < position + dur);
ev.size = 3;
data[0] = 0x80;
data[1] = note;
data[2] = 64;
dst.write(ev);
_read_data_count += dur;
return dur;
*/
jack_nframes_t internal_offset = 0; jack_nframes_t internal_offset = 0;
jack_nframes_t src_offset = 0; jack_nframes_t src_offset = 0;
jack_nframes_t to_read = 0; jack_nframes_t to_read = 0;

View file

@ -263,7 +263,7 @@ SMFSource::read_event(MidiEvent& ev) const
assert(!feof(_fd)); assert(!feof(_fd));
int type = fgetc(_fd); int type = fgetc(_fd);
if ((unsigned char)type == 0x2F) { if ((unsigned char)type == 0x2F) {
cerr << "SMF - hit EOT" << endl; //cerr << "SMF - hit EOT" << endl;
return -1; // we hit the logical EOF anyway... return -1; // we hit the logical EOF anyway...
} else { } else {
ev.size = 0; ev.size = 0;
@ -290,7 +290,7 @@ SMFSource::read_event(MidiEvent& ev) const
jack_nframes_t jack_nframes_t
SMFSource::read_unlocked (MidiRingBuffer& dst, jack_nframes_t start, jack_nframes_t cnt, jack_nframes_t stamp_offset) const SMFSource::read_unlocked (MidiRingBuffer& dst, jack_nframes_t start, jack_nframes_t cnt, jack_nframes_t stamp_offset) const
{ {
//cerr << "SMF - read " << start << " -- " << cnt; //cerr << "SMF - read " << start << ", count=" << cnt << ", offset=" << stamp_offset << endl;
jack_nframes_t time = 0; jack_nframes_t time = 0;