Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/morlunk/jumble/audio/inputmode/IInputMode.java')
-rw-r--r--src/main/java/com/morlunk/jumble/audio/inputmode/IInputMode.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/com/morlunk/jumble/audio/inputmode/IInputMode.java b/src/main/java/com/morlunk/jumble/audio/inputmode/IInputMode.java
index 4244afc..c7eed42 100644
--- a/src/main/java/com/morlunk/jumble/audio/inputmode/IInputMode.java
+++ b/src/main/java/com/morlunk/jumble/audio/inputmode/IInputMode.java
@@ -17,6 +17,8 @@
package com.morlunk.jumble.audio.inputmode;
+import java.util.concurrent.locks.Condition;
+
/**
* A talk state engine, providing information regarding when it is appropriate to send audio.
* Created by andrew on 13/02/16.
@@ -29,4 +31,13 @@ public interface IInputMode {
* @return true if the input should be transmitted.
*/
boolean shouldTransmit(short[] pcm, int length);
+
+ /**
+ * Called before any audio processing to wait for a change in input availability.
+ * For example, a push to talk implementation will block the audio input thread until the
+ * button has been activated. Other implementations may do nothing.
+ *
+ * This function should return immediately when shouldTransmit is returning true.
+ */
+ void waitForInput();
}