How in Android (for example 4.4), programmatically on java, to reproduce the sound from the microphone to the headphone? It is advisable not to use the AudioRecord entry, but to redirect the MIC stream to WiredHeadset . I suspect that AudioManager can, but how?
To check headphones:
if (audioManager.isWiredHeadsetOn()) { } microphone:
if (audioManager.isMicrophoneMute()) { audioManager.setMicrophoneMute(false); } But then how?
AudioRecord- try setting the minimum buffer size - Barmaley