Immediate Audio Input & Output Android-ThrowExceptions

Exception or error: In my Android App, I would like to take in some audio from the mic of the smartphone and play it immediately, live, like a microphone, with no lag. I am currently thinking of using AudioRecord and AudioTrack classes (from what I have read), but I’m not quite sure how to proceed. …

Streaming AAC audio with Android-ThrowExceptions

Exception or error: As I understand it, Android will only play AAC format audio if it’s encoded as MPEG-4 or 3GPP. I’m able to play AAC audio encoded as M4A when it’s local to the app, but it fails when obtaining it from a server. The following works, as the m4a file is held locally …

java – Low latency audio api for Android?-ThrowExceptions

Exception or error: What are my options for playing simultaneous audio on an Android device with the least amount of latency? Am I going to get anything half decent out of the canned SDK, or is that asking too much? The documentation claims that the SoundPool class is capable of playing multiple sounds simultaneously with …

android – stream volume in SoundPool vs volume in AudioManager-ThrowExceptions

Exception or error: I am so confused… SoundPool.play(int soundID, float leftVolume, float rightVolume, int priority, int loop, float rate) volume here is from 0.0 to 1.0 Tutorials I’ve seen recommend to calculate stream volume as: AudioManager mgr = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); int streamVolume = mgr.getStreamVolume(AudioManager.STREAM_MUSIC); streamVolume = streamVolume / AudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); mSoundPool.play(mSoundPoolMap.get(index), streamVolume, streamVolume, 1, 0, 1f); …