When I use Androids AudioRecord to record from the microphone, I get this annoying artifact
Is there a way to avoid or remove this? What is it? Or do I get that because I did something wrong in the configuration (but everything else works fine).
Here is my AudioRecord configuration:
sampleRateInHz = 44100;
channelConfigRec = AudioFormat.CHANNEL_IN_MONO;
audioFormat = AudioFormat.ENCODING_PCM_16BIT;
bufferSizeInBytesRec = AudioRecord.getMinBufferSize(sampleRateInHz, channelConfigRec, audioFormat);
audioSource = AudioSource.MIC;
I am pretty sure that my code is right, because I can record everything fine, but there is this click at the beginning.