Skip to content

Commit

Permalink
[FEATURE] Reworked audio.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickname2002 committed Jul 2, 2023
1 parent b71f9b2 commit 0d48ef1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jorcademy.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ def load_sound(path: str):


# Play audio
def play_sound(sound: pygame.mixer.Sound):
sound.play()
def play_sound(sound: pygame.mixer.Sound, channel: int):
if not pygame.mixer.Channel(channel).get_busy():
pygame.mixer.Channel(channel).play(sound)


# Wait for new action
Expand Down

0 comments on commit 0d48ef1

Please sign in to comment.