By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 3159
Collapse All | Expand All

(-)tdemultimedia-trinity-14.0.4_old/kmix/mixer.cpp (-14 / +31 lines)
Lines 91-107 Link Here
91
  _pollingTimer = new TQTimer(); // will be started on open() and stopped on close()
91
  _pollingTimer = new TQTimer(); // will be started on open() and stopped on close()
92
  connect( _pollingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(readSetFromHW()));
92
  connect( _pollingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(readSetFromHW()));
93
93
94
  TQCString objid;
94
  setDCOP_id();
95
#ifndef KMIX_DCOP_OBJID_TEST
96
  objid.setNum(_mixerBackend->m_devnum);
97
#else
98
// should use a nice name like the Unique-Card-ID instead !!
99
  objid.setNum(Mixer::_dcopID);
100
  Mixer::_dcopID ++;
101
#endif
102
  objid.prepend("Mixer");
103
  DCOPObject::setObjId( objid );
104
105
}
95
}
106
96
107
Mixer::~Mixer() {
97
Mixer::~Mixer() {
Lines 110-115 Link Here
110
   delete _pollingTimer;
100
   delete _pollingTimer;
111
}
101
}
112
102
103
void Mixer::setDCOP_id( bool master )
104
{
105
  TQCString objid;
106
107
  if(master) objid = "MixerMaster";
108
  else {
109
#ifndef KMIX_DCOP_OBJID_TEST
110
    objid.setNum(_mixerBackend->m_devnum);
111
#else
112
// should use a nice name like the Unique-Card-ID instead !!
113
    objid.setNum(Mixer::_dcopID);
114
    Mixer::_dcopID ++;
115
#endif
116
    objid.prepend("Mixer");
117
  }
118
119
  DCOPObject::setObjId( objid );
120
}
121
113
void Mixer::volumeSave( TDEConfig *config )
122
void Mixer::volumeSave( TDEConfig *config )
114
{
123
{
115
    //    kdDebug(67100) << "Mixer::volumeSave()" << endl;
124
    //    kdDebug(67100) << "Mixer::volumeSave()" << endl;
Lines 201-208 Link Here
201
	}
210
	}
202
      }
211
      }
203
	*/
212
	*/
204
      if ( _mixerBackend->needsPolling() ) {
213
205
          _pollingTimer->start(50);
214
      if ( _mixerBackend->needsPolling() || id() == "PulseAudio" ) {
215
          _pollingTimer->start(500);
206
      }
216
      }
207
      else {
217
      else {
208
          _mixerBackend->prepareSignalling(this);
218
          _mixerBackend->prepareSignalling(this);
Lines 280-291 Link Here
280
     // This can happen currently only, if the user executes the DCOP close() call.
290
     // This can happen currently only, if the user executes the DCOP close() call.
281
     return;
291
     return;
282
  }
292
  }
283
  bool updated = _mixerBackend->prepareUpdateFromHW();
293
  bool updated = _mixerBackend->prepareUpdateFromHW() || (id().section(':',2,2) == "PulseAudio");
284
  if ( (! updated) && (! _readSetFromHWforceUpdate) ) {
294
  if ( (! updated) && (! _readSetFromHWforceUpdate) ) {
285
    // Some drivers (ALSA) are smart. We don't need to run the following
295
    // Some drivers (ALSA) are smart. We don't need to run the following
286
    // time-consuming update loop if there was no change
296
    // time-consuming update loop if there was no change
287
    return;
297
    return;
288
  }
298
  }
299
289
  _readSetFromHWforceUpdate = false;
300
  _readSetFromHWforceUpdate = false;
290
  MixDevice* md;
301
  MixDevice* md;
291
  for( md = _mixerBackend->m_mixDevices.first(); md != 0; md = _mixerBackend->m_mixDevices.next() )
302
  for( md = _mixerBackend->m_mixDevices.first(); md != 0; md = _mixerBackend->m_mixDevices.next() )
Lines 374-384 Link Here
374
385
375
void Mixer::setMasterCard(const TQString& ref_id)
386
void Mixer::setMasterCard(const TQString& ref_id)
376
{
387
{
388
  //Restore DCOP id for previous master
389
  Mixer *tCard = NULL;
390
  if((tCard=masterCard())) tCard->setDCOP_id();
391
377
  // The value is taken over without checking on existance. This allows the User to define
392
  // The value is taken over without checking on existance. This allows the User to define
378
  // a MasterCard that is not always available (e.g. it is an USB hotplugging device).
393
  // a MasterCard that is not always available (e.g. it is an USB hotplugging device).
379
  // Also you can set the master at any time you like, e.g. after reading the KMix configuration file
394
  // Also you can set the master at any time you like, e.g. after reading the KMix configuration file
380
  // and before actually constructing the Mixer instances (hint: this mehtod is static!).
395
  // and before actually constructing the Mixer instances (hint: this mehtod is static!).
381
  _masterCard = ref_id;
396
  _masterCard = ref_id;
397
398
  if((tCard=masterCard())) tCard->setDCOP_id(true);
382
}
399
}
383
400
384
Mixer* Mixer::masterCard()
401
Mixer* Mixer::masterCard()
(-)tdemultimedia-trinity-14.0.4_old/kmix/mixer.h (+3 lines)
Lines 53-58 Link Here
53
      Mixer( int driver, int device );
53
      Mixer( int driver, int device );
54
      virtual ~Mixer();
54
      virtual ~Mixer();
55
55
56
      void setDCOP_id( bool master = false );
57
56
      static int numDrivers();
58
      static int numDrivers();
57
59
58
      MixDevice* find(TQString& devPK);
60
      MixDevice* find(TQString& devPK);
Lines 98-103 Link Here
98
      /// different MasterCard's at the moment (but actually KMixPanelApplet does not read/save this yet).
100
      /// different MasterCard's at the moment (but actually KMixPanelApplet does not read/save this yet).
99
      /// At the moment it is only used for selecting the Mixer to use in KMix's DockIcon.
101
      /// At the moment it is only used for selecting the Mixer to use in KMix's DockIcon.
100
      static void setMasterCard(const TQString& ref_id);
102
      static void setMasterCard(const TQString& ref_id);
103
      static TQString masterCard_( ) { return _masterCard; }
101
      static Mixer* masterCard();
104
      static Mixer* masterCard();
102
      /// The global Master Device inside the current MasterCard (as returned by masterCard()).
105
      /// The global Master Device inside the current MasterCard (as returned by masterCard()).
103
      static void setMasterCardDevice(TQString& ref_id);
106
      static void setMasterCardDevice(TQString& ref_id);
(-)tdemultimedia-trinity-14.0.4_old/kmix/mixertoolbox.cpp (+1 lines)
Lines 159-164 Link Here
159
			
159
			
160
			mixer->setID(primaryKeyOfMixer);
160
			mixer->setID(primaryKeyOfMixer);
161
161
162
			if(mixer->id() == Mixer::masterCard_()) mixer->setDCOP_id(true);
162
		} // valid
163
		} // valid
163
		else
164
		else
164
		{
165
		{

Return to bug 3159