Write raw audio file in CaptureSharedEventDriven

  • Thread starter Thread starter hungcui
  • Start date Start date
H

hungcui

Guest
In CaptureSharedEventDriven(Windows SDK). Wav file written in function WriteWaveFile(HANDLE FileHandle, const BYTE *Buffer, const size_t BufferSize)and how to write Raw file with input in WriteWaveFile function.This is my code but data is not written:

size_t valueCount = BufferSize;
FILE* _file;
int16_t* _data;
_data = (int16_t*)waveFileData;
_file = fopen("utterance.raw", "ab");
fwrite(Buffer, sizeof(_data[0]), valueCount, _file);
fclose(_file);

Thanks for help!

Continue reading...
 
Back
Top