More alisp extensions (card related functions, ctl_card_info).

This commit is contained in:
Jaroslav Kysela 2003-07-29 13:19:19 +00:00
parent c55d2495d7
commit adbc93f1a4
6 changed files with 198 additions and 35 deletions

View file

@ -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)
)
)
)