13
0

timeline types for libs/waveview

This commit is contained in:
Paul Davis 2020-09-26 09:14:01 -06:00
parent e090834525
commit c9035efb25
2 changed files with 5 additions and 5 deletions

View File

@ -1346,7 +1346,7 @@ WaveView::clear_cache ()
samplecnt_t
WaveView::region_length() const
{
return _region->length() - (_props->region_start - _region->start());
return _region->length_samples() - (_props->region_start - _region->start_sample());
}
samplepos_t
@ -1383,8 +1383,8 @@ WaveView::region_resized ()
}
begin_change ();
_props->region_start = _region->start();
_props->region_end = _region->start() + _region->length();
_props->region_start = _region->start_sample();
_props->region_end = _region->start_sample() + _region->length_samples();
_bounding_box_dirty = true;
end_change ();
}

View File

@ -31,8 +31,8 @@
namespace ArdourWaveView {
WaveViewProperties::WaveViewProperties (boost::shared_ptr<ARDOUR::AudioRegion> region)
: region_start (region->start ())
, region_end (region->start () + region->length ())
: region_start (region->start_sample ())
, region_end (region->start_sample () + region->length_samples ())
, channel (0)
, height (64)
, samples_per_pixel (0)