apacheaudio-playermpd

How can i execute several mpd mpc commands simultaneously?


To control mpd(music player daemon) i use mpc(cusic clayer client). I want to empty queue, add file and play it, using my php-file:

exec('/usr/bin/mpc clear');
sleep(1);
exec('/usr/bin/mpc add file.mp3');
sleep(1);
exec('/usr/bin/mpc play');

I need something, like:

exec('/usr/bin/mpc clear & add file.mp3 & play');

Solution

  • exec('/usr/bin/mpc clear & mpc add file.mp3 & mpc play');