Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (37 sloc) 1.177 kb
use mpd
MPD: cover from MpdObj* {
version: extern(libmpd_version) static String
new: extern(mpd_new) static func (host: String, port: Int, password: String) -> This
new: extern(mpd_new_default) static func ~default -> This
connect: extern(mpd_connect) func -> Int
play: extern(mpd_player_play) func -> Int
pause: extern(mpd_player_pause) func -> Int
stop: extern(mpd_player_stop) func -> Int
getState: extern(mpd_player_get_state) func -> MpdState
hostname: String {
set: extern(mpd_set_hostname)
get: extern(mpd_get_hostname)
port: Int {
set: extern(mpd_set_port)
password: String {
set: extern(mpd_set_password)
MpdState: cover from Int {
pause: extern(MPD_PLAYER_PAUSE) static This
play: extern(MPD_PLAYER_PLAY) static This
stop: extern(MPD_PLAYER_STOP) static This
unknown: extern(MPD_PLAYER_UNKNOWN) static This
main: func {
("MPD version " + MPD version) println()
mpd := MPD new() \
if(mpd getState() == MpdState play)
mpd pause()
mpd play()
return 0
Jump to Line
Something went wrong with that request. Please try again.