diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-05-17 01:22:02 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-05-25 13:24:32 +0900 |
commit | 244f76de8db33b6d659c91ca9424d8556f2f20eb (patch) | |
tree | c4931d8d863c5a1ddad1244e238f641640c8ad0e /kmix/mixertoolbox.cpp | |
parent | 2251b3395ac880f0b24db47615bf21ed97ec69f3 (diff) | |
download | tdemultimedia-244f76de8db33b6d659c91ca9424d8556f2f20eb.tar.gz tdemultimedia-244f76de8db33b6d659c91ca9424d8556f2f20eb.zip |
KMix: fixed update of tray volume icon when muting/unmuting the selected
channel.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kmix/mixertoolbox.cpp')
-rw-r--r-- | kmix/mixertoolbox.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/kmix/mixertoolbox.cpp b/kmix/mixertoolbox.cpp index b474eca6..4a19673b 100644 --- a/kmix/mixertoolbox.cpp +++ b/kmix/mixertoolbox.cpp @@ -213,13 +213,25 @@ void MixerToolBox::initMixer(TQPtrList<Mixer> &mixers, bool multiDriverMode, TQS } // loop over sound card devices of current driver } // loop over soundcard drivers - if ( Mixer::masterCard() == 0 ) { + if (Mixer::masterCard() == 0) + { // We have no master card yet. This actually only happens when there was // not one defined in the kmixrc. // So lets just set the first card as master card. - if ( Mixer::mixers().count() > 0 ) { - Mixer::setMasterCard( Mixer::mixers().first()->id()); - } + if (Mixer::mixers().count() > 0) + { + Mixer *mixer = Mixer::mixers().first(); + Mixer::setMasterCard(mixer->id()); + MixSet ms = mixer->getMixSet(); + for (MixDevice *md = ms.first(); md != 0; md = ms.next()) + { + if (!md->isRecordable() && !md->isSwitch() && !md->isEnum()) + { + Mixer::setMasterCardDevice(md->getPK()); + break; + } + } + } } ref_hwInfoString = i18n("Sound drivers supported:"); |