I am currently struggling on a project I am working on. I am supposed to control the audio output of a raspberry from a computer or another device. I installed an apache server and I want to execute a command line so I can control the audio output.
I know I have to do it with the exec() function. But for a reason I don't know yet, very commands seems to work fine execpt the one that actually drive the audio output. I tried using omxplayer as a music player, mpg123 as well and I tried by using pygame and I wrote a python script that uses the audio output.
My problem is that all of these solutions works on the shell but don't work when they are on the PHP command. While I can use the command cp or mv to move files of the raspberry from the server and it actually works.
It seems like everything is working on its own but do not when I put everything together.
Anyway thank you for taking time to help me