Skip to content

Commit

Permalink
Simple record audio native code
Browse files Browse the repository at this point in the history
  • Loading branch information
crossle authored and DearZhai committed Jun 8, 2018
1 parent 4864ae0 commit 5e4b754
Show file tree
Hide file tree
Showing 20 changed files with 4,627 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -5,3 +5,5 @@
/build
/captures
google-services.json

.externalNativeBuild
7 changes: 7 additions & 0 deletions app/build.gradle
Expand Up @@ -44,6 +44,13 @@ android {
targetCompatibility 1.8
sourceCompatibility 1.8
}

externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
}
}

productFlavors {
}

Expand Down
26 changes: 26 additions & 0 deletions app/src/main/cpp/CMakeLists.txt
@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.4.1)

set(distribution_DIR ${CMAKE_SOURCE_DIR}/opus)

add_library(lib_opus STATIC IMPORTED)
set_target_properties(lib_opus PROPERTIES IMPORTED_LOCATION
${distribution_DIR}/lib/${ANDROID_ABI}/libopus.a)

add_library(lib_ogg STATIC IMPORTED)
set_target_properties(lib_ogg PROPERTIES IMPORTED_LOCATION
${distribution_DIR}/lib/${ANDROID_ABI}/libogg.a)


add_library(mixin SHARED
audio.c
)

target_include_directories(mixin PRIVATE
${distribution_DIR}/include)

target_link_libraries(mixin
android
lib_opus
lib_ogg

log)

0 comments on commit 5e4b754

Please sign in to comment.