Add audio_output FIFO to mpd.conf - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: Add audio_output FIFO to mpd.conf (/showthread.php?tid=132) |
Add audio_output FIFO to mpd.conf - adrii - 04-27-2018 Hi I have written an OLED display for MPD-based players and I am trying to provide instructions for installing it on Moode. Code: https://github.com/antiprism/mpd_oled Demonstration video: https://youtu.be/6pgxGQIAX9s The spectrum analyser reads data from an MPD FIFO, so I would like to add add an audio_output FIFO section to /etc/mpd.conf Code: audio_output { Is it possible to make the FIFO survive MPD reconfiguration via the Moode UI? Thanks Adrian. [ For RuneAudio, which also regenerates /etc/mpd.conf, I was advised that I would have to change the RuneAudio code to insert the FIFO configuration text when mpd.conf was regenerated, and I have provided a patch to do this as part of the installation instructions for that system. ] RE: Add audio_output FIFO to mpd.conf - Tim Curtis - 04-27-2018 Hi, Nice project :-) moOde only allows a single MPD output to be enabled so more work than just persisting the output block in mpd.conf. Have a look in /var/www/inc/playerlib.php function wrk_mpdconf() function configMpdOutputs() function parseMpdOutputs() -Tim RE: Add audio_output FIFO to mpd.conf - adrii - 04-27-2018 Hi Tim Thanks for your help. I have amended wrk_mpdconf() to insert the FIFO configuration text from a file as follows PHP Code: ... This appears to be working fine. I am not sure how the other functions apply. Do they need any changes if I am not providing any configuration of the FIFO in the UI? Adrian. RE: Add audio_output FIFO to mpd.conf - Tim Curtis - 04-27-2018 Not really sure. What shows up when u list the outputs and which one is enabled? mpc outputs -Tim RE: Add audio_output FIFO to mpd.conf - adrii - 04-27-2018 Hi Tim I get Code: pi@moode:~/proj/mpd_oled $ mpc outputs Adrian. RE: Add audio_output FIFO to mpd.conf - Tim Curtis - 04-27-2018 Have a look at /var/www/command/worker.php in the section headed by the comment line below. You will see that this block of code will enable only one of the outputs based on whats returned by configMpdOutputs(). // start mpd If for some reason the fifo output is excluded internally by MPD from being disabled then you might be ok. -Tim RE: Add audio_output FIFO to mpd.conf - adrii - 04-28-2018 Hi Tim Thanks for the extra information. The FIFO won't survive an 'mpc enable only 1', and so I have also amended that area of the code to reenable the FIFO after it is disabled (a single command like 'mpc enable only 1 mpd_oled_FIFO' was also an option). PHP Code: ... The display appears to be working fine. I will test it for a couple of days and then update the repository with the installation instructions for Moode. Adrian. |