Code example for AudioRecord

Methods: getStatereleasestop

0
 
  public void terminate() { 
    if( !singleThread ) {
        micThread.terminate();
    } 
    if (audioSource.getState() == AudioRecord.STATE_INITIALIZED) {
      audioSource.stop();
      audioSource.release();
    } 
  } 
 
  private class AudioChunk { 
    public long sequenceNumber;
    private short chunk[];
    public AudioChunk( short audio[], long seqNum ) {
      chunk = audio;
      sequenceNumber = seqNum;
    } 
 
    public short[] getChunk() { 
      return chunk;