Esempio n. 1
0
	def _sink_info_callback(self, context, info, eol, userdata):
		# I may be able to avoid the need to enumerate these since I'm
		# applying the volume change to every output. I just need to know
		# the total number of outputs, right? Assuming index is 0 through N
		if eol:
			self.eof = True
			if not self.count:
				_lib.pa_mainloop_quit(self._mainloop, 0)
			return
		self.count += 1
		self.ret_vol = _lib.pa_sw_volume_to_linear(
				_lib.pa_cvolume_avg(info.contents.volume))
		self.ret_mute = info.contents.mute
		if self.vol_delta is not None:
			self._output_vol(context, info.contents)
		if self.toggle_mute:
			self._output_toggle_mute(context, info.contents)
		if self.mute is not None:
			self._output_mute(context, info.contents, int(self.mute))
Esempio n. 2
0
 def _sink_info_callback(self, context, info, eol, userdata):
     # I may be able to avoid the need to enumerate these since I'm
     # applying the volume change to every output. I just need to know
     # the total number of outputs, right? Assuming index is 0 through N
     if eol:
         self.eof = True
         if not self.count:
             _lib.pa_mainloop_quit(self._mainloop, 0)
         return
     self.count += 1
     self.ret_vol = _lib.pa_sw_volume_to_linear(
         _lib.pa_cvolume_avg(info.contents.volume))
     self.ret_mute = info.contents.mute
     if self.vol_delta is not None:
         self._output_vol(context, info.contents)
     if self.toggle_mute:
         self._output_toggle_mute(context, info.contents)
     if self.mute is not None:
         self._output_mute(context, info.contents, int(self.mute))
Esempio n. 3
0
	def _finished_ref_callback(self, context, success, userdata):
		# print "Success: %i" % success
		self.count -= 1
		if not self.count and self.eof:
			_lib.pa_mainloop_quit(self._mainloop, 0)
Esempio n. 4
0
	def _finished_callback(self, context, success, userdata):
		# print "Success: %i" % success
		_lib.pa_mainloop_quit(self._mainloop, 0)
Esempio n. 5
0
 def _finished_ref_callback(self, context, success, userdata):
     # print "Success: %i" % success
     self.count -= 1
     if not self.count and self.eof:
         _lib.pa_mainloop_quit(self._mainloop, 0)
Esempio n. 6
0
 def _finished_callback(self, context, success, userdata):
     # print "Success: %i" % success
     _lib.pa_mainloop_quit(self._mainloop, 0)