0

I wonder what I'm doing wrong?
I want to add a file to the mpd playlist with C. The connection works and I can play a file, which I manually put in Gnome Music Player Client for example with:

mpd_send_play(conn);

but adding the file within a C code results in an error.

Thanks for any help?

const char *path = "/home/user/foo.mp3";
mpd_send_add(conn,path);
uii
  • 1
  • 1

1 Answers1

1

It's really hard for us to help you if you provide this little information. I'm assuming you're using libmpdclient to try to write an MPD client.

What error are you getting?

Did you #include <mpd/client.h> or are you picking and choosing header files that that one includes for you? mpd_send_add() is a function from mpd/queue.h, are you including that header?

Could you show more code or detail your build steps so we can try to recreate your error?