Fix auto changing volumes when calling or in waiting room.

Update Settings view with the current audio volumes.
This commit is contained in:
Julien Wadel 2022-09-05 18:19:09 +02:00
parent 9820979300
commit 592df568a9
2 changed files with 21 additions and 9 deletions

View file

@ -295,6 +295,8 @@ void SettingsModel::accessAudioSettings() {
emit playbackDeviceChanged(getPlaybackDevice());
emit captureDeviceChanged(getCaptureDevice());
emit ringerDeviceChanged(getRingerDevice());
emit playbackGainChanged(getPlaybackGain());
emit captureGainChanged(getCaptureGain());
//if (!getIsInCall()) {
startCaptureGraph();

View file

@ -86,12 +86,18 @@ DialogPlus {
Slider {
id: playbackSlider
width: parent.width
property bool initialized: false
value: call ? value = call.speakerVolumeGain : value = SettingsModel.playbackGain
onPositionChanged: if(call)
call.speakerVolumeGain = position
else
SettingsModel.playbackGain = position
value: call ? call.speakerVolumeGain : SettingsModel.playbackGain
onPositionChanged: {
if( initialized){
if(call)
call.speakerVolumeGain = position
else
SettingsModel.playbackGain = position
}
}
Component.onCompleted: initialized = true
ToolTip {
parent: playbackSlider.handle
@ -134,11 +140,15 @@ DialogPlus {
id: captureSlider
width: parent.width
value: call ? call.microVolumeGain : SettingsModel.captureGain
property bool initialized: false
onPositionChanged: if(call)
call.microVolumeGain = position
else
SettingsModel.captureGain = position
onPositionChanged: if(initialized){
if(call)
call.microVolumeGain = position
else
SettingsModel.captureGain = position
}
Component.onCompleted: initialized = true
ToolTip {
parent: captureSlider.handle