Add bounded native playback diagnostics and sensor-free dance inspection
This commit is contained in:
@@ -4,6 +4,7 @@ import com.gorios.lanvoice.avatar.*
|
||||
import com.gorios.lanvoice.net.*
|
||||
|
||||
fun checkActionSession() {
|
||||
checkLocalPreviewCaptureFence()
|
||||
checkActionFollowupSession()
|
||||
val sha="a".repeat(64);val states=mutableListOf<VoiceUiState>()
|
||||
val prepared=mutableListOf<com.gorios.lanvoice.dialogue.ReplyEmotion?>()
|
||||
@@ -102,3 +103,21 @@ fun checkActionFollowupSession() {
|
||||
session.release();AudioPlayback.activityFence=null
|
||||
println("PASS: client normal action completion/new server speech turn accepted, future after emotion hidden, retired pre audio/emotion/drain rejected, independent after drain and duplicate completion fence; deterministic doubles only")
|
||||
}
|
||||
|
||||
fun checkLocalPreviewCaptureFence() {
|
||||
AudioCapture.confirmStopsAutomatically=false
|
||||
val s=VoiceSession("localhost",5011,{})
|
||||
val results=mutableListOf<Boolean>()
|
||||
s.suspendForLocalPreview(results::add);Handler.drain()
|
||||
check(results.isEmpty())
|
||||
AudioCapture.lastStopped!!(false);Handler.drain();check(results==listOf(false))
|
||||
AudioCapture.lastStopped!!(true);Handler.drain();check(results==listOf(false))
|
||||
s.suspendForLocalPreview(results::add);AudioCapture.lastStopped!!(true);Handler.drain()
|
||||
check(results==listOf(false,true))
|
||||
s.suspendForLocalPreview(results::add);s.foreground(connectAutomatically=false)
|
||||
AudioCapture.lastStopped!!(true);Handler.drain();check(results.last()==false)
|
||||
s.suspendForLocalPreview(results::add);val stale=AudioCapture.lastStopped!!;s.release()
|
||||
stale(true);Handler.drain();check(results.last()==false)
|
||||
AudioCapture.confirmStopsAutomatically=true
|
||||
println("PASS:6 production local-preview capture cleanup/unconfirmed/duplicate/foreground/release callback fences; AudioRecord double, device not_run")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user