inbuffsize = android.media.AudioRecord.getMinBufferSize (8000, AudioFormat.CHANNEL_IN_MONO,
AudioFormat.ENCODING_PCM_16BIT);
audioRecord = new AudioRecord (MediaRecorder.AudioSource.MIC, 8000,
AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT,
inbuffsize);
Initialization always unsuccessful, the sampling frequency from 8000 to 44100 are tried, too. +100 again behind inbuffsize too. Error
03-23 09:04:47.023: E / AudioRecord (13968): AudioFlinger could not create record track, status: -103-23 09:04:47.023: E / AudioRecord-JNI (13968): Error creating AudioRecord instance: initialization check failed.03-23 09:04:47.023: E / AudioRecord-Java (13968): [android.media.AudioRecord] Error code -20 when initializing native AudioRecord object
.
Great God seeking advice. .<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Their top. Toss a night. Can not find a solution.
Reply:
Did not get off to support the next evening to find information bar, have a look
Reply:
inbuffsize problems
Reply:
The landlord did not solve?
Reply:
Permissions inside with Record_Audio
Reply:
Summed up the online versions, one sample rate is wrong, the second is a direct restart the phone.
But is not the answer you want, do not know the landlord is not resolved?
Reply:
Some say the problem is the phone version
Reply:
The landlord is not kind ah
Reply:
Try adding the phrase:
Reply:
Those who say what additional permissions, bufferSize gave lz Go to hell, are tried here, you would think this is the problem of what an idiot. Plus permission to say no, no permissions will directly fc's. Millet 2 will be out on this issue, as well as Meizu mx occasionally a bird out of this problem. Life and death can not find a solution.
Reply:
The old lady found the problem. Say what sampling rate ah God horse, weak horse gods restart goods, as early as possible, right comment deleted, lost no shame.
This is because I can not stop on the synchronization thread. (Only some phones have this problem, indeed upstairs to say what kinds of phones appear)
while (isRecording) {
int bufferReadResult = audioRecord.read (buffer, 0, bufferSize);
for (int i = 0; i
/ / Thread.sleep (1000);
}
/ / AudioRecord.release ();
/ / AudioRecord = null;
Two lines, and while normally we will put together the final annotated run inside. The machine is generally not a problem. But miuijbl20 and Meizu mx two systems will not work, you must write a separate stop method to stop the outside run into and release audioRecord resources.
Reply:
The old lady upstairs, looks like your approach is useless
No comments:
Post a Comment