on-internet
← Community

Android record and playback

Stack Overflow ·

I am currently trying to build an amplifier for the Android. The goal is to record and playback what is being recorded simultaneously. I created a thread that would take care of this. However, the sound comes out choppy. Here is what I tried. private class RecordAndPlay extends Thread{ int bufferSize; AudioRecord aRecord; short[] buffer; public RecordAndPlay() { bufferSize = AudioRecord.getMinBufferSize(22050, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT); buffer = new short[bufferSize]; } @Override public void run() { aRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, 220

Comments

Sign in or sign up to comment and upvote.

No comments yet.