Conversation
|
After discussion with Ross, the plan is to:
|
Just expect monotonic increases, and not much higher latency than suggested. Fixes #742
deb402c to
fbecb61
Compare
I added that test. But we are seeing failures where the latency hits the maximum and then keeps going up! also |
|
NEXT STEP: confirm that rounding error is the problem. investigate source of rounding error. consider revising the spec I think that the test is valid with respect to the current spec. I think the failing tests reflect a bug in the code in the sense that the test results indicate a violation of the current spec for Lines 570 to 580 in 5d01510 I suspect the issue is that there is rounding down when the spec says to always round up. This could easily be a bug in PA/CoreAudio. It would be good to know whether the test also fails with other host APIs. We are undecided whether rounding down within some epsilon should be in specification . It would be user friendly to allow for +/- half (or 1/4 or 0.1) sample period of slop to allow for incorrect rounding in floating point calculations. I definitely think that the actual latency should be reported as accurately as possible, so the code should not "pretend" to have honoured the suggested latency when it actually rounded down, even a little bit. |
|
Suggestions for improving the test:
|
|
Print the delta value between final and suggested latency with scientific notation. |
RossBencina
left a comment
There was a problem hiding this comment.
Phil and I agreed to merge this as a failing test once the following two improvements are made:
- Print in seconds (next to sample rate) 1/sampleRate
- Print suggested, final delta
It was failing because the latency was too low.
Now we allow lower latency.
Fixes #742