google / google/oboe

setFramesPerDataCallback() leads to glitching with moderate workloads

Open
#1,116 1 comment 0 reactions 1 assignee Assigned to @robertwu1 View on GitHub
bug P1
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.