Changeset 3085 for pjproject/trunk/third_party/resample/src/resamplesubs.c
- Timestamp:
- Feb 1, 2010 11:23:54 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/third_party/resample/src/resamplesubs.c
r1969 r3085 119 119 120 120 Ystart = Y; 121 Yend = Ystart + (unsigned)(nx * pFactor );121 Yend = Ystart + (unsigned)(nx * pFactor + 0.5); 122 122 endTime = time + (1<<Np)*(RES_WORD)nx; 123 while (time < endTime) 123 124 // Integer round down in dtb calculation may cause (endTime % dtb > 0), 125 // so it may cause resample write pass the output buffer (Y >= Yend). 126 // while (time < endTime) 127 while (Y < Yend) 124 128 { 125 129 iconst = (time) & Pmask; … … 258 262 259 263 Ystart = Y; 260 Yend = Ystart + (unsigned)(nx * pFactor );264 Yend = Ystart + (unsigned)(nx * pFactor + 0.5); 261 265 endTime = time + (1<<Np)*(RES_WORD)nx; 262 266 … … 306 310 307 311 Ystart = Y; 308 Yend = Ystart + (unsigned)(nx * pFactor );312 Yend = Ystart + (unsigned)(nx * pFactor + 0.5); 309 313 endTime = time + (1<<Np)*(RES_WORD)nx; 310 314
Note: See TracChangeset
for help on using the changeset viewer.