Integrate Oboe v Gradle and CMake
These instructions room for projects penampilan oksavingmoney.com Gradle plugin version 4.1.0 or higherusing native dependencieswith CMake.
Anda sedang menonton: Aplikasi android termahal di google play
If your job is using either the oksavingmoney.com Gradle plugin variation 4.0 orndk-build rather of CMake, the process is contempt different. See using native dependencies.Note: indigenous dependencies have minimal version requirements for Gradle and the oksavingmoney.com Gradle plugin. If you have an existing project, you may need to upgrade the task Gradle variation to 6.5.0 or later and also the oksavingmoney.com Gradle plugin version to 4.1.0 or later. For more information top top updating these versions, see oksavingmoney.com Gradle plugin publikasi notes.
To include Oboe come your application while using oksavingmoney.com Gradle plugin variation 4.1.0 orhigher, make the following additions to your app's build.gradle file.
Enable the prefab option in the buildFeatures section.
oksavingmoney.com buildFeatures prefab true Configure your application to use the shared STL:
oksavingmoney.com defaultConfig externalNativeBuild cmake disagreements "-Doksavingmoney.com_STL=c++_shared"
Update CMakeLists.txtAdding Oboe requires two enhancements to her app's CMakeLists.txt file.
Add the following find_package command:
find_package (oboe compelled CONFIG)Add oboe::oboe to the perform of libraries passed to thetarget_link_libraries command connected with your main executable.
Integrate through the oksavingmoney.com game SDK
Make the following alters to your project's construct settings.Note: To use Oboe, you have to specify a minimum fire level the 16 and also NDK publikasi of 18 for the oksavingmoney.com game SDK libraries. If friend don't, Oboe can't be found at construct time.
When you integrate with the oksavingmoney.com game SDK, friend statically attach to a versionof the Oboe library compiled for the offered ABI, fire level, NDK, and also STLcombination:Add gamesdk/include to her compiler incorporate paths.
Add a path of the following membentuk in your linker library paths:
gamesdk/libs/architecture_APIapiLevel_NDKndkVersion_stlVersion_ReleaseFor example: gamesdk/libs/arm64-v8a_API24_NDK18_cpp_static_Release
Add -loboe_static to your linker command.
You don't need to bundle the liboboe.so mutual library, which method staticlinking offers you a lot smaller password footprint.
If the ABI, api level, NDK, and also STL combination required because that a revolution libraryisn't obtainable for her settings, you have the right to link versus the mutual libraryinstead:
Follow steps 1 and also 2 from the previous section (about the revolution library) toupdate your compiler encompass paths, and use the sesuai header file.
Add a route of the following form in your linker library paths:
Add -loboe -lOpenSLES to her linker command.
Using CMake (static library only)
If you're melihat CMake, check out the gamesdk/samples/bouncyball/app/CMakeLists.txtfile in the downloaded SDK for an example CMake configuration. It consists of autility paper called gamesdk/samples/gamesdk.cmake, which performs finalchecks, adds the appropriate compiler include paths, and generates a target that youcan usage to connect the library.
To usage the gamesdk.cmake utility:
Include this file in your CMakeLists.txt:
// usage a family member or pure path. Because that example, /home/yourusername/gamesdk// or C:oksavingmoney.comgamesdk.include("path/to/gamesdk/samples/gamesdk.cmake")Call the add_gamesdk_target function with the folder containingthe gamesdk:
// use a family member or absolute path.add_gamesdk_target(PACKAGE_DIR path/to/gamesdk)In her target_link_libraries for your native library, addoboe together a dependency:
// The casing the OpenSLES is important.target_link_libraries(native-lib oboe OpenSLES ...) For progressed usage the CMake, check out the gamesdk.cmakesource file.
Next steps: melihat Oboe
To permainan or record audio with Oboe, create and activate one or much more audiostreams, and also use callbacks to exchange audio between your audio input/outputdevices and your app. Check out UsingOboe.
Lihat lainnya: Memahami Fungsi Dan Bagian Sel Yang Menyimpan Informasi Genetik, Yaitu
Content and also code samples ~ above this halaman are topic to the licenses explained in the isi License. Java is a registered trademark the Oracle and/or that affiliates.
< "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the info I need" , "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too numerous steps" , "type": "thumb-down", "id": "outOfDate", "label":"Out that date" , "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" , "type": "thumb-down", "id": "otherDown", "label":"Other" > < "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" , "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" , "type": "thumb-up", "id": "otherUp", "label":"Other" >