home *** CD-ROM | disk | FTP | other *** search
/ Graphics Programming Black Book (Special Edition) / BlackBook.bin / disk1 / source / chapterj / lj-2.c < prev    next >
Text File  |  1997-06-18  |  550b  |  20 lines

  1. // determines whether there's real DirectSound support in the sound
  2. // driver, or just wave-based emulation
  3. #include <windows.h>
  4. #include <dsound.h>
  5.  
  6. int RealDirectSoundDriver (LPDIRECTSOUND pDS)
  7. {
  8.    DSCAPS   dscaps;
  9.  
  10.    dscaps.dwSize = sizeof(dscaps);
  11.  
  12.    if (pDS->lpVtbl->GetCaps (pDS, &dscaps) != DS_OK)
  13.       return 0;   // couldn't get capabilities
  14.  
  15.    if (dscaps.dwFlags & DSCAPS_EMULDRIVER)
  16.       return 0;   // no real DirectSound driver support, just waves
  17.    else
  18.       return 1;   // real DirectSound driver support
  19. }
  20.