def set_secondary_volume(self, volume, delay): now = get_serial() self.context.secondary_volume_time = now self.context.secondary_volume = volume if pcm_ok: self.secondary_volume_time = self.context.secondary_volume_time pss.set_secondary_volume(self.number, self.context.secondary_volume, delay)
def interact(self): """ Called (mostly) once per interaction. """ self.keep_queue = 0 if pcm_ok: if self.pan_time != self.context.pan_time: self.pan_time = self.context.pan_time pss.set_pan(self.number, self.context.pan, 0) if self.secondary_volume_time != self.context.secondary_volume_time: self.secondary_volume_time = self.context.secondary_volume_time pss.set_secondary_volume(self.number, self.context.secondary_volume, 0) if not self.queue and self.callback: self.callback() # E1102