home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 11 Learning / 04 Mommersteeg / Tennis / DirectSound.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-23  |  1.7 KB  |  40 lines

  1. //----------------------------------------------------------------------------------------------
  2. // Sequential Prediction Demo: The positioning pattern
  3. // 
  4. // Author:  Fri Mommersteeg
  5. // Date:    10-09-2001
  6. // File:    DirectSound.h
  7. //----------------------------------------------------------------------------------------------
  8.  
  9. #ifndef __DIRECTSOUND_H
  10. #define __DIRECTSOUND_H
  11.  
  12. //----------------------------------------------------------------------------------------------
  13. // Global type definitions (new version independant names for weird DX identifiers)
  14. //----------------------------------------------------------------------------------------------
  15.  
  16. typedef LPDIRECTSOUND            LPDS;
  17. typedef LPDIRECTSOUNDBUFFER        LPDSB;
  18. typedef LPDIRECTSOUNDNOTIFY        LPDSN;
  19. typedef DSBUFFERDESC            DSBD;
  20. typedef DSBPOSITIONNOTIFY        DSBPN;
  21.  
  22. //----------------------------------------------------------------------------------------------
  23. // External declarations
  24. //----------------------------------------------------------------------------------------------
  25.  
  26. extern LPDS            lpds;
  27.  
  28. //----------------------------------------------------------------------------------------------
  29. // Exported functions
  30. //----------------------------------------------------------------------------------------------
  31.  
  32. extern BOOL InitDS(DWORD dwSamplesPerSec = 22050, WORD nChannels = 1, WORD nBitsPerSample = 16);
  33. extern void ShutdownDS();
  34. extern void FillWaveFormat(WAVEFORMATEX * wfx, DWORD dwSamplesPerSec, WORD nChannels, WORD nBitsPerSample);
  35. extern void MatchPrimaryBuffer(WAVEFORMATEX * pwfx);
  36.  
  37. //----------------------------------------------------------------------------------------------
  38.  
  39. #endif // __DIRECTSOUND_H
  40.