I am facing a little issue while playing Audio with Pygame in my Python program.
Hardware: Raspberry Pi 2 Mod B
I need the audio to be played from the Audio/Headphone jack. In order to that in OSMC I have made a shell script that does changes the standard audio output from HDMI to Audio jack:
And it works fine because after this if I play anything in OSMC the audio comes from Audio Jack. But when I play anything form Python using Pygame, the sound still comes from HDMI and not audio Jack..
Code: Select all
sudo systemctl stop mediacenter sed -i 's#<audiodevice default="true">PI:HDMI</audiodevice>#<audiodevice>PI:Analogue</audiodevice>#g' /home/osmc/.kodi/userdata/guisettings.xml sudo systemctl start mediacentero
Can someone please help me identify the issue and fix it.