BOOL AudioCopy(LPSTR lpszSrcAudioFile,LPSTR lpszDesAudioFile)
{
HFILE hFile;
MMRESULT mmResult;
HMMIO hMMIO1,hMMIO2;
// if the destination audio file do not exit,create it.
OFSTRUCT ofStruct;
hFile = OpenFile(lpszDesAudioFile,&ofStruct, OF_CREATE | OF_READWRITE );
if ( hFile == HFILE_ERROR )
{
return 0;
}
MMIOINFO mmioInfo;
memset(&mmioInfo,0,sizeof(MMIOINFO));
// First, use the mmioOpen function open the audio file.
hMMIO1 = mmioOpen(lpszSrcAudioFile,NULL,MMIO_READWRITE);
if ( hMMIO1 == NULL )
return 0;
hMMIO2 = mmioOpen(lpszDesAudioFile,NULL,MMIO_READWRITE);
if ( hMMIO2 == NULL )
return 0;
// if you want to get the IO's information,use the mmioGetInfo function.
// Here we don't need its information,so I shield following code.
//mmResult = mmioGetInfo(hMMIO1,&am