audiorecord
Android: Need to record mic input
To record and play back audio in (almost) real time you can start a separate thread and use an AudioRecord and an AudioTrack. Just be careful with feedback. If the speakers are turned up loud enough on your device, the feedback can get pretty nasty pretty fast. /* * Thread to manage live recording/playback of … Read more
Android AudioRecord example [closed]
Here I am posting you the some code example which record good quality of sound using AudioRecord API. Note: If you use in emulator the sound quality will not much good because we are using sample rate 8k which only supports in emulator. In device use sample rate to 44.1k for better quality. public class … Read more
Android AudioRecord class – process live mic audio quickly, set up callback function
After experimenting lots with the notifications and a bunch of other techniques I settled on this code: private class AudioIn extends Thread { private boolean stopped = false; private AudioIn() { start(); } @Override public void run() { android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO); AudioRecord recorder = null; short[][] buffers = new short[256][160]; int ix = 0; try { // … Read more
Android AudioRecord vs. MediaRecorder for recording audio
If you want to do your analysis while recording is still in progress, you need to use AudioRecord, as MediaRecorder automatically records into a file. AudioRecord has the disadvantage, that after calling startRecording() you need to poll the data yourself from the AudioRecord instance. Also, you must read and process the data fast enough such … Read more