summaryrefslogtreecommitdiff
path: root/alsalisp
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2003-09-09 19:24:35 +0000
committerJaroslav Kysela <perex@perex.cz>2003-09-09 19:24:35 +0000
commit60585e25fca3e31a2828f03170c8c1d6bb36c5fc (patch)
treec80d9164267d0f71f1e66121358b07abe3ae1792 /alsalisp
parent668a300229401fc8381ad8381e975cb9d9d23ea9 (diff)
downloadalsa-lib-60585e25fca3e31a2828f03170c8c1d6bb36c5fc.tar.gz
added snd_hctl_ctl() function
ordinary mixer: - revised Ordinary Mixer I/O type - sndo_mixer_open() take PCMs rather than strings to pass the real relationship - an initial version of toplevel alisp script more alisp development: - renamed a* functions to A* functions (acall -> Acall etc.) - many improvements (unset*, exfun, Acall pcm_info, Asnderr, Asyserr)
Diffstat (limited to 'alsalisp')
-rw-r--r--alsalisp/hctl.lisp69
1 files changed, 32 insertions, 37 deletions
diff --git a/alsalisp/hctl.lisp b/alsalisp/hctl.lisp
index 6348d7bb..488d71f2 100644
--- a/alsalisp/hctl.lisp
+++ b/alsalisp/hctl.lisp
@@ -1,26 +1,26 @@
-(setq card (acall 'card_next -1))
-(setq card (aresult card))
+(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 " 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))
)
)
(unsetq 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")
+(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 (= (aerror hctl) 0)
+(setq hctl (Acall 'hctl_open 'default nil))
+(if (= (Aerror hctl) 0)
(progn
(princ "open success: " hctl "\n")
- (setq hctl (ahandle hctl))
+ (setq hctl (Ahandle hctl))
(princ "open hctl: " hctl "\n")
- (setq hctl (acall 'hctl_close hctl))
+ (setq hctl (Acall 'hctl_close hctl))
(if (= hctl 0)
(princ "close success\n")
(princ "close failed: " hctl "\n")
@@ -32,42 +32,42 @@
)
(unsetq hctl)
-(setq ctl (acall 'ctl_open 'default nil))
-(if (= (aerror ctl) 0)
+(setq ctl (Acall 'ctl_open 'default nil))
+(if (= (Aerror ctl) 0)
(progn
(princ "ctl open success: " ctl "\n")
- (setq ctl (ahandle ctl))
- (setq info (aresult (acall 'ctl_card_info 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")
(unsetq info)
- (setq hctl (acall 'hctl_open_ctl ctl))
- (if (= (aerror hctl) 0)
+ (setq hctl (Acall 'hctl_open_ctl ctl))
+ (if (= (Aerror hctl) 0)
(progn
(princ "hctl open success: " hctl "\n")
- (setq hctl (ahandle hctl))
+ (setq hctl (Ahandle hctl))
(princ "open hctl: " hctl "\n")
- (princ "load hctl: " (acall 'hctl_load hctl) "\n")
- (princ "first : " (acall 'hctl_first_elem hctl) "\n")
- (princ "last : " (acall 'hctl_last_elem hctl) "\n")
- (princ "next (first): " (acall 'hctl_elem_next (acall 'hctl_first_elem hctl)) "\n")
- (princ "prev (last) : " (acall 'hctl_elem_prev (acall 'hctl_last_elem hctl)) "\n")
- (setq elem (acall 'hctl_first_elem hctl))
+ (princ "load hctl: " (Acall 'hctl_load hctl) "\n")
+ (princ "first : " (Acall 'hctl_first_elem hctl) "\n")
+ (princ "last : " (Acall 'hctl_last_elem hctl) "\n")
+ (princ "next (first): " (Acall 'hctl_elem_next (Acall 'hctl_first_elem hctl)) "\n")
+ (princ "prev (last) : " (Acall 'hctl_elem_prev (Acall 'hctl_last_elem hctl)) "\n")
+ (setq elem (Acall 'hctl_first_elem hctl))
(while elem
(progn
- (setq info (acall 'hctl_elem_info elem))
+ (setq info (Acall 'hctl_elem_info elem))
(princ info "\n")
- (setq value (acall 'hctl_elem_read elem))
+ (setq value (Acall 'hctl_elem_read elem))
(princ value "\n")
- (when (equal (cdr (assq "name" (car (cdr (assq "id" (aresult info)))))) "Master Playback Volume")
- (princ "write Master: " (acall 'hctl_elem_write elem (20 20)) "\n")
+ (when (equal (cdr (assq "name" (car (cdr (assq "id" (Aresult info)))))) "Master Playback Volume")
+ (princ "write Master: " (Acall 'hctl_elem_write elem (20 20)) "\n")
)
(unsetq info value)
(gc)
- (setq elem (acall 'hctl_elem_next elem))
+ (setq elem (Acall 'hctl_elem_next elem))
)
)
- (setq hctl (acall 'hctl_close hctl))
+ (setq hctl (Acall 'hctl_close hctl))
(if (= hctl 0)
(princ "hctl close success\n")
(princ "hctl close failed: " hctl "\n")
@@ -75,7 +75,7 @@
)
(progn
(princ "hctl open failed: " hctl "\n")
- (acall 'ctl_close ctl)
+ (Acall 'ctl_close ctl)
)
)
(unsetq hctl)
@@ -88,8 +88,3 @@
(&stat-memory)
(&dump-memory "memory.dump")
-
-(defun autotest () (princ "abcd\n"))
-(setq auto-exec 'autotest)
-
-(princ (path 'data) "\n")