Home | History | Annotate | Download | only in alsa
      1 /*
      2  *  ALSA lisp implementation
      3  *  Copyright (c) 2003 by Jaroslav Kysela <perex (at) perex.cz>
      4  *
      5  *
      6  *   This library is free software; you can redistribute it and/or modify
      7  *   it under the terms of the GNU Lesser General Public License as
      8  *   published by the Free Software Foundation; either version 2.1 of
      9  *   the License, or (at your option) any later version.
     10  *
     11  *   This program is distributed in the hope that it will be useful,
     12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14  *   GNU Lesser General Public License for more details.
     15  *
     16  *   You should have received a copy of the GNU Lesser General Public
     17  *   License along with this library; if not, write to the Free Software
     18  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
     19  *
     20  */
     21 
     22 struct alisp_cfg {
     23 	int verbose: 1,
     24 	    warning: 1,
     25 	    debug: 1;
     26 	snd_input_t *in;	/* program code */
     27 	snd_output_t *out;	/* program output */
     28 	snd_output_t *eout;	/* error output */
     29 	snd_output_t *vout;	/* verbose output */
     30 	snd_output_t *wout;	/* warning output */
     31 	snd_output_t *dout;	/* debug output */
     32 };
     33 
     34 struct alisp_instance;
     35 struct alisp_object;
     36 struct alisp_seq_iterator;
     37 
     38 struct alisp_cfg *alsa_lisp_default_cfg(snd_input_t *input);
     39 void alsa_lisp_default_cfg_free(struct alisp_cfg *cfg);
     40 int alsa_lisp(struct alisp_cfg *cfg, struct alisp_instance **instance);
     41 void alsa_lisp_free(struct alisp_instance *instance);
     42 int alsa_lisp_function(struct alisp_instance *instance, struct alisp_seq_iterator **result,
     43 		       const char *id, const char *args, ...)
     44 #ifndef DOC_HIDDEN
     45 		       __attribute__ ((format (printf, 4, 5)))
     46 #endif
     47 		       ;
     48 void alsa_lisp_result_free(struct alisp_instance *instance,
     49 			   struct alisp_seq_iterator *result);
     50 int alsa_lisp_seq_first(struct alisp_instance *instance, const char *id,
     51 			struct alisp_seq_iterator **seq);
     52 int alsa_lisp_seq_next(struct alisp_seq_iterator **seq);
     53 int alsa_lisp_seq_count(struct alisp_seq_iterator *seq);
     54 int alsa_lisp_seq_integer(struct alisp_seq_iterator *seq, long *val);
     55 int alsa_lisp_seq_pointer(struct alisp_seq_iterator *seq, const char *ptr_id, void **ptr);
     56