Unified · Split
| @@ -286,8 +286,8 @@ static ftype fn(compute_ptp)(ftype *peak, ftype sample, ftype wsample, · 285 unmodified lines | ||
| 286 | 286 | |
| 287 | 287 | peak[back] = sample; |
| 288 | 288 | max = peak[front]; |
| 289 | − min = (back == front) ? -sample : sample; | |
| 290 | − r = FABS(max - min); | |
| 289 | + min = sample; | |
| 290 | + r = FABS(min) + FABS(max - min); | |
| 291 | 291 | |
| 292 | 292 | *ffront = front; |
| 293 | 293 | *bback = back; |