-
Notifications
You must be signed in to change notification settings - Fork 573
OboeTester_DynamicCpuLoad
Audio use cases often have changing CPU workloads. An example is a music synthesizer that may be playing 0, 1 or dozens of notes at any given time! The CPU workload is proportional to the number of notes. When more notes are playing, the CPU frequency and voltage may be increased to handle the extra load. When fewer notes are playing, the CPU frequency and voltage may be decreased to save power improve battery life.
The increase in CPU frequency can sometimes take a long time, 100 msec. During this time the audio may be glitching.
OboeTester has a test called "CPU Load" that plays a tone with a workload that alternates between low and high levels. You can hear if the audio glitches. You can also see the measured CPU utilization.
- Build OboeTester from GitHub
- Launch OboeTester
- Tap "Extras..."
- Tap "CPU LOAD"
- Tap "START"
Select the CPU affinity using the checkboxes.
Change the "high" workload using the "Workload" slider. The units are the number of analog synthesizer voices being calculated. The synth voice architecture was copied from SynthMark.
Check the ADPF box to enable the Android Dynamic Performance Framework. This can be enabled in Oboe apps using stream->setPerformanceHintEnabled().
The "cores" display shows which CPU cores were recently used to run the audio workload.
- Apps Using Oboe or AAudio
- Tech Notes
- OboeTester Instructions
- Quirks and Bugs
- Developer Notes