File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 7
7
from scipy .signal import welch
8
8
from scipy .integrate import simpson
9
9
import time
10
+ import os
10
11
11
12
# Pygame Initialization
12
13
pygame .init ()
30
31
title_font = pygame .font .SysFont ('Arial' , 72 , bold = True )
31
32
32
33
# Load win sound effect
33
- win_sound = pygame .mixer .Sound ("C:\\ Users\\ PAYAL\\ BioAmp-Tool-Python\\ applications\\ brass-fanfare-with-timpani-and-winchimes-reverberated-146260.wav" )
34
+ # win_sound = pygame.mixer.Sound("C:\Users\PAYAL\BioAmp-Tool-Python\applications\media\brass-fanfare-with-timpani-and-winchimes-reverberated-146260.wav")
35
+ # Load win sound effect using a cross-platform path
36
+ base_path = os .path .dirname (__file__ ) # Get the directory of the current script
37
+ sound_path = os .path .join (base_path , "media" , "brass-fanfare-with-timpani-and-winchimes-reverberated-146260.wav" )
38
+ win_sound = pygame .mixer .Sound (sound_path )
34
39
35
40
# Ball properties
36
41
ball_radius = 20
You can’t perform that action at this time.
0 commit comments