Repeat alarm sound

This commit is contained in:
Admar Schoonen 2022-12-12 22:21:57 +01:00
parent 1cf155f327
commit 2b82941f9c
1 changed files with 3 additions and 2 deletions

View File

@ -51,7 +51,9 @@ global sound_process
sound_process = None
def play_sound(source):
playsound(source)
while True:
print("beep beep!")
playsound(source)
class MyClockWidget(FloatLayout):
set_alarm_mode = False
@ -165,7 +167,6 @@ class MyClockWidget(FloatLayout):
return
if self.seconds_to_next_alarm < 0.1 and sound_process is None:
print("beep beep!")
sound_process = Process(target=play_sound, args=(self.sound_source,))
sound_process.start()