I made a program just for fun and the audio didn't work, and when I tried to kill the program the audio suddenly started working and when I pressed cancel it stopped working again. I did this for a couple of times and figured out the audio works only during trying to kill the program, But why? Here is the code
import time
current_time = time.localtime()
hour = current_time.tm_hour
minute = current_time.tm_min
if (hour>5):
x=1
while x==1 :
from pygame import *
print("TIME TO WAKE UP!!!")
mixer.init()
mixer.music.load('Air-raid-siren.ogg')
mixer.music.play()