protected void startRec() { if (_mic != null && _mic.getState() == AudioRecord.STATE_INITIALIZED) { Log.debug(this.getClass().getSimpleName() + ".startRec(): starting mic"); _mic.startRecording(); resetTimestampRecStart(); _countFrames = 0; Log.debug( this.getClass().getSimpleName() + ".startRec(): state=" + _mic.getState() + ", recordingState=" + _mic.getRecordingState()); if (_me == null) { _me = new Thread(this, "mic"); // _me.setPriority(Thread.NORM_PRIORITY); _me.start(); Log.debug(this.getClass().getSimpleName() + ".startRec(): micThread started "); } } else { Log.error(this.getClass().getSimpleName() + ".startRec(): Failed to initialise microphone."); } }