Add the Android app: Gradle build, Oboe audio, connection screen
android/ builds core and ts3j from the same sources as the desktop's Maven build, so the app shares all of the client's logic: - audio: Oboe streams behind AudioCapture/AudioPlayback, with a lock-free ring between the real-time callback and the blocking Java side, and libopus 1.5.2 built with the NDK behind OpusCodec. Speakers are mixed onto one stream. Capture uses the VoiceRecognition preset, leaving noise suppression and gain to the client's own processing. - app: a plain connection screen to try the port out - connect, microphone, mute, deafen, channel chat and a log - until the real UI. Targets Android 13 and up (minSdk 33) on arm64 and x86_64. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
22
android/audio/src/main/cpp/CMakeLists.txt
Normal file
22
android/audio/src/main/cpp/CMakeLists.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
project(ts3audio LANGUAGES C CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
find_package(oboe REQUIRED CONFIG)
|
||||
|
||||
# libopus from its release tarball, built static into our one library.
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(opus
|
||||
URL https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz
|
||||
URL_HASH SHA256=65c1d2f78b9f2fb20082c38cbe47c951ad5839345876e46941612ee87f9a7ce1)
|
||||
set(OPUS_BUILD_PROGRAMS OFF CACHE BOOL "" FORCE)
|
||||
set(OPUS_BUILD_TESTING OFF CACHE BOOL "" FORCE)
|
||||
set(OPUS_BUILD_SHARED_LIBRARY OFF CACHE BOOL "" FORCE)
|
||||
set(OPUS_INSTALL_PKG_CONFIG_MODULE OFF CACHE BOOL "" FORCE)
|
||||
set(OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF CACHE BOOL "" FORCE)
|
||||
FetchContent_MakeAvailable(opus)
|
||||
|
||||
add_library(ts3audio SHARED audio_line.cpp opus_jni.cpp)
|
||||
target_link_libraries(ts3audio PRIVATE oboe::oboe opus log)
|
||||
target_compile_options(ts3audio PRIVATE -Wall -Wextra)
|
||||
Reference in New Issue
Block a user