setFramesPerDataCallback() leads to glitching with moderate workloads
- Dominant language
- C++
- Stars
- 4.1k
- Forks
- 639
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 8
Description
Android version(s): RQ1A
Android device(s): Pixel 3a XL
Oboe version: 1.5.0
App name used for testing: OboeTester
**Short description**
If setFramesPerDataCallback() is set to a value higher than the burst size then the stream is more likely to glitch with moderate workloads.
**Steps to reproduce**
1. Launch OboeTester
1. Check "enable Oboe workarounds". (try both ways)
1. Enter 256 for the callback size.
1. Tap TEST OUTPUT.
1. Tap OPEN
1. Tap START
1. Note framesPerBurst is probably 96.
1. Increase Workload slider until you hear glitching.
**Expected behavior**
CPU load should be around 70-90%
No glitches.
**Actual behavior**
CPU load is around 40%
Occasional glitches.
If I increase bufferSize to 288 then it stops glitching and I can go to a higher Workload.
RECOMMENDATION: Do not setBufferSize() lower than the framesPerDataCallback().
We can clip this in Oboe and also in AAudio.
Contributor guide
Assessment
This issue has not been assessed yet.