diff options
author | Jaroslav Kysela <perex@perex.cz> | 2003-07-27 20:20:26 +0000 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2003-07-27 20:20:26 +0000 |
commit | 92093ae0fee0790c23d501125c553aad638a4ccf (patch) | |
tree | 10955f6872822acb1d1f471d32cc4ead86d0c2d9 /alsalisp | |
parent | 6a543d8e20239a16ba4cd48837c894a08313bc54 (diff) |
Added snd_hctl_open_ctl() function.
alisp massive extensions and tested ALSA function bindings.
Diffstat (limited to 'alsalisp')
-rw-r--r-- | alsalisp/alsalisp.c | 2 | ||||
-rw-r--r-- | alsalisp/hctl.lisp | 49 | ||||
-rw-r--r-- | alsalisp/hello.lisp | 5 |
3 files changed, 55 insertions, 1 deletions
diff --git a/alsalisp/alsalisp.c b/alsalisp/alsalisp.c index 75e833c8..b149bea7 100644 --- a/alsalisp/alsalisp.c +++ b/alsalisp/alsalisp.c @@ -68,7 +68,7 @@ static void interpret_filename(const char *file) cfg.out = cfg.eout = cfg.vout = cfg.wout = cfg.dout = out; cfg.root = root; cfg.node = root; - err = alsa_lisp(&cfg); + err = alsa_lisp(&cfg, NULL); } if (err < 0) fprintf(stderr, "alsa lisp returned error %i (%s)\n", err, strerror(err)); diff --git a/alsalisp/hctl.lisp b/alsalisp/hctl.lisp new file mode 100644 index 00000000..67e36317 --- /dev/null +++ b/alsalisp/hctl.lisp @@ -0,0 +1,49 @@ +(setq ctl (acall 'ctl_open ('default nil))) +(setq ctl (car (cdr ctl))) +(setq hctl (acall 'hctl_open_ctl ctl)) +(setq hctl (car (cdr hctl))) +(setq hctl (acall 'hctl_close hctl)) + +(setq hctl (acall 'hctl_open ('default nil))) +(if (= (car hctl) 0) + (progn + (princ "open success: " hctl "\n") + (setq hctl (car (cdr hctl))) + (princ "open hctl: " hctl "\n") + (setq hctl (acall 'hctl_close hctl)) + (if (= hctl 0) + (princ "close success\n") + (princ "close failed: " hctl "\n") + ) + ) + (progn + (princ "open failed: " hctl "\n") + ) +) + +(setq ctl (acall 'ctl_open ('default nil))) +(if (= (car ctl) 0) + (progn + (princ "ctl open success: " ctl "\n") + (setq ctl (car (cdr ctl))) + (setq hctl (acall 'hctl_open_ctl ctl)) + (if (= (car hctl) 0) + (progn + (princ "hctl open success: " hctl "\n") + (setq hctl (car (cdr hctl))) + (princ "open hctl: " hctl "\n") + (setq hctl (acall 'hctl_close hctl)) + (if (= hctl 0) + (princ "hctl close success\n") + (princ "hctl close failed: " hctl "\n") + ) + ) + (progn + (princ "hctl open failed: " ctl "\n") + ) + ) + ) + (progn + (princ "ctl open failed: " ctl "\n") + ) +) diff --git a/alsalisp/hello.lisp b/alsalisp/hello.lisp index a1118f6b..11138f27 100644 --- a/alsalisp/hello.lisp +++ b/alsalisp/hello.lisp @@ -13,3 +13,8 @@ (princ "Float test 1.1 + 1.35 = " (+ 1.1 1.35) "\n") (princ "Factorial of 10.0: " (factorial 10.0) "\n") + +(setq alist '((one . first) (two . second) (three . third))) +(princ "alist = " alist "\n") +(princ "alist assoc one = " (assoc 'one alist) "\n") +(princ "alist rassoc third = " (rassoc 'third alist) "\n") |