コード例 #1
0
ファイル: pulse.py プロジェクト: AlessioRocco/junk
	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))
コード例 #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))
コード例 #3
0
ファイル: pulse.py プロジェクト: AlessioRocco/junk
	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)
コード例 #4
0
ファイル: pulse.py プロジェクト: AlessioRocco/junk
	def _finished_callback(self, context, success, userdata):
		# print "Success: %i" % success
		_lib.pa_mainloop_quit(self._mainloop, 0)
コード例 #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)
コード例 #6
0
 def _finished_callback(self, context, success, userdata):
     # print "Success: %i" % success
     _lib.pa_mainloop_quit(self._mainloop, 0)