Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1021 B

  1. #ifndef WAVEUTIL_H
  2. #define WAVEUTIL_H
  3. #define SIZEOFFORMAT(pwfx) ((WAVE_FORMAT_PCM == pwfx->wFormatTag)? \
  4. (sizeof(PCMWAVEFORMAT)): \
  5. (sizeof(WAVEFORMATEX)+pwfx->cbSize))
  6. #define SIZEOFFORMATEX(pwfx) (sizeof(WAVEFORMATEX) + \
  7. ((WAVE_FORMAT_PCM == pwfx->wFormatTag)?0:pwfx->cbSize))
  8. #define BLOCKALIGN(cb, b) ((DWORD)((DWORD)((DWORD)((cb) + (b) - 1) / (b)) * (b)))
  9. #define V_PWFX_READ(p) { \
  10. V_PTR_READ(p, PCMWAVEFORMAT); \
  11. if (WAVE_FORMAT_PCM != p->wFormatTag) { V_PTR_READ(p, WAVEFORMATEX); \
  12. V_BUFPTR_READ(p, (sizeof(WAVEFORMATEX) + p->cbSize)); } \
  13. }
  14. void CopyFormat
  15. (
  16. LPWAVEFORMATEX pwfxDst,
  17. LPWAVEFORMATEX pwfxSrc
  18. );
  19. void CopyFormatEx
  20. (
  21. LPWAVEFORMATEX pwfxDst,
  22. LPWAVEFORMATEX pwfxSrc
  23. );
  24. BOOL FormatCmp
  25. (
  26. LPWAVEFORMATEX pwfx1,
  27. LPWAVEFORMATEX pwfx2
  28. );
  29. DWORD DeinterleaveBuffers
  30. (
  31. LPWAVEFORMATEX pwfx,
  32. LPBYTE pSrc,
  33. LPBYTE *ppbDst,
  34. DWORD cBuffers,
  35. DWORD cbSrcLength,
  36. DWORD dwBytesWritten
  37. );
  38. #endif