audioctl.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. enum{
  10. Undef = 0x80000000,
  11. Play = 0,
  12. Record = 1,
  13. };
  14. typedef struct Audiocontrol Audiocontrol;
  15. struct Audiocontrol {
  16. char *name;
  17. uint8_t readable;
  18. uint8_t settable;
  19. uint8_t chans; /* 0 is master, non-zero is bitmap */
  20. int32_t value[8]; /* 0 is master; value[0] == Undef -> all values Undef */
  21. int32_t min, max, step;
  22. };
  23. extern Audiocontrol controls[2][Ncontrol];
  24. extern int endpt[2];
  25. extern int interface[2];
  26. extern int featureid[2];
  27. extern int selectorid[2];
  28. extern int mixerid[2];
  29. extern int buttonendpt;
  30. int ctlparse(char *s, Audiocontrol *c, int32_t *v);
  31. void ctlevent(void);
  32. #pragma varargck type "A" Audiocontrol*