VOCFILE.H 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  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 3 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, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef VOCFILE_H
  19. #define VOCFILE_H
  20. /****************************************************************************
  21. *
  22. * C O N F I D E N T I A L --- W E S T W O O D S T U D I O S
  23. *
  24. *----------------------------------------------------------------------------
  25. *
  26. * FILE
  27. * vocfile.h
  28. *
  29. * DESCRIPTION
  30. * VOC audio file definitions.
  31. *
  32. * PROGRAMMER
  33. * Denzil E. Long, Jr.
  34. *
  35. ****************************************************************************/
  36. /* VOC file header.
  37. *
  38. * type - File type description
  39. * offset - Offset of data block from the start of VOC file.
  40. * ver - File format version number
  41. * id - File identification code.
  42. */
  43. typedef struct _VOCHeader {
  44. char type[0x14];
  45. unsigned short offset;
  46. unsigned short ver;
  47. unsigned short id;
  48. } VOCHeader;
  49. /* VOC sub-block block types */
  50. #define VBT_TERMINATE 0 /* Last block of file (no size field) */
  51. #define VBT_VOICEDATA 1 /* New set of voice data */
  52. #define VBT_VOICECONT 2 /* Continuation of voice data */
  53. #define VBT_SILENCE 3 /* Silence period */
  54. #define VBT_MARKER 4 /* Syncronization marker */
  55. #define VBT_ASCII 5 /* NULL terminated string */
  56. #define VBT_REPEAT 6 /* Mark beginning of repeat loop */
  57. #define VBT_ENDREPEAT 7 /* Mark end of repeat loop */
  58. #define VBT_EXTENDED 8
  59. #define IS_VOC(a,b) (((~a)+0x1234)==b)
  60. #define BLOCK_LEN(a) ((a&0x00FFFFFFL))
  61. #endif /* VOCFILE_H */