Update of /cvsroot/alsa/alsa-lib/alsalisp In directory sc8-pr-cvs1:/tmp/cvs-serv2399/alsalisp
Modified Files: hctl.lisp Log Message: More alisp extensions (card related functions, ctl_card_info). Index: hctl.lisp =================================================================== RCS file: /cvsroot/alsa/alsa-lib/alsalisp/hctl.lisp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- hctl.lisp 27 Jul 2003 20:20:26 -0000 1.1 +++ hctl.lisp 29 Jul 2003 13:19:19 -0000 1.2 @@ -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) ) ) ) ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog