Skip to content

Commit

Permalink
Demo Code Recorder.SampleData调用问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangyuecn committed Nov 3, 2019
1 parent b1807d7 commit ebb736e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/runtime-codes/teach.realtime.encode_transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var RealTimeSendTry=function(rec,isClose){

var newSampleRate=16000;
//借用SampleData函数进行数据的连续处理,采样率转换是顺带的
var chunk=Recorder.SampleData(rec.buffers,rec.srcSampleRate,newSampleRate,realTimeSendTryChunk,{frameType:isClose?"":rec.set.type});
var chunk=Recorder.SampleData(rec.buffers,rec.srcSampleRate,newSampleRate,realTimeSendTryChunk,{frameType:isClose?"":"mp3"});

//清理已处理完的缓冲数据,释放内存以支持长时间录音,最后完成录音时不能调用stop,因为数据已经被清掉了
for(var i=realTimeSendTryChunk?realTimeSendTryChunk.index:0;i<chunk.index;i++){
Expand Down

0 comments on commit ebb736e

Please sign in to comment.