Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSL ES AudioStream.getBufferSizeInFrames() returns 0 when callback not used #1581

Closed
robertwu1 opened this issue Aug 1, 2022 · 1 comment · Fixed by #1582
Closed

OpenSL ES AudioStream.getBufferSizeInFrames() returns 0 when callback not used #1581

robertwu1 opened this issue Aug 1, 2022 · 1 comment · Fixed by #1582
Assignees
Labels
bug P1 high priority
Milestone

Comments

@robertwu1
Copy link
Collaborator

Android version(s): ALL
Android device(s): ALL
Oboe version: Latest
App name used for testing: UnitTestRunner

Below is a very basic test that fails on all devices on all Android versions:

TEST_F(StreamOpenOutput, OutputForOpenSLESPerformanceModeNoneGetBufferSizeInFrames){
    mBuilder.setPerformanceMode(PerformanceMode::None);
    mBuilder.setAudioApi(AudioApi::OpenSLES);
    ASSERT_TRUE(openStream());
    EXPECT_GT(mStream->getBufferSizeInFrames(), 0);
    ASSERT_TRUE(closeStream());
}

When callbacks are not used, getBufferSizeInFrames() returns 0. This in return causes writing to the stream to never actually write.

@robertwu1 robertwu1 added bug P1 high priority labels Aug 1, 2022
@robertwu1
Copy link
Collaborator Author

This is an extension of #285 as #287 only fixes the callback case and not the non-callback case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P1 high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant