home *** CD-ROM | disk | FTP | other *** search
/ Learn 3D Graphics Programming on the PC / Learn_3D_Graphics_Programming_on_the_PC_Ferraro.iso / rwwin / abstract.tx_ / abstract.bin
Text File  |  1995-11-14  |  3KB  |  82 lines

  1.  WAVEMIX: Plays Multiple .WAV Files Simultaneously
  2.  
  3.  WAVEMIX.DLL is a utility that allows multiple .WAV files
  4.  to play simultaneously. It is designed to be as simple to
  5.  use as possible but still have the power required by
  6.  games. The DLL (dynamic-link library) supports eight
  7.  channels of simultaneous wave play, the ability to queue
  8.  waves along the same channel, and wave completion
  9.  notification.
  10.  
  11.  WAVEMIX.DLL currently supports 11.025 kHz, 22.05 kHz, and
  12.  44.1 kHz 8-bit mono. Wave conversion from the file format
  13.  is done automatically to the output sampling rate when the
  14.  file is opened. The sampling rate is set in WAVEMIX.INI.
  15.  (See the WAVEMIX.INI file for details.) Stereo files and
  16.  16 bit files are converted to 8-bit mono when the wave is
  17.  loaded.
  18.  
  19.  The application programming interface (API) consists of
  20.  the following functions:
  21.  
  22.  HANDLE WINAPI WaveMixInit(void);
  23.  HANDLE WINAPI WaveMixActivate(HANDLE hMixSession, BOOL
  24.  fActivate);
  25.  LPMIXWAVE WINAPI WaveMixOpenWave(HANDLE hMixSession, LPSTR
  26.  szWaveFilename,
  27.       HINSTANCE hInst, DWORD dwFlags);
  28.  UINT WINAPI WaveMixOpenChannel(HANDLE hMixSession, int
  29.  iChannel, DWORD
  30.       dwFlags);
  31.  UINT WINAPI WaveMixPlay(LPMIXPLAYPARAMS lpMixPlayParams);
  32.  UINT WINAPI WaveMixFlushChannel(HANDLE hMixSession, int
  33.  iChannel, DWORD
  34.       dwFlags);
  35.  UINT WINAPI WaveMixCloseChannel(HANDLE hMixSession, int
  36.  iChannel, DWORD
  37.       dwFlags);
  38.  UINT WINAPI WaveMixFreeWave(LPMIXWAVE lpMixWave);
  39.  UINT WINAPI WaveMixCloseSession(HANDLE hMixSession);
  40.  void WINAPI WaveMixPump(void);
  41.  WORD WINAPI WaveMixGetInfo(LPWAVEMIXINFO lpWaveMixInfo);
  42.  
  43.  To play a file, a program must:
  44.  
  45.  1.  Initialize the DLL with WaveMixInit.
  46.  
  47.  2.  Open a wave file with WaveMixOpenFile.
  48.  
  49.  3.  Open a channel with WaveMixOpenChannel.
  50.  
  51.  4.  Call WaveMixActivate(TRUE) to tell WAVEMIX.DLL to
  52.  actually get the wave output device (see note 1 below)
  53.  
  54.  5.  Play the file using WaveMixPlay.
  55.  
  56.  A given channel can be silenced by calling
  57.  WaveMixFlushChannel at any time.
  58.  
  59.  When the program is finished playing sounds, it should:
  60.  
  61.  1.  Close the open channels using WaveMixCloseChannel.
  62.  
  63.  2.  Free the memory for the waves using WaveMixFreeWave.
  64.  
  65.  3.  End the session with WaveMixCloseSession.
  66.  
  67.  Note 1: An application should call WaveMixActivate(FALSE)
  68.  when it loses the focus so that the waveform device can be
  69.  freed for other applications. When focus is regained, the
  70.  application can call WaveMixActivate(TRUE).
  71.  
  72.  Note 2: An application that does not release the processor
  73.  can cause the sound to "skip." To avoid this, it can call
  74.  WaveMixPump frequently.
  75.  
  76.  For more information on the above functions, see the
  77.  WAVEMIX.TXT file included in this sample. For more
  78.  information on mixing sounds, see the MIXDESCR.DOC file.
  79.  
  80.  KEYWORDS: CD7
  81.  
  82.