mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Added snd_hctl_open_ctl() function.
alisp massive extensions and tested ALSA function bindings.
This commit is contained in:
parent
6a543d8e20
commit
92093ae0fe
11 changed files with 575 additions and 128 deletions
|
|
@ -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));
|
||||
|
|
|
|||
49
alsalisp/hctl.lisp
Normal file
49
alsalisp/hctl.lisp
Normal file
|
|
@ -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")
|
||||
)
|
||||
)
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue