mplayer - project-owner/PeppyMeter.doc GitHub Wiki
In order to make mplayer output PCM data to fifo/named pipe and sound card the following section should be defined in file /home/pi/.asoundrc:
pcm.!default {
type file
slave.pcm "hw:0,0"
file /home/pi/myfifo
format raw
}
The fifo can be created using the following commands:
> mkfifo /home/pi/myfifo
> chmod 666 /home/pi/myfifo
The format property ensures that player will send raw PCM data to the fifo.
To make mplayer use the device defined in file /home/pi/.asoundrc the following parameters should be defined while starting mplayer:
mplayer -ao alsa:device=default
Any other mplayer parameters can be defined on this line if required.
There is a strict startup order - PeppyMeter should be started first. mplayer will crash if there is no PeppyMeter running/reading fifo.
The volume level of the signal in fifo depends on mplayer volume level.