Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <mpd/client.h>
- int main(void) {
- struct mpd_connection *mpd;
- struct mpd_song *song;
- mpd = mpd_connection_new("127.0.0.1", 6600, 0);
- if (mpd_connection_get_error(mpd) != MPD_ERROR_SUCCESS)
- return 1;
- if ((song = mpd_run_current_song(mpd)) == NULL)
- return 1;
- puts(mpd_song_get_uri(song));
- mpd_song_free(song);
- mpd_connection_free(mpd);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement