davidedmundson accepted this revision. davidedmundson added a comment. This revision is now accepted and ready to land.
Ok, I understand the problem. Solution works. Reading this I have an alternative proposal that might make the code simpler: Instead of building pa_ext_stream_restore_info on the stack in ::writeChanges and building it from the arguments, can you make that a member variable and remove the arguments to writeChanges() Then setVolume/setMute updates these member vars and calls write. If ::update also updates this member var, then you don't need any if statements in setVolume or you can ship this. REPOSITORY R115 Plasma Audio Volume Applet BRANCH Plasma/5.9 REVISION DETAIL https://phabricator.kde.org/D4674 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: drosca, #plasma, davidedmundson Cc: davidedmundson, plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol