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

Support f32 when using the OpenSLES backend and compiling against older Android SDK #758

Merged
merged 9 commits into from
Aug 25, 2023

Conversation

padenot
Copy link
Collaborator

@padenot padenot commented Aug 17, 2023

When the OpenSLES backend is in use, and the application using cubeb has been compiled against an old SDK (before level 21, Lollipop, from 2014), the facilities to configure an audio stream to use floating point PCM isn't available.

This is the case in Firefox for Android, when compiled for armv7 devices, the API level in use is 16.

This PR also includes numerous cleanups on this backend (but the functional change is in its own commit):

  • convert to C++
  • fix all clang-tidy reports (with Gecko's config, that I find sensible)
  • switch to using cubeb_log.h logging facilities
  • add logging statement in error paths, and add various other logging statements

It seems that, unfortunately, we won't be able to get away with always relying on AAudio, so that seemed worth doing.

This fixes BMO#1848518, but I'm going to send another PR for the input side.

@padenot padenot force-pushed the opensl-float-conversion branch 2 times, most recently from 16bdf05 to 1e46027 Compare August 22, 2023 19:49
Copy link
Member

@ChunMinChang ChunMinChang left a comment

Choose a reason for hiding this comment

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

Overall looks good. Thanks for catching and fixing this!

Just a couple of questions waiting to be answered, then we are good to land this

src/cubeb_opensl.cpp Show resolved Hide resolved
src/cubeb_opensl.cpp Outdated Show resolved Hide resolved
src/cubeb_opensl.cpp Show resolved Hide resolved
src/cubeb_opensl.cpp Show resolved Hide resolved
src/cubeb_opensl.cpp Show resolved Hide resolved
src/cubeb_opensl.cpp Outdated Show resolved Hide resolved
src/cubeb_opensl.cpp Show resolved Hide resolved
src/cubeb_opensl.cpp Show resolved Hide resolved
src/cubeb_opensl.cpp Show resolved Hide resolved
src/cubeb_opensl.cpp Show resolved Hide resolved
src/cubeb_opensl.cpp Outdated Show resolved Hide resolved
src/cubeb-coreaudio-rs Outdated Show resolved Hide resolved
@padenot padenot force-pushed the opensl-float-conversion branch 3 times, most recently from 0169acc to 6fcaea9 Compare August 25, 2023 14:33
Copy link
Member

@ChunMinChang ChunMinChang left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@padenot padenot merged commit 3f86a06 into master Aug 25, 2023
18 checks passed
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.

None yet

2 participants