mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #3049
Jason Papakostas (1): fix sound sliders not saving when moved by keyboard
This commit is contained in:
commit
7576216871
|
@ -63,14 +63,10 @@ AVForm::AVForm() :
|
||||||
|
|
||||||
bodyUI->playbackSlider->setTracking(false);
|
bodyUI->playbackSlider->setTracking(false);
|
||||||
bodyUI->playbackSlider->installEventFilter(this);
|
bodyUI->playbackSlider->installEventFilter(this);
|
||||||
connect(bodyUI->playbackSlider, &QSlider::sliderMoved,
|
|
||||||
this, &AVForm::onPlaybackSliderMoved);
|
|
||||||
connect(bodyUI->playbackSlider, &QSlider::valueChanged,
|
connect(bodyUI->playbackSlider, &QSlider::valueChanged,
|
||||||
this, &AVForm::onPlaybackValueChanged);
|
this, &AVForm::onPlaybackValueChanged);
|
||||||
bodyUI->microphoneSlider->setTracking(false);
|
bodyUI->microphoneSlider->setTracking(false);
|
||||||
bodyUI->microphoneSlider->installEventFilter(this);
|
bodyUI->microphoneSlider->installEventFilter(this);
|
||||||
connect(bodyUI->microphoneSlider, &QSlider::sliderMoved,
|
|
||||||
this, &AVForm::onMicrophoneSliderMoved);
|
|
||||||
connect(bodyUI->microphoneSlider, &QSlider::valueChanged,
|
connect(bodyUI->microphoneSlider, &QSlider::valueChanged,
|
||||||
this, &AVForm::onMicrophoneValueChanged);
|
this, &AVForm::onMicrophoneValueChanged);
|
||||||
|
|
||||||
|
@ -402,8 +398,10 @@ void AVForm::onFilterAudioToggled(bool filterAudio)
|
||||||
Settings::getInstance().setFilterAudio(filterAudio);
|
Settings::getInstance().setFilterAudio(filterAudio);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AVForm::onPlaybackSliderMoved(int value)
|
void AVForm::onPlaybackValueChanged(int value)
|
||||||
{
|
{
|
||||||
|
Settings::getInstance().setOutVolume(value);
|
||||||
|
|
||||||
Audio& audio = Audio::getInstance();
|
Audio& audio = Audio::getInstance();
|
||||||
if (audio.isOutputReady()) {
|
if (audio.isOutputReady()) {
|
||||||
const qreal percentage = value / 100.0;
|
const qreal percentage = value / 100.0;
|
||||||
|
@ -414,20 +412,12 @@ void AVForm::onPlaybackSliderMoved(int value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AVForm::onPlaybackValueChanged(int value)
|
|
||||||
{
|
|
||||||
Settings::getInstance().setOutVolume(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AVForm::onMicrophoneSliderMoved(int value)
|
|
||||||
{
|
|
||||||
const qreal percentage = value / 100.0;
|
|
||||||
Audio::getInstance().setInputVolume(percentage);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AVForm::onMicrophoneValueChanged(int value)
|
void AVForm::onMicrophoneValueChanged(int value)
|
||||||
{
|
{
|
||||||
Settings::getInstance().setInVolume(value);
|
Settings::getInstance().setInVolume(value);
|
||||||
|
|
||||||
|
const qreal percentage = value / 100.0;
|
||||||
|
Audio::getInstance().setInputVolume(percentage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AVForm::createVideoSurface()
|
void AVForm::createVideoSurface()
|
||||||
|
|
|
@ -57,9 +57,7 @@ private slots:
|
||||||
void onInDevChanged(QString deviceDescriptor);
|
void onInDevChanged(QString deviceDescriptor);
|
||||||
void onOutDevChanged(QString deviceDescriptor);
|
void onOutDevChanged(QString deviceDescriptor);
|
||||||
void onFilterAudioToggled(bool filterAudio);
|
void onFilterAudioToggled(bool filterAudio);
|
||||||
void onPlaybackSliderMoved(int value);
|
|
||||||
void onPlaybackValueChanged(int value);
|
void onPlaybackValueChanged(int value);
|
||||||
void onMicrophoneSliderMoved(int value);
|
|
||||||
void onMicrophoneValueChanged(int value);
|
void onMicrophoneValueChanged(int value);
|
||||||
|
|
||||||
// camera
|
// camera
|
||||||
|
|
Loading…
Reference in New Issue
Block a user