WAVEXG.CPP
资源名称:tapi3.zip [点击查看]
上传用户:chinamans
上传日期:2013-03-17
资源大小:202k
文件大小:9k
源码类别:
TAPI编程
开发平台:
Visual C++
- // 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 Playrn");
- // 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