feat: added sound system

This commit is contained in:
2020-10-28 22:57:37 +01:00
parent dd28de341a
commit de9e54c84b
4 changed files with 207 additions and 107 deletions

View File

@@ -6,6 +6,7 @@ import json
from redis import Redis
from control.walle import WallE
from control.audio import AudioThread
INTERVAL_TICK = 0.025 # 40/s
@@ -52,6 +53,9 @@ scheduler = sched.scheduler()
walle = WallE()
walle.setup()
audio = AudioThread(scheduler)
audio.queue_sound('/home/rick/Downloads/Wall-E Sounds/wav/Startup1.wav')
def walle_tick():
scheduler.enter(INTERVAL_TICK, 1, walle_tick)