Use nonblocking AudioRecord reads with data and timestamp deadlines. Serialize idempotent close, finish interrupted joins before release, isolate callback failures, and abort stereo fallback when partial-record cleanup fails. Close failed shared readers to new subscriptions, roll back worker startup, isolate observers, preserve interrupt state, and release the last consumer exactly once. Add an independent capture-tests JVM module to the standard Android unit-test task. Validation: 38 capture scenarios (25 AudioRecord plus 13 PCM/PTT), 455 JVM tests, assembleDebug, core build, and full check.sh (225 tests plus proxy/burst/load) passed.
15 lines
610 B
Kotlin
15 lines
610 B
Kotlin
plugins { id("org.jetbrains.kotlin.jvm") }
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
sourceSets.named("main") {
|
|
// Настоящие reader/очереди, независимый от router-tests Android API без аппаратных ресурсов.
|
|
kotlin.srcDir("../app/src/main/java")
|
|
kotlin.include("android/**", "com/utun/chat/data/AndroidMicrophoneCapture.kt",
|
|
"com/utun/chat/data/MicrophoneCapture.kt", "com/utun/chat/data/CaptureHostLog.kt")
|
|
}
|
|
}
|
|
|
|
dependencies { testImplementation("junit:junit:4.13.2") }
|
|
tasks.test { testLogging { showStandardStreams = true } }
|