mozilla / cubeb

Cross platform audio library
ISC License
434 stars 123 forks source link

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

Closed padenot closed 11 months ago

padenot commented 11 months ago

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):

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.