wavexg.cpp

来自「TAPI编程应用」· C++ 代码 · 共 32 行

CPP
32
字号
// Source for wave functions for the dialer/talker app
// (c) Dialogic corp 1995

#include "stdafx.h"
#include <mmsystem.h>                   
#include "wavexg.h" 

//static char ppszGNames[MAXWAVEDEVS][16];	// Limit the name by 16 chars; change if need to
static char szErr[128];

// Play the WAVE file specified on input                      
HWAVEOUT WavexPlay(HWND hWnd, UINT nID, LPSTR lpFileName)
{ 
	WAVEFORMATEX FAR *lpwfWaveFormat = NULL;
	WAVEHDR FAR *lpwhWaveHdr = NULL;
	HMMIO hmmH;      
	HWAVEOUT hWave;
	MMCKINFO mmParent, mmSubchunk;
	DWORD dwFmtSize, dwDataSize;
	HPSTR lpWaveData = NULL;
	WORD wrc;
	
	TRACE("** TALKER32 **: enter Play\r\n");
    // Open wave file 
    hmmH = mmioOpen(lpFileName, NULL, MMIO_READ); //| MMIO_ALLOCBUF);
    if(!hmmH)
    {   
    	MessageBox(NULL, "Input WAVE file open failed", NULL, MB_ICONSTOP);
        return FALSE;
    }                 
    
    // Locate a 慠IFF

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?