mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Fix region-peak display for trimmed regions
This commit is contained in:
parent
5cd26221ce
commit
41c52882af
1 changed files with 4 additions and 1 deletions
|
|
@ -87,12 +87,15 @@ RegionPeakCursor::set (AudioRegionView* arv, samplepos_t when, samplecnt_t sampl
|
|||
assert (ar);
|
||||
assert (ar->n_channels () > 0);
|
||||
|
||||
sampleoffset_t s = when + ar->start () - ar->position ();
|
||||
sampleoffset_t s = when - ar->position ();
|
||||
if (s < 0 || s > ar->length ()) {
|
||||
hide ();
|
||||
return;
|
||||
}
|
||||
|
||||
/* read_peaks() offset is relative to the region's source */
|
||||
s += ar->start ();
|
||||
|
||||
PeakData p;
|
||||
for (uint32_t chn = 0; chn < ar->n_channels (); ++chn) {
|
||||
PeakData pc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue