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
Restrict OpenSLES to Android via CMake #10947
Conversation
d01aa8f
to
2b14ee6
Compare
|
This is not going to degrade correctly if there is an android build that doesn't find OpenSLES. Also, OpenSL ES is technically a cross-platform API. Do we really want to put it behind an Android gate? A Edit: Or alternatively, mark it as a required library for android. It's been in there since Android 2.3. Unless there is a chance of Android deprecating it at some point? |
|
Also, you remove |
|
The way the audio backends currently seem to work is that the header is always included, but if the backend isn't supported it would just produce this: class OpenSLESStream final : public SoundStream
{
};which combines with these default values: dolphin/Source/Core/AudioCommon/SoundStream.h Lines 11 to 25 in 3595c8b
so that We should either replace this with something else (preprocessor checks in AudioCommon.cpp for all backends), or leave the preprocessor checks in OpenSLESStream.h/cpp alone and just make the change in CMakeLists.txt (which should remove the false warning). (A |
|
I think there are two paths to take with this PR. Either we try to add cross-platform OpenSLES support or we restrict it to just android. Which one would people prefer? |
|
Given that it is OpenSL ES, I think it makes more sense to restrict it to just android, especially when cubeb works so well. |
OpenSLES code is only compiled on android, but instead of checking via CMake we search for OpenSLES on all platforms, and then compile that code if we find it. Just in case a non-android build finds OpenSLES, both of the files are wrapped in #ifdefs. Instead, this PR will only search for and compile the files on Android, thus not generating a false warning that OpenSLES was not found on regular builds.