minor improvements

This commit is contained in:
itsmattkc
2018-09-22 21:58:16 +10:00
parent b1c3f44b04
commit d6c8f3844f
33 changed files with 563 additions and 300 deletions
+2 -2
View File
@@ -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()) {