Validate Android input routes and isolate capture queue diagnostics
This commit is contained in:
1 parent
9d69cce8e8
commit
051d453c2d
3 files changed
+38
-16
No files matched your search
@@ -22,7 +22,7 @@ class MicrophoneCaptureTest {
|
||||
}
|
||||
|
||||
@Test fun consumersShareCaptureFormatAndTimeButOwnTheirSamples() {
|
||||
val device = Device(); val capture = MicrophoneCapture(device, {})
|
||||
val device = Device(); val capture = MicrophoneCapture(device, { _, _ -> })
|
||||
val stream = capture.subscribe("stream"); val radio = capture.subscribe("radio")
|
||||
try {
|
||||
device.input.add(MicrophoneCapture.Frame(shortArrayOf(10, 20), 987654321, 960))
|
||||
@@ -38,7 +38,7 @@ class MicrophoneCaptureTest {
|
||||
}
|
||||
|
||||
@Test fun stoppingRadioKeepsStreamAndPttIsOrderedWithPcm() {
|
||||
val device = Device(); val capture = MicrophoneCapture(device, {})
|
||||
val device = Device(); val capture = MicrophoneCapture(device, { _, _ -> })
|
||||
val stream = capture.subscribe("stream"); val radio = capture.subscribe("radio")
|
||||
try {
|
||||
assertTrue(radio.ptt(true))
|
||||
@@ -53,7 +53,8 @@ class MicrophoneCaptureTest {
|
||||
}
|
||||
|
||||
@Test fun slowConsumerHasBoundedQueueAndReservedControlCapacity() {
|
||||
val device = Device(); val logs = LinkedBlockingQueue<String>(); val capture = MicrophoneCapture(device, { logs.add(it) })
|
||||
val device = Device(); val logs = LinkedBlockingQueue<String>()
|
||||
val capture = MicrophoneCapture(device, { _, message -> logs.add(message) })
|
||||
val stream = capture.subscribe("stream"); val radio = capture.subscribe("radio")
|
||||
try {
|
||||
repeat(40) {
|
||||
|
||||
Reference in new issue
Block a user