WAVEFILE.H 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 WAVEFILE_H
  19. #define WAVEFILE_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. * wavefile.c
  28. *
  29. * DESCRIPTION
  30. * WAVE file format definitions.
  31. *
  32. * PROGRAMMER
  33. * Denzil E. Long, Jr.
  34. *
  35. * DATE
  36. * February 21, 1995
  37. *
  38. ****************************************************************************/
  39. /* WAVHeader: WAVE file header.
  40. *
  41. * RIFF - 4 byte identifier (always "RIFF").
  42. * Size - Size in bytes of entire file.
  43. * WAVE - 4 byte identifier (always "WAVE").
  44. */
  45. typedef struct _WAVHeader {
  46. long RIFF;
  47. long Size;
  48. long WAVE;
  49. } WAVHeader;
  50. /* WAVFormat: This structure describes the format of the audio data contained
  51. * in the WAV file.
  52. *
  53. * FormatTag -
  54. * Channels - Number of channels (1 = mono, 2 = stereo).
  55. * SamplesPerSec - Sampling rate.
  56. * AvgBytesPerSec - Bytes in 1 second of audio (Rate * SampleSize * Channels)
  57. * BlockAlign - padding.
  58. * BitsPerSample - Number of bits per sample (8, 16).
  59. */
  60. typedef struct _WAVFormat {
  61. short FormatTag;
  62. short Channels;
  63. long SamplesPerSec;
  64. long AvgBytesPerSec;
  65. short BlockAlign;
  66. short BitsPerSample;
  67. } WAVFormat;
  68. #endif /* WAVEFILE_H */