I have tried using Pygame to play a .wav file over Bluetooth on my Raspberry Pi 4 Model B, and I am not hearing any sound when running the script. It plays normally when I open the wav file from the folder, but not from script. Very confused as I have ran the exact same code from 3 Model B+ and it works all fine..??
I get no error message and the version of pygame has been updated recently.
Here is the code and I would very much appreciate your help:
import pygame
from pygame.mixer import Sound
import os
from time import sleep
pygame.init()
pygame.mixer.init()
print(os.getcwd())
soundObj=pygame.mixer.Sound("hello.wav")
soundObj.play()
sleep(12)
soundObj.stop()