I am manipulating sound files in python using pygame module. It works OK from withing interactive python session, but the same code produces nothing from bash:
interactive python
$ sudo python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> from pygame import mixer
>>> mixer.init()
>>> mixer.music.load('zho1ngguo2.mp3')
>>> mixer.music.play()
==> sound played
But nothing happens from bash:
$ cat playmp3.py
import pygame
from pygame import mixer
mixer.init()
mixer.music.load('zho1ngguo2.mp3')
mixer.music.play()
$ sudo python playmp3.py
==> No sound
Any ideas?