summaryrefslogtreecommitdiff
path: root/alsalisp
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2003-07-29 13:19:19 +0000
committerJaroslav Kysela <perex@perex.cz>2003-07-29 13:19:19 +0000
commitadbc93f1a413128b59bd1f6037098c56489a07cf (patch)
treeea539e7198263f56c7264983f77104adc9ee9ecd /alsalisp
parentc55d2495d7c3bf36f59f43e1b560af0afa3ac9ed (diff)
More alisp extensions (card related functions, ctl_card_info).
Diffstat (limited to 'alsalisp')
-rw-r--r--alsalisp/hctl.lisp35
1 files changed, 24 insertions, 11 deletions
diff --git a/alsalisp/hctl.lisp b/alsalisp/hctl.lisp
index 67e36317..af136664 100644
--- a/alsalisp/hctl.lisp
+++ b/alsalisp/hctl.lisp
@@ -1,14 +1,23 @@
-(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 card (acall 'card_next -1))
+(setq card (aresult card))
+(while (>= card 0)
+ (progn
+ (princ "found card: " card "\n")
+ (princ " name : " (aresult (acall 'card_get_name card)) "\n")
+ (princ " longname: " (aresult (acall 'card_get_longname card)) "\n")
+ (setq card (acall 'card_next card))
+ (setq card (aresult card))
+ )
+)
+
+(princ "card_get_index test (SI7018): " (acall 'card_get_index "SI7018") "\n")
+(princ "card_get_index test (ABCD): " (acall 'card_get_index "ABCD") "\n")
(setq hctl (acall 'hctl_open ('default nil)))
-(if (= (car hctl) 0)
+(if (= (aerror hctl) 0)
(progn
(princ "open success: " hctl "\n")
- (setq hctl (car (cdr hctl)))
+ (setq hctl (ahandle hctl))
(princ "open hctl: " hctl "\n")
(setq hctl (acall 'hctl_close hctl))
(if (= hctl 0)
@@ -22,15 +31,18 @@
)
(setq ctl (acall 'ctl_open ('default nil)))
-(if (= (car ctl) 0)
+(if (= (aerror ctl) 0)
(progn
(princ "ctl open success: " ctl "\n")
- (setq ctl (car (cdr ctl)))
+ (setq ctl (ahandle ctl))
+ (setq info (aresult (acall 'ctl_card_info ctl)))
+ (princ "ctl card info: " info "\n")
+ (princ "ctl card info (mixername): " (cdr (assq "mixername" info)) "\n")
(setq hctl (acall 'hctl_open_ctl ctl))
- (if (= (car hctl) 0)
+ (if (= (aerror hctl) 0)
(progn
(princ "hctl open success: " hctl "\n")
- (setq hctl (car (cdr hctl)))
+ (setq hctl (ahandle hctl))
(princ "open hctl: " hctl "\n")
(setq hctl (acall 'hctl_close hctl))
(if (= hctl 0)
@@ -40,6 +52,7 @@
)
(progn
(princ "hctl open failed: " ctl "\n")
+ (acall 'ctl_close ctl)
)
)
)