From 1f4f352453365e6670514db2d45f3876d6b284ab Mon Sep 17 00:00:00 2001 From: Page Asgardius Date: Sat, 23 Apr 2022 06:37:51 -0700 Subject: [PATCH] fix music autoplay --- r3.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/r3.py b/r3.py index bdcc246..c2699c5 100644 --- a/r3.py +++ b/r3.py @@ -28,8 +28,8 @@ BLACK = (0, 0, 0) #pygame.mixer.music.load('music/galaxy.opus') csfx = pygame.mixer.Sound('sfx/crash.ogg') lcfx = pygame.mixer.Sound('sfx/complete.ogg') -if music: - pygame.mixer.music.play(-1) +#if music: +# pygame.mixer.music.play(-1) #sound = pygame.mixer.Sound(file='bmx.ogg') #raw_array = sound.get_raw() #raw_array = raw_array[100000:92557920] @@ -278,6 +278,8 @@ else: wall4 = Wallv(-200,800) #crash = Crash() #antenna = Antenna() +if music: + pygame.mixer.music.play(-1) running = True live = True complete = False @@ -364,6 +366,8 @@ while running: wall2 = Wallh(2150,-200) wall3 = Wallv(-200,-200) wall4 = Wallv(-200,800) + if music: + pygame.mixer.music.play(-1) live = True complete = False if music: