Remember project channels in audio mixer when no audio

parent 9f5eea45
Pipeline #20164 passed with stage
in 9 minutes and 22 seconds
......@@ -150,7 +150,10 @@ void MixerWidget::buildUI(Mlt::Tractor *service, const QString &trackTag)
// Build audio meter widget
m_audioMeterWidget.reset(new AudioLevelWidget(width(), this));
// initialize for stereo display
m_audioMeterWidget->setAudioValues({-100, -100});
for (int i = 0; i < m_channels; i++) {
m_audioData << -100;
}
m_audioMeterWidget->setAudioValues(m_audioData);
// Build volume widget
m_volumeSlider = new QSlider(Qt::Vertical, this);
......@@ -414,7 +417,7 @@ void MixerWidget::updateAudioLevel(int pos)
m_audioMeterWidget->setAudioValues(m_levels.value(pos));
//m_levels.remove(pos);
} else {
m_audioMeterWidget->setAudioValues({-100, -100});
m_audioMeterWidget->setAudioValues(m_audioData);
}
}
......@@ -423,7 +426,7 @@ void MixerWidget::reset()
{
QMutexLocker lk(&m_storeMutex);
m_levels.clear();
m_audioMeterWidget->setAudioValues({-100, -100});
m_audioMeterWidget->setAudioValues(m_audioData);
}
void MixerWidget::clear()
......
......@@ -104,6 +104,7 @@ private:
QLabel *m_trackLabel;
QMutex m_storeMutex;
int m_lastVolume;
QVector <double>m_audioData;
Mlt::Event *m_listener;
bool m_recording;
/** @Update track label to reflect state */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment