AFP improvements
- Stop pointlessly reloading the sample everytime the amp knob is changed - Also draw the amplitude of the waveform correctly (used to be it was drawn as 2x too "quiet")
This commit is contained in:
@@ -999,13 +999,14 @@ void AudioFileProcessorWaveView::updateGraph()
|
||||
{
|
||||
reverse();
|
||||
}
|
||||
else if( m_last_from == m_from && m_last_to == m_to )
|
||||
else if( m_last_from == m_from && m_last_to == m_to && m_sampleBuffer.amplification() == m_last_amp )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_last_from = m_from;
|
||||
m_last_to = m_to;
|
||||
m_last_amp = m_sampleBuffer.amplification();
|
||||
|
||||
m_graph.fill( Qt::transparent );
|
||||
QPainter p( &m_graph );
|
||||
|
||||
@@ -239,6 +239,7 @@ private:
|
||||
f_cnt_t m_to;
|
||||
f_cnt_t m_last_from;
|
||||
f_cnt_t m_last_to;
|
||||
float m_last_amp;
|
||||
knob * m_startKnob;
|
||||
knob * m_endKnob;
|
||||
knob * m_loopKnob;
|
||||
|
||||
Reference in New Issue
Block a user