TStockAudioRecorder
Posted: January 23rd, 2006, 5:58 am
I am getting more and more MMSYSERR_ERROR with tstockaudiorecorder, I mean, the onerror event is triggered.
if mmioWrite(mmIO, PChar(Buffer), BufferSize) <> Integer(BufferSize) then
Success(MMSYSERR_ERROR); // Raises an OnError event
This happen more and more on different systems with different soundcards.
I call:
recorder.RecordToFile(extractfiledir(application.exename)+'\recording.wav');
Reason is that the amount of written bytes differs fro mthe amount of buffersize. But in msdn is written that it is only an errir IF the return result is -1.
if mmioWrite(mmIO, PChar(Buffer), BufferSize) <> Integer(BufferSize) then
Success(MMSYSERR_ERROR); // Raises an OnError event
This happen more and more on different systems with different soundcards.
I call:
recorder.RecordToFile(extractfiledir(application.exename)+'\recording.wav');
Reason is that the amount of written bytes differs fro mthe amount of buffersize. But in msdn is written that it is only an errir IF the return result is -1.