|
Lines 65-71
Link Here
|
| 65 |
* 'true' means to scan all backends. 'false' means: After scanning the |
65 |
* 'true' means to scan all backends. 'false' means: After scanning the |
| 66 |
* current backend the next backend is only scanned if no Mixers were found yet. |
66 |
* current backend the next backend is only scanned if no Mixers were found yet. |
| 67 |
*/ |
67 |
*/ |
| 68 |
void MixerToolBox::initMixer(TQPtrList<Mixer> &mixers, bool multiDriverMode, TQString& ref_hwInfoString) |
68 |
void MixerToolBox::initMixer(TQPtrList<Mixer> &mixers, bool multiDriverMode, TQString& ref_hwInfoString, bool isLight) |
| 69 |
{ |
69 |
{ |
| 70 |
//kdDebug(67100) << "IN MixerToolBox::initMixer()"<<endl; |
70 |
//kdDebug(67100) << "IN MixerToolBox::initMixer()"<<endl; |
| 71 |
|
71 |
|
|
Lines 122-128
Link Here
|
| 122 |
int dev = I->getdev(); |
122 |
int dev = I->getdev(); |
| 123 |
Mixer *mixer = new Mixer( drv, dev ); |
123 |
Mixer *mixer = new Mixer( drv, dev ); |
| 124 |
if ( mixer->isValid() ) { |
124 |
if ( mixer->isValid() ) { |
| 125 |
mixer->open(); |
125 |
if(!isLight) mixer->open(); |
| 126 |
Mixer* m; |
126 |
Mixer* m; |
| 127 |
if (dev >= 0) { |
127 |
if (dev >= 0) { |
| 128 |
for (m = mixers.first(); m; m = mixers.next()) |
128 |
for (m = mixers.first(); m; m = mixers.next()) |
|
Lines 133-139
Link Here
|
| 133 |
if (mixer->devnum() == m->devnum()) |
133 |
if (mixer->devnum() == m->devnum()) |
| 134 |
#endif |
134 |
#endif |
| 135 |
break; |
135 |
break; |
| 136 |
if (m) continue; |
136 |
if (m) { delete mixer; continue; } |
| 137 |
} |
137 |
} |
| 138 |
mixers.append( mixer ); |
138 |
mixers.append( mixer ); |
| 139 |
// Count mixer nums for every mixer name to identify mixers with equal names. |
139 |
// Count mixer nums for every mixer name to identify mixers with equal names. |
|
Lines 147-152
Link Here
|
| 147 |
* %2, the mixer name, is typically coming from an OS driver. It could contain colons. |
147 |
* %2, the mixer name, is typically coming from an OS driver. It could contain colons. |
| 148 |
* %3, the mixer number, is a number: it does not contain colons. |
148 |
* %3, the mixer number, is a number: it does not contain colons. |
| 149 |
*/ |
149 |
*/ |
|
|
150 |
if(!isLight) { |
| 150 |
TQString mixerName = mixer->mixerName(); |
151 |
TQString mixerName = mixer->mixerName(); |
| 151 |
mixerName.replace(":","_"); |
152 |
mixerName.replace(":","_"); |
| 152 |
TQString primaryKeyOfMixer = TQString("%1::%2:%3") |
153 |
TQString primaryKeyOfMixer = TQString("%1::%2:%3") |
|
Lines 162-167
Link Here
|
| 162 |
mixer->setID(primaryKeyOfMixer); |
163 |
mixer->setID(primaryKeyOfMixer); |
| 163 |
|
164 |
|
| 164 |
if(mixer->id() == Mixer::masterCard_()) mixer->setDCOP_id(true); |
165 |
if(mixer->id() == Mixer::masterCard_()) mixer->setDCOP_id(true); |
|
|
166 |
} |
| 165 |
} // valid |
167 |
} // valid |
| 166 |
else |
168 |
else |
| 167 |
{ |
169 |
{ |
|
Lines 177-183
Link Here
|
| 177 |
else { |
179 |
else { |
| 178 |
// In No-multiDriver-mode we only need to check after we reached devNumMax |
180 |
// In No-multiDriver-mode we only need to check after we reached devNumMax |
| 179 |
if ( dev == devNumMax ) { |
181 |
if ( dev == devNumMax ) { |
| 180 |
if ( Mixer::mixers().count() != 0 ) { |
182 |
if ( mixers.count() != 0 ) { |
| 181 |
// highest device number of driver and a Mixer => finished |
183 |
// highest device number of driver and a Mixer => finished |
| 182 |
autodetectionFinished = true; |
184 |
autodetectionFinished = true; |
| 183 |
} |
185 |
} |
|
Lines 185-191
Link Here
|
| 185 |
} // !multiDriver |
187 |
} // !multiDriver |
| 186 |
|
188 |
|
| 187 |
// append driverName (used drivers) |
189 |
// append driverName (used drivers) |
| 188 |
if ( !drvInfoAppended ) |
190 |
if ( !drvInfoAppended && !isLight ) |
| 189 |
{ |
191 |
{ |
| 190 |
drvInfoAppended = true; |
192 |
drvInfoAppended = true; |
| 191 |
TQString driverName = Mixer::driverName(drv); |
193 |
TQString driverName = Mixer::driverName(drv); |
|
Lines 217-223
Link Here
|
| 217 |
delete I; |
219 |
delete I; |
| 218 |
} // loop over soundcard drivers |
220 |
} // loop over soundcard drivers |
| 219 |
|
221 |
|
| 220 |
if (Mixer::masterCard() == 0) |
222 |
if (Mixer::masterCard() == 0 && !isLight) |
| 221 |
{ |
223 |
{ |
| 222 |
// We have no master card yet. This actually only happens when there was |
224 |
// We have no master card yet. This actually only happens when there was |
| 223 |
// not one defined in the kmixrc. |
225 |
// not one defined in the kmixrc. |