1. My own SpeakHere
* 目前主要问题
play后无法检测到结束
play的时候,声音感觉被截断:其实是录音声音被截断
播放的时候有回声
Q:数据类型相关?Byte/char ? UInt32/long ?
Q: anything to do with different buffer size for recording/playing ?
* 问题:播放的时候有回声:解决!
原因:读文件的时候,指针移动错误
//THIS->mCurrentPacket = (THIS->GetCurrentPacket() + nPackets);
THIS->mCurrentPacket = (THIS->GetCurrentPacket() + numBytes);
^ this is correct !
note: need to refactor the naming for vars .
*问题解决:录音声音似有截断
AQRecorder::MyInputBufferHandler()
// write a bunch of data ( 32K bytes = 32768 bytes )
count =fwrite(inBuffer->mAudioData,1, inNumPackets*2, aqr->fp);
^ 不*2,则少一半数据!
NOTE:在分析的时候发现,音频文件比预期的小了约50%。