minor improvements
This commit is contained in:
+2
-2
@@ -52,7 +52,7 @@ void AudioMonitor::paintEvent(QPaintEvent *) {
|
||||
p.fillRect(r, gradient);
|
||||
|
||||
if (sample_cache_offset != -1 && sample_cache.size() > 0) {
|
||||
playhead_offset = (panel_timeline->playhead - sample_cache_offset) * channel_count;
|
||||
playhead_offset = (sequence->playhead - sample_cache_offset) * channel_count;
|
||||
if (playhead_offset >= 0 && playhead_offset < sample_cache.size()) {
|
||||
double multiplier = 1 - qAbs((double) sample_cache.at(playhead_offset+i) / 32768.0); // 16-bit int divided to float
|
||||
/*if (multiplier == (double) 0) {
|
||||
@@ -78,7 +78,7 @@ void AudioMonitor::paintEvent(QPaintEvent *) {
|
||||
if (playhead_offset > -1) {
|
||||
// clean up used samples
|
||||
bool error = false;
|
||||
while (sample_cache_offset < panel_timeline->playhead && !error) {
|
||||
while (sample_cache_offset < sequence->playhead && !error) {
|
||||
sample_cache_offset++;
|
||||
for (i=0;i<channel_count;i++) {
|
||||
if (sample_cache.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user