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

cmAudioFileRdOpen()
This commit is contained in:
kevin 2014-04-23 14:43:54 -07:00
parent 4712a0ccb2
commit 76a8e5cd2a

View File

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