summaryrefslogtreecommitdiff
path: root/libs/ardour/disk_reader.cc
AgeCommit message (Collapse)Author
2020-05-15DiskReader: initialize pre-loop-buffer at the right timesPaul Davis
2020-05-13DiskReader: improve commentPaul Davis
2020-05-13DiskReader: always reset file_sample[AUDIO] after an overwritePaul Davis
In theory we only need to do this if the use of a loop for a given overwrite differs from the previous refill or overwrite. However, keeping track of this is hard, and this way effectively enforces the notion that if we do the arithmetic correct, for cases where there's no change in the use of a loop location, this ends up being a no-op (i.e. we are resetting it back to its current value)
2020-05-13avoid off-by-one error when overwriting w/loopPaul Davis
2020-05-12NO-OP: remove commented linePaul Davis
2020-05-12DiskReader::overwrite_existing_audio() now only overwrites data that would ↵Paul Davis
be read There's no need to fill the whole buffer, because we do not consider the whole buffer readable. This uses the recently-added PlaybackBuffer::overwritable_at() API to compute the correct amount of data to overwrite
2020-05-12NO-OP: expand comments for DiskReader::audio_read() parametersPaul Davis
2020-05-12after an overwrite with the loop location set, reset the next sample to be readPaul Davis
2020-05-12trivial reorder of variable assigmentPaul Davis
2020-05-12Don't bother even checking let alone doing internal seeks for zero distancesPaul Davis
2020-05-12use more standard mechanism for "squishing" start of audio read into loop rangePaul Davis
2020-05-12new mechanism to refill pre-loop buffer when loop changes (used for xfading ↵Paul Davis
loop ends)
2020-05-12remove Route::reload_loop() and derivativesPaul Davis
Replacement to follow in subsequent commit
2020-05-07fix comment typoPaul Davis
2020-05-07Fix initial disk-reader fade-inRobin Gareus
Since 4508d5bab this only happened after a fade-out. Currently there is no fade when transport is stopped and monitor mode changes MonitoringDisk <-> MonitoringInput. DiskReader::DeclickAmp is only used for data from disk. Fading live-input data passing through will likely need another Amp.
2020-05-04Set de-click reason monitor vs. start/stop.Robin Gareus
Previously use-monitor-fades was unused in A6, and transition between monitoring states used the use-transport-fades preference.
2020-05-04Fix alignment and de-click when monitoring changes while playingRobin Gareus
Previously it was possible that * declick_out = true, * target_gain == 0, cur_gain != 0 (fade out active) * speed != 0, disk_samples_to_consume > 0. So the disk-reader advanced the playback_sample, but since declick_out is active, the read from the ringbuffer was not committed.
2020-04-30fix 52b906651180 (incorrect logic). Restores audio playback from diskPaul Davis
2020-04-29do not set declick_amp's gain for declick out during export of MIDI-only tracksPaul Davis
When export is done, nothing a MIDI-only track will reduce the gain ("goto midi" inside DiskReader::run() and the "declick-in-progress" state will be permanent
2020-04-14Fix disk-reader alignment when creating tracks while playingRobin Gareus
2020-04-14Fix playback alignment when adding/removing channelsRobin Gareus
The disk-reader assumes that all playback ringbuffers are in sync and have the same fill_level.
2020-04-10remove debug outputPaul Davis
2020-04-10fix mistaken geometrical-math for xfaded loopsPaul Davis
2020-04-10use cout not cerr for some temporary debugging messagesPaul Davis
2020-04-10more debug info for DiskReader::maybe_xfade_loop()Paul Davis
2020-04-08Cont'd work on disk reader channel initializationRobin Gareus
Amend 648beb94. If initial re-fill happens via override buffers, the buffer may still be effectively empty.
2020-04-08Fix false-positive under-run messagesRobin Gareus
Port (or Tracks) can be safely added during playback, however the disk-reader's playback buffer is initially empty. This lead to false-positive Underrun() signals when processing takes place before or concurrently with re-filling the disk-buffer for the new channels. Now new empty buffers are ignored, and produce silence until the initial refill is complete. There is however no per-channel de-click in, yet. This fixes: play some audio track, ctrl+drag a region to the drop-zone, creating a new track while playing.
2020-04-07"fix" some uses of foo<bar<>> by change the closing chars to "> >" (windowsPaul Davis
2020-04-07NO-OP: whitespaceRobin Gareus
2020-04-07Remove unused variableRobin Gareus
2020-04-07NO-OP: whitespaceRobin Gareus
2020-04-01fix boolean logic PART FOUR when trying to avoid complete_refill heuristicPaul Davis
This reworking avoids some confusion caused by the use boost::optional here
2020-03-31fix boolean logic PART THREE when trying to avoid complete_refill heuristicPaul Davis
2020-03-31fix boolean logic PART TWO when trying to avoid complete_refill heuristicPaul Davis
2020-03-31fix boolean logic when trying to avoid complete_refill heuristicPaul Davis
2020-03-31change variable name and debug messages for underrun case (information was ↵Paul Davis
misleading/confusing)
2020-03-31clean up logic for declick out in DiskReaderPaul Davis
This is intended to be a no-op that makes the code easier to read/reason about
2020-03-31if a locate brings us within a heuristic-specified distance of the current ↵Paul Davis
position in a DiskReader, pay attention to loop status If the last read was not looped, but the new one should be, we need to ignore the heuristic. Ditto for vice-versa. This isomorphic with the read-reversed case
2020-03-06Fix MIDI export and post-export transport issuesRobin Gareus
Bug was introduced in 128a45954cf, declick-amp gain was overridden, but declick not cleared. For some reason this did not affect audio-only exports nor all session exports.
2020-03-06Do not de-click during freewheel exportRobin Gareus
2020-02-21fix playback glitch : do not adjust file_sample[Type] after read, it is ↵Paul Davis
canonical We told the DR to read from pos+shift, and it increment file_sample[T] appropriately. We should not adjust it. The only thing that gets adjusted is the sample that will playback (as a result of PlaybackBuffer::increment_read_ptr()
2020-02-21centralize determination of "read-audio-data-in-reverse" and fix seek ↵Paul Davis
"shift" offset There is still a bug related to "shift" that causes a playback discontinuity
2020-02-20add commentPaul Davis
2020-02-20when seeking in disk reader, adjust start of read (if possible) to allow ↵Paul Davis
some reverse internal seek allowance
2020-02-20fix test to decide if we can skip disk buffer refill because we're close ↵Paul Davis
enough (read direction must match)
2020-02-20variable name change (ffa ... 2nd f was "frame" => fsa ... s is "sample")Paul Davis
2020-02-20correctly track is disk read (audio) should be forwards/backwards, and what ↵Paul Davis
was done last time we read from disk
2020-02-20change variable name to be more meaningful/indicativePaul Davis
2020-02-20remove debug outputPaul Davis
2020-02-20Revert "fix behavior of DiskReader when moved after an instrument"Robin Gareus
This reverts commit b2bc934e218a8ed05b6f37edc5585191e60ca288. The commit does causes issues when a user manually removes channels: The disk-reader's ::can_support_io_configuration() at first ignores the user's request, forcing the output channel count to match the DR's current channel config. However, when configuring the DiskReader after that, channels is updated to match the new input-count. Even though the DR itself only plays back using the confgured I/O, all processors after it still use the old channel count. Only a later, second re-configuration step will apply the actual removal to plugins and port. PS. the original commit was mainly intended to fix a crash when adding an instrument plugin *between* disk-writer and disk-reader on a MIDI track.