~khurshid-alam/indicator-sound/lp-1714517

« back to all changes in this revision

Viewing changes to src/volume-control-pulse.vala

  • Committer: Khurshid Alam
  • Date: 2018-09-30 12:50:22 UTC
  • Revision ID: khurshid.alam@linuxmail.org-20180930125022-9t1nk0h20g0b5i0t
Show correct volume on automatic sink change

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
 
227
227
                _active_output = newval;
228
228
 
229
 
                // Emit a change signal iff CALL_MODE wasn't involved. (FIXME: yuck.)
230
 
                if ((oldval != VolumeControl.ActiveOutput.CALL_MODE) &&
231
 
                    (newval != VolumeControl.ActiveOutput.CALL_MODE) &&
232
 
                    (oldval != newval)) {
233
 
                        this.active_output_changed (newval);
234
 
                }
235
 
 
236
229
                if (_pulse_use_stream_restore == false &&
237
230
                                _volume.volume != volume_to_double (i.volume.max ()))
238
231
                {
241
234
                        vol.reason = VolumeControl.VolumeReasons.PULSE_CHANGE;
242
235
                        this.volume = vol;
243
236
                }
 
237
 
 
238
                // Emit a change signal iff CALL_MODE wasn't involved. (FIXME: yuck.)
 
239
                if ((oldval != VolumeControl.ActiveOutput.CALL_MODE) &&
 
240
                    (newval != VolumeControl.ActiveOutput.CALL_MODE) &&
 
241
                    (oldval != newval)) {
 
242
                        this.active_output_changed (newval);
 
243
                }
244
244
        }
245
245
 
246
246
        private void source_info_cb (Context c, SourceInfo? i, int eol)