android-audiorecord

Automatic Gain Control(AGC) for external mic

余生长醉 提交于 2019-12-25 07:09:04
问题 I have an audio recording app on android market which records using PCM-WAV format. My app also offers custom gain control ([-20dB, +20dB]) , so I alter the original audio data with user selected gain value. It works pretty well when using device built-in mic, but I have a user which uses some external mic plugged into his device, and the output is too loud and full of distortions (because of the loudness of his ext mic). Even when he set the gain to -20dB, the output is loud and contains

Android - AudioRecord splitting of 2 channels in channel_in_stereo

放肆的年华 提交于 2019-12-25 03:50:39
问题 I came across this link but I am not sure how to implement it split two channels of AudioRecord of CHANNEL_IN_STEREO I want to separate the data received in the left and right channel Below is my code for(int i = 0; i < read/2; i = i + 2) { leftChannelAudioData[i] = data[2*i]; leftChannelAudioData[i+1] = data[2*i+1]; rightChannelAudioData[i] = data[2*i+2]; rightChannelAudioData[i+1] = data[2*i+3]; } Full source can be found here: http://pastebin.com/ntm1mHG0 I have tried from line 298 to line

Using AudioRecord with 8-bit encoding in android

烈酒焚心 提交于 2019-12-25 02:38:52
问题 I have made an application that records from the phones microphone using the AudioRecord and 16-bit encoding, and I am able to playback the recording. For some compatibility reason I need to use 8-bit encoding, but when I try to run the same program using that encoding I keep getting an Invalid Audio Format. my code is : int bufferSize = AudioRecord.getMinBufferSize(11025, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT); AudioRecord recordInstance = new AudioRecord(

Android audio recording issue with MediaRecorder OutputFormat AAC_ADTS

穿精又带淫゛_ 提交于 2019-12-24 19:28:58
问题 I am trying to record an audio from my android app. Everything worked well. Recently, I had to change the output format from MPEG4 to AAC_ADTS. The issue is that AAC_ADTS does not work for one of the device It works on the other device. So, my question is does AAC_ADTS format work only on certain android versions. How can I get the audio recorded in AAC_ADTS format from all devices? Kindly help mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder

Android make my app files only play from inside the app

為{幸葍}努か 提交于 2019-12-24 11:07:40
问题 I created an app in which the client can record few conversations and store in external storage. The client must be able to transfer the files if needed. So I am storing the recorded files in external storage. But client don't want the files to be played from outside the app, (from sd card) or from music player. Is it possible? Please let me know. Is using internal storage is the only way to do it? 回答1: well this is not a programming question, but ... you have 2 options here, decide based on

Android, NDK, Audio routing, forcing audio through the headset

丶灬走出姿态 提交于 2019-12-23 03:41:26
问题 Use-case Record Android Headset audio Environment Samsung Galaxy 5 Android 5.0 Windows Desktop OS w/ a USB audio capture device Implementation Hook the Android device headset output to the Windows OS Line-In input Record whatever is sent out from the Android Device Problem statement If plugging in the Audio jack while audio is playing on the Android device the device audio output is routed through the headset jack and recording works properly Once audio playback ( for eg. a song ) has stopped

Android app to record sound in real time and identify frequency

ぐ巨炮叔叔 提交于 2019-12-21 20:51:42
问题 I need to develop an app to record frequencies in real time using the phone's mic and then display them (in text). I am posting my code here. The FFT and complex classes have been used from http://introcs.cs.princeton.edu/java/97data/FFT.java.html and http://introcs.cs.princeton.edu/java/97data/Complex.java.html .The problem is when i run this on the emulator the frequency starts from some random value and keeps on increasing till 7996. It then repeats the whole process. Can someone plz help

Unexpected status line: ICY 200 OK for URL openStream() method?

白昼怎懂夜的黑 提交于 2019-12-21 12:29:40
问题 According to changes for kitakt 4.4 there were some problems with playing shoutcast streams (those returning "ICY" instead of "HTTP/1.x" response). So solution for kitkat was to reregister "icy" protocol prefix in JVM once before we opened a stream by this: try { java.net.URL.setURLStreamHandlerFactory( new java.net.URLStreamHandlerFactory(){ public java.net.URLStreamHandler createURLStreamHandler( String protocol ) { Log.d( LOG, "Asking for stream handler for protocol: '" + protocol + "'" );

Android AudioRecord which settings to record call

℡╲_俬逩灬. 提交于 2019-12-18 13:15:36
问题 I use AudioRecord class to record the voice during a call. I am intererested to record only the voice of the person who owns the phone ( from the microphone). During the recording I would like to do some audio processing but this is offtopic for now. Android has the following AudioSources options: MediaRecorder.AudioSource.VOICE_CALL MediaRecorder.AudioSource.MIC MediaRecorder.AudioSource.VOICE_UPLINK MediaRecorder.AudioSource.VOICE_DOWNLINK Can you explain what is the differences among them.

Android AudioRecord Supported Sampling Rates

▼魔方 西西 提交于 2019-12-17 07:09:17
问题 I'm trying to figure out what sampling rates are supported for phones running Android 2.2 and greater. We'd like to sample at a rate lower than 44.1kHz and not have to resample. I know that all phones support 44100Hz but was wondering if there's a table out there that shows what sampling rates are valid for specific phones. I've seen Android's documentation ( http://developer.android.com/reference/android/media/AudioRecord.html) but it doesn't help much. Has anyone found a list of these