Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Route voice buffer from mic to speaker in Android

I need to increase voice, recorder from microphone on Android device. I try to read buffer from AudioRecord and then write it to AudioTrack... It works, but with delay, because min buffer size, returned bu method AudioRecord.getMinBufferSize with frequency like 44100 is 4480 bytes.

Any ideas?
Thanks.

like image 994
Viktor Medvedev Avatar asked Nov 29 '25 03:11

Viktor Medvedev


1 Answers

I have this code

AudioRecord and AudioTrack latency

But it happens to that there is a 20ms delay, and I need to solve it, The code above seems that plays something but there is no mic input, does it work?

Thanks!

like image 74
Jordi Puigdellívol Avatar answered Nov 30 '25 15:11

Jordi Puigdellívol