summaryrefslogtreecommitdiffstats
path: root/kmix/mixertoolbox.cpp
diff options
context:
space:
mode:
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:");