Commit a8df61a5 authored by Akhil K Gangadharan's avatar Akhil K Gangadharan

Add setAudioCaptureVolume method and remember monitor volume slider value

parent 917aec0d
Pipeline #1271 passed with stage
in 26 minutes and 6 seconds
......@@ -268,7 +268,7 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
// Create Volume slider popup
m_audioSlider = new QSlider(Qt::Vertical);
m_audioSlider->setRange(0, 100);
m_audioSlider->setValue(100);
m_audioSlider->setValue(KdenliveSettings::volume());
connect(m_audioSlider, &QSlider::valueChanged, this, &Monitor::slotSetVolume);
auto *widgetslider = new QWidgetAction(this);
widgetslider->setText(i18n("Audio volume"));
......@@ -2162,3 +2162,7 @@ void Monitor::setConsumerProperty(const QString &name, const QString &value)
m_glMonitor->setConsumerProperty(name, value);
}
void Monitor::setAudioCaptureVolume(int volume)
{
m_capture->setAudioVolume(volume);
}
\ No newline at end of file
......@@ -165,6 +165,7 @@ public:
void setConsumerProperty(const QString &name, const QString &value);
std::unique_ptr<MediaCapture> m_capture;
QStringList getAudioCaptureDevices();
void setAudioCaptureVolume(int);
protected:
void mousePressEvent(QMouseEvent *event) override;
......@@ -183,7 +184,6 @@ protected:
void enterEvent(QEvent *event) override;
void leaveEvent(QEvent *event) override;
virtual QStringList mimeTypes() const;
private:
std::shared_ptr<ProjectClip> m_controller;
/** @brief The QQuickView that handles our monitor display (video and qml overlay) **/
......
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