DEBUG -- REVERT -- Mark region read calls

This commit is contained in:
Robin Gareus 2024-03-07 14:28:03 +01:00
parent 34a8a26820
commit 03fec98d2e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
7 changed files with 9 additions and 1 deletions

View File

@ -276,6 +276,7 @@ AnalysisWindow::analyze_data (Gtk::Button * /*button*/)
n = slen - x;
}
// XXX playlist read
n = pl->read(buf, mixbuf, gain, j->start() + timepos_t (x), timecnt_t (n), channel).samples();
if ( n < fft_graph.windowSize()) {

View File

@ -690,6 +690,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
fs = sources[n];
// XXX playlist read
if (playlist.read (buf, buf, gain_buffer, timepos_t (pos), this_time, n) != this_time) {
break;
}

View File

@ -153,6 +153,7 @@ AnalysisGraph::analyze_range (std::shared_ptr<Route> route, std::shared_ptr<Audi
samplecnt_t n = 0;
for (uint32_t channel = 0; channel < n_audio; ++channel) {
// XXX playlist read
n = pl->read (_buf, _mixbuf, _gainbuf, timepos_t (rpos + x), timecnt_t (chunk), channel).samples();
ConstProcessContext<Sample> context (_buf, n, 1);

View File

@ -141,6 +141,7 @@ AudioPlaylistSource::read_unlocked (Sample* dst, samplepos_t start, samplecnt_t
boost::scoped_array<float> sbuf(new float[to_read]);
boost::scoped_array<gain_t> gbuf(new gain_t[to_read]);
// XXX playlist read
std::dynamic_pointer_cast<AudioPlaylist>(_playlist)->read (dst, sbuf.get(), gbuf.get(), timepos_t (start)+_playlist_offset, timecnt_t (to_read), _playlist_channel);
if (to_zero) {

View File

@ -220,6 +220,7 @@ AudioTrack::export_stuff (BufferSet& buffers, samplepos_t start, samplecnt_t nfr
assert(buffers.count().n_audio() >= 1);
assert ((samplecnt_t) buffers.get_audio(0).capacity() >= nframes);
// XXX playlist read -> OK
if (apl->read (buffers.get_audio(0).data(), mix_buffer.get(), gain_buffer.get(), timepos_t (start), timecnt_t (nframes)) != nframes) {
return -1;
}
@ -230,6 +231,7 @@ AudioTrack::export_stuff (BufferSet& buffers, samplepos_t start, samplecnt_t nfr
++bi;
for ( ; bi != buffers.audio_end(); ++bi, ++n) {
if (n < _disk_reader->output_streams().n_audio()) {
// XXX playlist read -> OK
if (apl->read (bi->data(), mix_buffer.get(), gain_buffer.get(), timepos_t (start), timecnt_t (nframes), n) != nframes) {
return -1;
}

View File

@ -1056,6 +1056,7 @@ DiskReader::audio_read (Sample* sum_buffer,
* useful after the return from AudioPlayback::read()
*/
// XXX playlist read
if (audio_playlist ()->read (sum_buffer, mixdown_buffer, gain_buffer, timepos_t (start), timecnt_t::from_samples (this_read), channel) != this_read) {
error << string_compose (_("DiskReader %1: cannot read %2 from playlist at sample %3"), id (), this_read, start) << endmsg;
return 0;
@ -1979,6 +1980,7 @@ DiskReader::setup_preloop_buffer ()
rci->resize_preloop (loop_fade_length);
if (loc->start () > loop_fade_length) {
// XXX playlist read
audio_playlist ()->read (rci->pre_loop_buffer, mix_buf.get (), gain_buf.get (), read_start, read_cnt, channel);
} else {
memset (rci->pre_loop_buffer, 0, sizeof (Sample) * loop_fade_length);

View File

@ -1538,7 +1538,7 @@ LuaBindings::common (lua_State* L)
.endClass ()
.deriveWSPtrClass <AudioPlaylist, Playlist> ("AudioPlaylist")
.addFunction ("read", &AudioPlaylist::read)
.addFunction ("read", &AudioPlaylist::read) // XXX playlist read
.endClass ()
.deriveWSPtrClass <MidiPlaylist, Playlist> ("MidiPlaylist")