use reverse-reading of MIDI data in DiskReader
This commit is contained in:
parent
725a6fc67f
commit
a8d62ce056
@ -778,10 +778,15 @@ DiskReader::_do_refill_with_alloc (bool partial_fill)
|
|||||||
int
|
int
|
||||||
DiskReader::refill (Sample* sum_buffer, Sample* mixdown_buffer, float* gain_buffer, samplecnt_t fill_level)
|
DiskReader::refill (Sample* sum_buffer, Sample* mixdown_buffer, float* gain_buffer, samplecnt_t fill_level)
|
||||||
{
|
{
|
||||||
/* nothing to do here for MIDI - the entire playlist has been rendered
|
if (refill_audio (sum_buffer, mixdown_buffer, gain_buffer, fill_level)) {
|
||||||
* into RAM already.
|
return -1;
|
||||||
*/
|
}
|
||||||
return refill_audio (sum_buffer, mixdown_buffer, gain_buffer, fill_level);
|
|
||||||
|
if ((_session.transport_speed() < 0.0f) != rt_midibuffer()->reversed()) {
|
||||||
|
rt_midibuffer()->reverse ();
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1090,13 +1095,9 @@ DiskReader::get_midi_playback (MidiBuffer& dst, samplepos_t start_sample, sample
|
|||||||
target = &dst;
|
target = &dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: do not fetch any data from disk if we're moving
|
if (!pending_overwrite() && !_no_disk_output) {
|
||||||
* backwards. TODO: reverse MIDI
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!pending_overwrite() && !_no_disk_output && (end_sample >= start_sample)) {
|
const samplecnt_t nframes = abs (end_sample - start_sample);
|
||||||
|
|
||||||
const samplecnt_t nframes = end_sample - start_sample;
|
|
||||||
|
|
||||||
if (ms & MonitoringDisk) {
|
if (ms & MonitoringDisk) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user