41
|
1
|
;;; examples/app/mpk.lisp --- MPK demo |
|
2
|
|
|
3
|
;; |
|
4
|
|
|
5
|
;;; Code: |
|
6
|
(in-package :user) |
|
7
|
(defpkg mpk (:use :cl :std :dat :net :obj :log :rdb :packy)) |
|
8
|
(in-package :mpk) |
|
9
|
|
|
10
|
(defvar *mpc*) |
|
11
|
|
|
12
|
(defun mpc-init () |
|
13
|
(let* ((conn (mpd:connect)) |
|
14
|
(status (mpd:status conn))) |
|
15
|
(setq mpk::*mpc* conn) |
|
16
|
(format t "mpd state: ~A~%" (mpd:state conn)) |
|
17
|
(values conn status))) |
|
18
|
|
|
19
|
(defun play () (mpd:play *mpc*)) |
|
20
|
(defun stop () (mpd:stop *mpc*)) |
|
21
|
(defun pause () (mpd:pause *mpc*)) |
|
22
|
|
|
23
|
#+nil (mpc-init) |