Windows NT 4.0 source code leak
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.

54 lines
1.8 KiB

4 years ago
  1. /*****************************************************************************
  2. playwav.h
  3. ****************************************************************************/
  4. extern BOOL NEAR PASCAL soundPlay(HANDLE hSound, UINT wFlags);
  5. extern VOID NEAR PASCAL soundFree(HANDLE hSound);
  6. extern HANDLE NEAR PASCAL soundLoadFile(LPCWSTR szFileName);
  7. extern HANDLE NEAR PASCAL soundLoadMemory(LPBYTE lpMem);
  8. /*****************************************************************************
  9. STUFF TO SUPPORT MS-WAVE FORMAT FILES
  10. ****************************************************************************/
  11. typedef struct _FileHeader {
  12. DWORD dwRiff;
  13. DWORD dwSize;
  14. DWORD dwWave;
  15. } FileHeader;
  16. typedef FileHeader FAR *FPFileHeader;
  17. typedef struct _ChunkHeader {
  18. DWORD dwCKID;
  19. DWORD dwSize;
  20. } ChunkHeader;
  21. typedef ChunkHeader UNALIGNED *FPChunkHeader;
  22. /* Chunk Types */
  23. //#define RIFF_FILE FOURCC('R','I','F','F')
  24. //#define RIFF_WAVE FOURCC('W','A','V','E')
  25. //#define RIFF_FORMAT FOURCC('f','m','t',' ')
  26. //#define RIFF_CHANNEL FOURCC('d','a','t','a')
  27. #define RIFF_FILE FOURCC_RIFF // in Winmm.H
  28. #define RIFF_WAVE FOURCC_WAVE // in WinmmI.h
  29. #define RIFF_FORMAT FOURCC_FMT // in WinmmI.h
  30. #define RIFF_CHANNEL FOURCC_DATA // in WinmmI.h
  31. /* When memory for a PlaySound file is allocated we insert a WAVEHDR, then
  32. * the size, date and time as well as the filename of the wave file.
  33. * Then if the user changes the file underneath us, but keeping the same
  34. * name, we have a chance to detect the difference and not to play the
  35. * cached sound file. Note: the filetime stored is the lastwritten time.
  36. */
  37. typedef struct _SoundFile {
  38. WAVEHDR wh;
  39. ULONG Size;
  40. FILETIME ft;
  41. WCHAR Filename[]; // allows field to be addressed
  42. } SOUNDFILE;
  43. typedef SOUNDFILE * PSOUNDFILE;