summaryrefslogtreecommitdiffstats
path: root/kmix/mixertoolbox.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-05-17 01:22:02 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-05-25 13:37:28 +0900
commit9859df0541de6016cacea2032d5fe75e98b53a0b (patch)
tree4129344a63afb6eb9809f1bb6262748229b9bf8a /kmix/mixertoolbox.cpp
parent86691144d6ce506dfcb5016dbffda4da3db256fc (diff)
downloadtdemultimedia-9859df0541de6016cacea2032d5fe75e98b53a0b.tar.gz
tdemultimedia-9859df0541de6016cacea2032d5fe75e98b53a0b.zip
KMix: fixed update of tray volume icon when muting/unmuting the selected
channel. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 244f76de8db33b6d659c91ca9424d8556f2f20eb)
Diffstat (limited to 'kmix/mixertoolbox.cpp')
-rw-r--r--kmix/mixertoolbox.cpp20
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:");