def pause_audio(audio: pygame.mixer.Sound) -> None: audio.stop()
def play_sound(sound: pygame.mixer.Sound) -> None: if Window.__enable_sound and isinstance(sound, pygame.mixer.Sound): sound.play()
def play_audio(audio: pygame.mixer.Sound, loop=False) -> None: audio.play(-1 if loop else 0)
def play_audio(audio: pygame.mixer.Sound, loop=False) -> None: audio.play(-1 if loop else 0)
def pause_audio(audio: pygame.mixer.Sound) -> None: audio.stop()
def play(self, sound: pygame.mixer.Sound): if not PLAY_SOUNDS: return if self.get_enabled(): sound.play()
def play(sound: pygame.mixer.Sound, volume=False) -> None: volume = get_sound_volume() if volume is False else volume/10 # 0->10 must be divided by ten to be in 0->1 range sound.set_volume(volume) sound.play()