|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hermit.android.io.AudioReader
public class AudioReader
A class which reads audio input from the mic in a background thread and passes it to the caller when ready.
To use this class, your application must have permission RECORD_AUDIO.
Nested Class Summary | |
---|---|
static class |
AudioReader.Listener
Listener for audio reads. |
Constructor Summary | |
---|---|
AudioReader()
Create an AudioReader instance. |
Method Summary | |
---|---|
void |
startReader(int rate,
int block,
AudioReader.Listener listener)
Start this reader. |
void |
stopReader()
Start this reader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AudioReader()
Method Detail |
---|
public void startReader(int rate, int block, AudioReader.Listener listener)
rate
- The audio sampling rate, in samples / sec.block
- Number of samples of input to read at a time.
This is different from the system audio
buffer size.listener
- Listener to be notified on each completed read.public void stopReader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |