Commit afc214b7 authored by Hardik Beladiya's avatar Hardik Beladiya Committed by Andreas Cord-Landwehr

Set volume when changing the slider.

REVIEW: 121561
parent c37affca
......@@ -128,6 +128,7 @@ void OutputDeviceController::setVolume(int volume)
{
// backend only accepts volume, when there is a pipeline
// store value here and set it when playing
d->backend()->setVolume(volume);
d->m_volume = volume;
}
......
......@@ -61,6 +61,7 @@ SoundDeviceDialogPage::SoundDeviceDialogPage()
m_recordTestFile.open();
// connections
connect(ui->kcfg_AudioOutputVolume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int)));
connect(ui->buttonPlayTestSound, SIGNAL(clicked(bool)), this, SLOT(playTestSound()));
connect(ui->buttonPlayRecordedTestSound, SIGNAL(clicked(bool)), this, SLOT(playRecordedSound()));
connect(ui->buttonRecordTestSound, SIGNAL(clicked(bool)), this, SLOT(recordSound()));
......@@ -84,6 +85,11 @@ void SoundDeviceDialogPage::loadSettings()
ui->kcfg_AudioOutputVolume->setValue(Settings::audioOutputVolume());
}
void SoundDeviceDialogPage::setVolume(int volume)
{
OutputDeviceController::self().setVolume(volume);
}
void SoundDeviceDialogPage::saveSettings()
{
Settings::setAudioInputDevice(ui->kcfg_AudioInputDevice->itemText(ui->kcfg_AudioInputDevice->currentIndex()));
......
......@@ -44,6 +44,7 @@ public slots:
void recordSound();
void updatePlayButtonIcons();
void stopPlaying();
void setVolume(int volume);
private:
Ui::SoundDeviceDialogPage *ui;
......
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