Source code of Windows XP (NT5)
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.

39 lines
1.2 KiB

  1. /*****************************************************************************
  2. playwav.h
  3. ****************************************************************************/
  4. BOOL NEAR PASCAL soundPlay(HGLOBAL hSound, UINT wFlags);
  5. void NEAR PASCAL soundFree(HGLOBAL hSound);
  6. HGLOBAL NEAR PASCAL soundLoadFile(LPCSTR szFileName);
  7. HGLOBAL NEAR PASCAL soundLoadMemory(LPCSTR lpMem);
  8. /*****************************************************************************
  9. STUFF TO SUPPORT MS-WAVE FORMAT FILES
  10. ****************************************************************************/
  11. #define FOURCC( ch0, ch1, ch2, ch3 ) \
  12. ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
  13. ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
  14. typedef struct _FileHeader {
  15. DWORD dwRiff;
  16. DWORD dwSize;
  17. DWORD dwWave;
  18. } FileHeader;
  19. typedef FileHeader FAR *FPFileHeader;
  20. typedef struct _ChunkHeader {
  21. DWORD dwCKID;
  22. DWORD dwSize;
  23. } ChunkHeader;
  24. typedef ChunkHeader FAR *FPChunkHeader;
  25. /* Chunk Types */
  26. #define RIFF_FILE FOURCC('R','I','F','F')
  27. #define RIFF_WAVE FOURCC('W','A','V','E')
  28. #define RIFF_FORMAT FOURCC('f','m','t',' ')
  29. #define RIFF_CHANNEL FOURCC('d','a','t','a')