Android的AudioRecord耳机MIC

Android的AudioRecord耳机MIC

本文介绍了Android的AudioRecord耳机MIC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有与AudioRecord类的一些问题。我有当有人通过耳机收听音频,记录音频的应用程序。在这种情况下,它工作正常。用户可以无问题记录。使用具有内置麦克风的耳机的任何用户不能够在所有记录。我的类可以根据PCM数据.wav文件,但没有音频正从麦克风输入。所有的沉默。

I am having some issues with the AudioRecord class. I have an app that records audio while someone is listening to audio through headphones. In this scenario, it works fine. Users are able to record without an issue. Any user using headphones with a built-in mic are not able to record at all. My class creates the .wav file from PCM data but no audio is being input from the mic. Its all silence.

我用下面的初始化我AudioRecorder:

I use the following the init my AudioRecorder:

extAudioRecorder = new ExtAudioRecorder(true,
AudioSource.MIC,
44100,
AudioFormat.CHANNEL_IN_MONO,
AudioFormat.ENCODING_PCM_16BIT);

有没有尝试使用耳机瓦特/ Android中一个麦克风录制问题?

Is there a problem trying to record using headphones w/ a mic in Android?

编辑:

刚刚发现耳机甚至不必须有一个MIC和内置麦克风仍被禁用。任何人都知道如何解决这个问题?

Just found out that the headphones dont even have to have a MIC and the internal mic is still disabled. Anyone know how to get around this?

推荐答案

发现,有些手机禁用内置麦克风,当插入耳机。天色三星设备。

Found out that some phones disable the built-in microphone when headphones are plugged in. Mostly Samsung devices.

这篇关于Android的AudioRecord耳机MIC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 14:41