Ignore:
Timestamp:
May 28, 2008 5:26:30 PM (16 years ago)
Author:
nanang
Message:

Reapplied changeset 287 (resample may write pass the output buffer), with a bit optimization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/third_party/resample/src/resamplesubs.c

    r1232 r1968  
    260260    Yend = Ystart + (unsigned)(nx * pFactor); 
    261261    endTime = time + (1<<Np)*(RES_WORD)nx; 
    262     while (time < endTime) 
     262 
     263    // Integer round down in dtb calculation may cause (endTime % dtb > 0),  
     264    // so it may cause resample write pass the output buffer (Y >= Yend). 
     265    // while (time < endTime) 
     266    while (Y < Yend) 
    263267    { 
    264268        xp = &X[time>>Np];      /* Ptr to current input sample */ 
Note: See TracChangeset for help on using the changeset viewer.