fix stuff
This commit is contained in:
15
audio/chime.py
Normal file
15
audio/chime.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import time
|
||||
|
||||
import pygame
|
||||
|
||||
from config import CHIME_FILE
|
||||
|
||||
|
||||
def play_ding():
|
||||
pygame.mixer.init()
|
||||
pygame.mixer.music.load(CHIME_FILE)
|
||||
pygame.mixer.music.play()
|
||||
while pygame.mixer.music.get_busy():
|
||||
time.sleep(0.05)
|
||||
pygame.mixer.music.unload()
|
||||
pygame.mixer.quit()
|
||||
Reference in New Issue
Block a user