structs.h 938 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #pragma once
  2. #include <stdint.h>
  3. #pragma pack(push, 1)
  4. typedef struct
  5. {
  6. int16_t iCoef1;
  7. int16_t iCoef2;
  8. } ADPCMCOEFSET;
  9. typedef struct
  10. {
  11. uint16_t wFormatTag;
  12. uint16_t nChannels;
  13. uint32_t nSamplesPerSec;
  14. uint32_t nAvgBytesPerSec;
  15. uint16_t nBlockAlign;
  16. uint16_t wBitsPerSample;
  17. uint16_t cbSize;
  18. } WAVEFORMATEX;
  19. typedef struct
  20. {
  21. WAVEFORMATEX wfx;
  22. uint16_t wSamplesPerBlock;
  23. uint16_t wNumCoef;
  24. ADPCMCOEFSET aCoef[7];
  25. } ADPCMWAVEFORMAT;
  26. typedef struct
  27. {
  28. char id[4];
  29. uint32_t size;
  30. ADPCMWAVEFORMAT adpcm;
  31. } Fmt_chunk;
  32. typedef struct
  33. {
  34. char id[4];
  35. uint32_t size;
  36. uint32_t start;
  37. uint32_t end;
  38. } Loop_chunk;
  39. typedef struct
  40. {
  41. char id[4];
  42. uint32_t size;
  43. char data[];
  44. } Data_chunk;
  45. typedef struct
  46. {
  47. char id[4];
  48. uint32_t size;
  49. char format[4];
  50. } Riff_header;
  51. typedef struct
  52. {
  53. uint32_t len;
  54. uint32_t offset;
  55. uint32_t loop;
  56. uint32_t count;
  57. uint32_t start;
  58. uint32_t end;
  59. } FfWav_header;
  60. #pragma pack(pop)