mirror of
https://github.com/LMMS/lmms.git
synced 2026-05-14 01:36:21 -04:00
Add private setters for "from" and "to" (#7071)
* Add private setters for "from" and "to" Add private setters for the "from" and "to" values in `AudioFileProcessorWaveView`. When being used the setters will ensure that the bounds are respected. Also add a `range` method because this computation was done repeatedly throughout the code. Fixes #7068 but masks some of the original problems with the code that computes out-of-bounds values for "from" and "to" like the `slide` method. Problematic code can still be found by temporarily adding the following assertions to the setters: * `assert (to <= m_sample->sampleSize());` in `setTo` * `assert (from >= 0);` in `setFrom` * Remove superfluous calls to qMax and qMin
This commit is contained in:
committed by
GitHub
parent
8e8f68552f
commit
ffcf8c261d
@@ -152,6 +152,9 @@ public:
|
||||
|
||||
void updateSampleRange();
|
||||
private:
|
||||
void setTo(f_cnt_t to);
|
||||
void setFrom(f_cnt_t from);
|
||||
f_cnt_t range() const;
|
||||
void zoom(const bool out = false);
|
||||
void slide(int px);
|
||||
void slideSamplePointByPx(Point point, int px);
|
||||
|
||||
Reference in New Issue
Block a user