Browse Source

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

cmAudioFileRdOpen()
master
kevin 10 years ago
parent
commit
76a8e5cd2a
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      cmProc.c

+ 1
- 1
cmProc.c View File

@@ -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…
Cancel
Save