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