FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

OboeTester: Add chirp and multi Data Paths tests by robertwu1 · Pull Request #2326 · google/oboe · GitHub

/ oboe Public

OboeTester: Add chirp and multi Data Paths tests - #2326

Merged
robertwu1 merged 3 commits into
mainfrom
robertwu/addchirpandmultitodatapaths
Dec 30, 2025
Merged

robertwu1 merged 3 commits into
mainfrom
robertwu/addchirpandmultitodatapaths

Conversation

Copy link
Copy Markdown
Collaborator

This PR enhances the Data Path test in OboeTester by adding two new analysis signals: a swept-sine (chirp) and a multi-tone signal. This provides a more comprehensive and robust way to test the audio data path, especially for input presets where OEMs might apply audio processing.

Problem

The existing sine wave test is not always sufficient. For some processed input presets (e.g., Camcorder), OEMs can apply effects like noise reduction that might filter out a simple, steady sine wave. This can lead to test failures that don't accurately reflect the device's ability to record real-world audio like music.

Solution

This PR introduces two new test signals that are more representative of complex audio and less likely to be misinterpreted as noise by audio processing algorithms:

  • Swept-sine (Chirp): Tests the device's frequency response over a wide range of frequencies.
  • Multi-tone: Tests for distortion and other non-linear effects by playing multiple frequencies at once.

Key Changes

  • UI: Added a new UI element in the Data Path test to allow selecting the desired test signal (Sine, Chirp, or Multi-tone).
  • Signal Generation: Implemented the generation of the chirp and multi-tone signals in the native code.
  • FFT-based Analysis: Implemented a new analysis path based on FFT to analyze the recorded chirp and multi-tone signals.
    • For multi-tone, the analysis calculates the Signal-to-Noise and Distortion Ratio (SINAD).
    • For chirp, the analysis computes a spectrogram and verifies that the frequency sweep is recorded correctly.
  • Pass/Fail Criteria: Added pass/fail criteria for the new analysis modes to allow for automated testing.
  • Code Quality: Refactored the new code to improve readability, maintainability, and remove magic numbers.

robertwu1 requested a review from flamme October 31, 2025 02:47
if (maxFreq > nyquist) {
maxFreq = nyquist;
}
double freq = kChirpStartFrequency + (maxFreq - kChirpStartFrequency) * mFrameCounter / (getSampleRate() * kChirpDurationSeconds);

flamme Nov 7, 2025 •
edited
Loading

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Q: This looks like will go out of the range of nyquist freq when framecounter is greater than two times of kChirpDurantionSeconds * sampleRate.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Leaving as is because the increment code should not let this happen as it's caught by the while loop. If this happens, then we have a bug with our test code

robertwu1 merged commit 38e8d0c into main Dec 30, 2025
3 checks passed
robertwu1 deleted the robertwu/addchirpandmultitodatapaths branch December 30, 2025 00:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL