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.

55 lines
1.9 KiB

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