瀏覽代碼

cmProc.c : Fix bug where endFrmIdx==cmInvalidIdx is not properly handled in

cmAudioFileRdOpen()
master
kevin 10 年之前
父節點
當前提交
76a8e5cd2a
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      cmProc.c

+ 1
- 1
cmProc.c 查看文件

@@ -116,7 +116,7 @@ cmRC_t               cmAudioFileRdOpen(  cmAudioFileRd* p,  unsigned procSmpCnt,
116 116
     return cmCtxRtCondition( &p->obj, afRC, "Unable to open the audio file:'%s'", fn );
117 117
 
118 118
   p->chIdx          = chIdx;
119
-  p->outN           = procSmpCnt;
119
+  p->outN           = endFrmIdx==cmInvalidIdx ? p->info.frameCnt : procSmpCnt;
120 120
   p->outV           = cmMemResizeZ( cmSample_t, p->outV, p->outN );  
121 121
   p->fn             = cmMemResizeZ( cmChar_t,   p->fn,   strlen(fn)+1 );
122 122
   strcpy(p->fn,fn);  

Loading…
取消
儲存