Repeat alarm sound
This commit is contained in:
parent
1cf155f327
commit
2b82941f9c
5
clock.py
5
clock.py
|
@ -51,7 +51,9 @@ global sound_process
|
||||||
sound_process = None
|
sound_process = None
|
||||||
|
|
||||||
def play_sound(source):
|
def play_sound(source):
|
||||||
playsound(source)
|
while True:
|
||||||
|
print("beep beep!")
|
||||||
|
playsound(source)
|
||||||
|
|
||||||
class MyClockWidget(FloatLayout):
|
class MyClockWidget(FloatLayout):
|
||||||
set_alarm_mode = False
|
set_alarm_mode = False
|
||||||
|
@ -165,7 +167,6 @@ class MyClockWidget(FloatLayout):
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.seconds_to_next_alarm < 0.1 and sound_process is None:
|
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 = Process(target=play_sound, args=(self.sound_source,))
|
||||||
sound_process.start()
|
sound_process.start()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user