Пример #1
0
int Audio::stopWAVDump(void)
{
	STUB;
#if 0
	if (!WAV_Dumping)
	{
		draw->writeText("Already stopped", 1000);
		return 0;
	}
	
	if (WaveCloseWriteFile(&MMIOOut, &CkOut, &CkRIFF, &MMIOInfoOut, 0))
		return 0;
	
	draw->writeText("WAV dump stopped", 1000);
	WAV_Dumping = 0;
#endif
	return 1;
}
Пример #2
0
int
WaveSaveFile (TCHAR * pszFileName,	// (IN) 
	      UINT cbSize,	// (IN) 
	      DWORD cSamples,	// (IN) 
	      WAVEFORMATEX * pwfxDest,	// (IN) 
	      BYTE * pbData	// (IN) 
  )
{
  HMMIO hmmioOut;
  MMCKINFO ckOut;
  MMCKINFO ckOutRIFF;
  MMIOINFO mmioinfoOut;
  UINT cbActualWrite;
  int nError;

  if ((nError =
       WaveCreateFile (pszFileName, &hmmioOut, pwfxDest, &ckOut,
		       &ckOutRIFF)) != 0)
    {
      goto ERROR_SAVING;
    }

  if ((nError = WaveStartDataWrite (&hmmioOut, &ckOut, &mmioinfoOut)) != 0)
    {
      goto ERROR_SAVING;
    }

  if ((nError =
       WaveWriteFile (hmmioOut, cbSize, pbData, &ckOut, &cbActualWrite,
		      &mmioinfoOut)) != 0)
    {
      goto ERROR_SAVING;
    }

  if ((nError =
       WaveCloseWriteFile (&hmmioOut, &ckOut, &ckOutRIFF, &mmioinfoOut,
			   cSamples)) != 0)
    {
      goto ERROR_SAVING;
    }

ERROR_SAVING:
  return (nError);
}
Пример #3
0
//-----------------------------------------------------------------------------
// Name: Close()
// Desc: Closes an open wave file 
//-----------------------------------------------------------------------------
HRESULT CWaveSoundWrite::Close( DWORD dwSamples )
{
    return WaveCloseWriteFile( m_hmmioOut, &m_ckOut, &m_ckOutRIFF, 
                               &m_mmioinfoOut, dwSamples );
}