usbus428ctldefs.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. *
  3. * Copyright (c) 2003 by Karsten Wiese <annabellesgarden@yahoo.de>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. */
  19. enum E_In84{
  20. eFader0 = 0,
  21. eFader1,
  22. eFader2,
  23. eFader3,
  24. eFader4,
  25. eFader5,
  26. eFader6,
  27. eFader7,
  28. eFaderM,
  29. eTransport,
  30. eModifier = 10,
  31. eFilterSelect,
  32. eSelect,
  33. eMute,
  34. eSwitch = 15,
  35. eWheelGain,
  36. eWheelFreq,
  37. eWheelQ,
  38. eWheelPan,
  39. eWheel = 20
  40. };
  41. #define T_RECORD 1
  42. #define T_PLAY 2
  43. #define T_STOP 4
  44. #define T_F_FWD 8
  45. #define T_REW 0x10
  46. #define T_SOLO 0x20
  47. #define T_REC 0x40
  48. #define T_NULL 0x80
  49. struct us428_ctls {
  50. unsigned char Fader[9];
  51. unsigned char Transport;
  52. unsigned char Modifier;
  53. unsigned char FilterSelect;
  54. unsigned char Select;
  55. unsigned char Mute;
  56. unsigned char UNKNOWN;
  57. unsigned char Switch;
  58. unsigned char Wheel[5];
  59. };
  60. struct us428_setByte {
  61. unsigned char Offset,
  62. Value;
  63. };
  64. enum {
  65. eLT_Volume = 0,
  66. eLT_Light
  67. };
  68. struct usX2Y_volume {
  69. unsigned char Channel,
  70. LH,
  71. LL,
  72. RH,
  73. RL;
  74. };
  75. struct us428_lights {
  76. struct us428_setByte Light[7];
  77. };
  78. struct us428_p4out {
  79. char type;
  80. union {
  81. struct usX2Y_volume vol;
  82. struct us428_lights lights;
  83. } val;
  84. };
  85. #define N_us428_ctl_BUFS 16
  86. #define N_us428_p4out_BUFS 16
  87. struct us428ctls_sharedmem{
  88. struct us428_ctls CtlSnapShot[N_us428_ctl_BUFS];
  89. int CtlSnapShotDiffersAt[N_us428_ctl_BUFS];
  90. int CtlSnapShotLast, CtlSnapShotRed;
  91. struct us428_p4out p4out[N_us428_p4out_BUFS];
  92. int p4outLast, p4outSent;
  93. };