feat: add single-call action protocol and Android stage interfaces
This commit is contained in:
@@ -31,7 +31,12 @@ fun main() {
|
||||
val errors = CopyOnWriteArrayList<Exception>()
|
||||
capture.start(onFrame = frames::add, onError = errors::add)
|
||||
check(AudioRecord.partialReady.await(2, TimeUnit.SECONDS))
|
||||
capture.stop()
|
||||
val confirmed = CountDownLatch(1)
|
||||
capture.stopAndConfirm { stopped ->
|
||||
check(stopped && AudioRecord.activeDevices.get()==0)
|
||||
confirmed.countDown()
|
||||
}
|
||||
check(confirmed.await(2, TimeUnit.SECONDS))
|
||||
check(AudioRecord.released.await(2, TimeUnit.SECONDS))
|
||||
check(errors.isEmpty())
|
||||
check(frames.size == expectedCount) // 100B unfinished tail must not be sent
|
||||
|
||||
Reference in New Issue
Block a user