public class SoniTalkDecoder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
SoniTalkDecoder.MessageListener
Interface defining the callbacks to implement in order to receive messages from a SoniTalk Decoder.
|
static interface |
SoniTalkDecoder.SpectrumListener
Interface defining the callbacks to implement in order to receive the spectrum of received messages.
|
Modifier and Type | Method and Description |
---|---|
void |
addMessageListener(SoniTalkDecoder.MessageListener listener) |
void |
addSpectrumListener(SoniTalkDecoder.SpectrumListener listener) |
void |
pause()
Pauses the current capturing/decoding process without cancelling the potential timers.
|
void |
receiveBackground(int requestCode)
Captures audio and tries detecting/decoding messages.
|
void |
receiveBackground(long delayMilliseconds,
int requestCode)
Captures audio and tries decoding for delayMilliseconds ms.
|
boolean |
removeMessageListener(SoniTalkDecoder.MessageListener listener) |
boolean |
removeSpectrumListener(SoniTalkDecoder.SpectrumListener listener) |
void |
resume()
Resumes audio capturing and detecting/decoding messages.
|
boolean |
returnsRawAudio()
Returns true if detected messages will be returned with the original audio.
|
void |
setReturnRawAudio(boolean returnRawAudio)
Decides if detected messages will be returned with the original audio or not.
|
void |
stopReceiving()
Stops the capturing and decoding process.
|
public void receiveBackground(long delayMilliseconds, int requestCode) throws DecoderStateException
delayMilliseconds
- Duration you want to try and receive a message before cancelling.DecoderStateException
public void receiveBackground(int requestCode) throws DecoderStateException
DecoderStateException
public void stopReceiving()
public void pause()
public void resume() throws DecoderStateException
DecoderStateException
public void addMessageListener(SoniTalkDecoder.MessageListener listener)
public boolean removeMessageListener(SoniTalkDecoder.MessageListener listener)
public void addSpectrumListener(SoniTalkDecoder.SpectrumListener listener)
public boolean removeSpectrumListener(SoniTalkDecoder.SpectrumListener listener)
public boolean returnsRawAudio()
public void setReturnRawAudio(boolean returnRawAudio)
returnRawAudio
-