feat: add single-call action protocol and Android stage interfaces
This commit is contained in:
@@ -5,9 +5,11 @@ import com.gorios.lanvoice.net.DownlinkFrame
|
||||
enum class AecAvailability { AVAILABLE, UNAVAILABLE, UNKNOWN }
|
||||
// No audio devices in callback propagation tests.
|
||||
class AudioCapture {
|
||||
companion object { var lastFrame: ((ByteArray) -> Unit)? = null; var lastError: ((Exception) -> Unit)? = null; var starts = 0 }
|
||||
companion object { var lastFrame: ((ByteArray) -> Unit)? = null; var lastError: ((Exception) -> Unit)? = null; var starts = 0
|
||||
var confirmStopsAutomatically = true; var lastStopped: ((Boolean)->Unit)? = null }
|
||||
fun aecAvailability() = AecAvailability.UNKNOWN
|
||||
fun start(onFrame: (ByteArray) -> Unit, onError: (Exception) -> Unit, onDiagnostic: (String) -> Unit = {}) { starts++; lastFrame = onFrame; lastError = onError; onDiagnostic("AudioRecord initialization ok") }
|
||||
fun stopAndConfirm(confirmed: (Boolean) -> Unit) { lastStopped = confirmed; if(confirmStopsAutomatically) confirmed(true) }
|
||||
fun stop() {}
|
||||
fun release() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user