예제 #1
0
 def play_successed(self, volume=2):
     self.success_player = pulseaudio.Play(
         [(self.blt_speaker.pa_index, volume)], "./win.wav", self.pa, repeat=False)
     while not self.success_player.is_playing():
         sleep(0.1)
     while self.success_player.is_playing():
         sleep(0.5)
     self.success_player.stop_playing()
     self.success_player = None
예제 #2
0
 def play_ringtone(self, volume):
     self.ringtone = pulseaudio.Play(
         [(self.blt_speaker.pa_index, volume)], "../ringtone.mp3", self.pa)
예제 #3
0
 def play_voices(self, volume=3):
     self.voices_player = pulseaudio.Play(
         [(0, volume)], "/home/pi/NAGRANIE_FINAL_BASIC.wav", self.pa, repeat=False)
예제 #4
0
 def ambient_play(self):
     self.ambient_player = pulseaudio.Play([(self.blt_speaker.pa_index, 2)], "/home/pi/ambient1.wav", self.pa)