mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-07 14:15:46 +01:00
further API changes to MIDIRegion::render() to allow for use by triggers
This commit is contained in:
parent
787e5a2ea8
commit
948500bbc7
2 changed files with 5 additions and 3 deletions
|
|
@ -114,6 +114,7 @@ class LIBARDOUR_API MidiRegion : public Region
|
||||||
NoteMode mode,
|
NoteMode mode,
|
||||||
timepos_t const & read_start,
|
timepos_t const & read_start,
|
||||||
timecnt_t const & read_length,
|
timecnt_t const & read_length,
|
||||||
|
timepos_t const & source_position,
|
||||||
MidiChannelFilter* filter) const;
|
MidiChannelFilter* filter) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,7 @@ MidiRegion::render (Evoral::EventSink<samplepos_t>& dst,
|
||||||
NoteMode mode,
|
NoteMode mode,
|
||||||
MidiChannelFilter* filter) const
|
MidiChannelFilter* filter) const
|
||||||
{
|
{
|
||||||
return render_range (dst, chan_n, mode, this->start(), _length, filter);
|
return render_range (dst, chan_n, mode, this->start(), _length, source_position(), filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
@ -292,6 +292,7 @@ MidiRegion::render_range (Evoral::EventSink<samplepos_t>& dst,
|
||||||
NoteMode mode,
|
NoteMode mode,
|
||||||
timepos_t const & read_start,
|
timepos_t const & read_start,
|
||||||
timecnt_t const & read_length,
|
timecnt_t const & read_length,
|
||||||
|
timepos_t const & source_position,
|
||||||
MidiChannelFilter* filter) const
|
MidiChannelFilter* filter) const
|
||||||
{
|
{
|
||||||
/* precondition: caller has verified that we cover the desired section */
|
/* precondition: caller has verified that we cover the desired section */
|
||||||
|
|
@ -327,7 +328,7 @@ MidiRegion::render_range (Evoral::EventSink<samplepos_t>& dst,
|
||||||
src->midi_read (
|
src->midi_read (
|
||||||
lm, // source lock
|
lm, // source lock
|
||||||
dst, // destination buffer
|
dst, // destination buffer
|
||||||
this->source_position(), // start position of the source in session samples
|
source_position, // start position of the source in session samples
|
||||||
read_start,
|
read_start,
|
||||||
read_length,
|
read_length,
|
||||||
0,
|
0,
|
||||||
|
|
@ -340,7 +341,7 @@ MidiRegion::render_range (Evoral::EventSink<samplepos_t>& dst,
|
||||||
* Note-Off's get inserted at the end of the region
|
* Note-Off's get inserted at the end of the region
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const timepos_t end = source_position() + read_start + read_length;
|
const timepos_t end = source_position + read_start + read_length;
|
||||||
tracker.resolve_notes (dst, end.samples());
|
tracker.resolve_notes (dst, end.samples());
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue