alisp.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * ALSA lisp implementation
  3. * Copyright (c) 2003 by Jaroslav Kysela <perex@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. struct alisp_cfg {
  22. int verbose: 1,
  23. warning: 1,
  24. debug: 1;
  25. snd_input_t *in; /* program code */
  26. snd_output_t *out; /* program output */
  27. snd_output_t *eout; /* error output */
  28. snd_output_t *vout; /* verbose output */
  29. snd_output_t *wout; /* warning output */
  30. snd_output_t *dout; /* debug output */
  31. };
  32. struct alisp_instance;
  33. struct alisp_object;
  34. struct alisp_seq_iterator;
  35. struct alisp_cfg *alsa_lisp_default_cfg(snd_input_t *input);
  36. void alsa_lisp_default_cfg_free(struct alisp_cfg *cfg);
  37. int alsa_lisp(struct alisp_cfg *cfg, struct alisp_instance **instance);
  38. void alsa_lisp_free(struct alisp_instance *instance);
  39. int alsa_lisp_function(struct alisp_instance *instance, struct alisp_seq_iterator **result,
  40. const char *id, const char *args, ...)
  41. #ifndef DOC_HIDDEN
  42. __attribute__ ((format (printf, 4, 5)))
  43. #endif
  44. ;
  45. void alsa_lisp_result_free(struct alisp_instance *instance,
  46. struct alisp_seq_iterator *result);
  47. int alsa_lisp_seq_first(struct alisp_instance *instance, const char *id,
  48. struct alisp_seq_iterator **seq);
  49. int alsa_lisp_seq_next(struct alisp_seq_iterator **seq);
  50. int alsa_lisp_seq_count(struct alisp_seq_iterator *seq);
  51. int alsa_lisp_seq_integer(struct alisp_seq_iterator *seq, long *val);
  52. int alsa_lisp_seq_pointer(struct alisp_seq_iterator *seq, const char *ptr_id, void **ptr);