controlling mpg321
Posted: Tue Mar 18, 2014 10:42 am
hi all
I am quite new in python, so I am trying to achieve a potentiometer remote control of the sound gain using mpg321 and python.
This is my try to make a player, the problem is that this way I can not control the gain on fly by variable.
Can anyone help me?
Thank's in advance.
I am quite new in python, so I am trying to achieve a potentiometer remote control of the sound gain using mpg321 and python.
This is my try to make a player, the problem is that this way I can not control the gain on fly by variable.
Can anyone help me?
Thank's in advance.
Code: Select all
from subprocess import Popen, PIPE, STDOUT
vol = 0
vol = raw_input('set Volume ')
vol = str(vol)
p = Popen(['mpg321', '-R', 'n', '-g', vol], stdin = PIPE, stdout = PIPE, stderr = PIPE)
mpgOpen = p.communicate(input = 'LOAD 1.mp3')