Answers for "play a sound with pygame mixer without pygame window"

3

How to play music without pygame

from playsound import playsound
playsound('audio.mp3')
#Hope it helps :)
Posted by: Guest on March-09-2021
7

pygame play sound

import pygame

pygame.mixer.init()
crash_sound = pygame.mixer.Sound("crash.wav")
crash_sound.play()
Posted by: Guest on July-14-2020

Python Answers by Framework

Browse Popular Code Answers by Language