Sulunia
Posts: 6
Joined: Sat Aug 08, 2015 6:54 pm

Weird issue with pygame

Thu Aug 13, 2015 8:47 pm

Hello again guys!

So, by weird issue i mean, i have pygame play a music on my app, and everything works fine. However, if i try running the app with "sudo" (sudo python mygame.py), the music simply won't play (as it does if you run it without the privileges). Maybe audio is coming out through HDMI, but i don't know since my monitor has no audio output.

I tried logging in as root and running the application, it runs again without audio, and segfaults on exit.

Is this some pygame bug or something? If audio is for some reason coming trough HDMI, how can i force it to come through the audio jack?

@edit
A possible solution suggested would be of using absolute paths to the music being played and/or using "sudo -s" instead of sudo. Neither worked.

Return to “Python”