I am trying to add a local file to mpd ( through mpc ) and play it . my platform is OpenWRT embedded linux .
so, from the man page, it states:
mpc add <file> Add a song to the current playlist
root@OpenWrt:~/.mpd# mpc add /usr/share/baresip/ring.wav
error adding /usr/share/baresip/ring.wav: directory or file not found
root@OpenWrt:~/.mpd# mpc add file:///usr/share/baresip/ring.wav
error adding file:///usr/share/baresip/ring.wav: Access denied
i did not find out how to play wav..but i forgot i found the solution (for mp3) and posted it here: https://forum.openwrt.org/viewtopic.php?id=41022
however, since stackoverflow always shows up top on google search i am pasting the same solution here in case it helps someone as well :
/etc/mpd.conf should be something approximately like this:
music_directory "/tmp" playlist_directory "~/.mpd/playlists" db_file "~/.mpd/database" log_file "/tmp/mpdlog" pid_file "~/.mpd/pid" state_file "~/.mpd/state" sticker_file "~/.mpd/sticker.sql" user "root" group "root" bind_to_address "127.0.0.1" log_level "verbose" auto_update "yes" auto_update_depth "3" follow_outside_symlinks "yes" follow_inside_symlinks "yes"