pulseaudio 5.0.0-6.mga5
Greetings!
Hope this finds all here well. I have an issue that I can't seem to get a handle on. I have a Bash script fired by a cron job that uses mplayer to play a playlist. I would like to write a line into that script that sets playback volume.
The system uses Pulseaudio, so it seems the alsa commands don't work:
- Code: Select all
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
cannot open mixer: Connection refused
I looked into the "pactl" command, but that seems out of the question as well.
- Code: Select all
$ pactl info Connection failure: Connection refused
pa_context_connect() failed: Connection refused
I thought this was because Pulseaudio wasn't running as a daemon, so I tried reconfiguring the pulse/client.conf and pulse/daemon.conf files to get that to happen. I then found that there's no way to stop Pulseaudio. I set autospawn=no but was still unable to stop it with "pulseaudio -k" or even by killing the process running pulseaudio. So I rebooted. That didn't help anything. The daemon would not start and audio was broken.
Rather than work on that, I just backed those changes out and got sound working again.
Now, I'm seeking help. Is there a way to do this?
What am I missing?
Thanks.