mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
Merged with trunk R1010
git-svn-id: svn://localhost/ardour2/branches/midi@1011 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
22e41063d5
commit
af105afe6c
3 changed files with 5 additions and 27 deletions
|
|
@ -273,6 +273,8 @@ AudioRegion::_read_at (const SourceList& srcs, Sample *buf, Sample *mixdown_buff
|
|||
nframes_t position, nframes_t cnt,
|
||||
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 buf_offset;
|
||||
nframes_t to_read;
|
||||
|
|
|
|||
|
|
@ -129,33 +129,9 @@ MidiRegion::_read_at (const SourceList& srcs, MidiRingBuffer& dst,
|
|||
jack_nframes_t position, jack_nframes_t dur,
|
||||
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 src_offset = 0;
|
||||
jack_nframes_t to_read = 0;
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ SMFSource::read_event(MidiEvent& ev) const
|
|||
assert(!feof(_fd));
|
||||
int type = fgetc(_fd);
|
||||
if ((unsigned char)type == 0x2F) {
|
||||
cerr << "SMF - hit EOT" << endl;
|
||||
//cerr << "SMF - hit EOT" << endl;
|
||||
return -1; // we hit the logical EOF anyway...
|
||||
} else {
|
||||
ev.size = 0;
|
||||
|
|
@ -290,7 +290,7 @@ SMFSource::read_event(MidiEvent& ev) const
|
|||
jack_nframes_t
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue