Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid: Microphone AudioSource causing unsupported parameter, VerifyAndSetParameter failed errors
    text
    copied!<p>This question has also been asked at <a href="https://stackoverflow.com/questions/3002537/problems-with-mediarecorder-class-setting-audio-source-setaudiosource-unsup">Problems with MediaRecorder class setting audio source - setAudioSource() - unsupported parameter</a>, however this author accepted the answer stating that this only occurs on the emulator, while (for me) this is not the case.</p> <p>The problem occurs on my device, a Galaxy S i9000. The device has a microphone and recording with the microphone works regardless of this error.</p> <p>The following code reproduces this error (called inside a service):</p> <pre><code>int sampleRate = AudioTrack.getNativeOutputSampleRate(AudioManager.STREAM_SYSTEM); int channelMode = AudioFormat.CHANNEL_IN_MONO; int encodingMode = AudioFormat.ENCODING_PCM_16BIT; //only 16bit encoding is supported int bufferSize = AudioRecord.getMinBufferSize(sampleRate, channelMode, encodingMode); recorder = new AudioRecord(MediaRecorder.AudioSource.MIC, sampleRate, channelMode, encodingMode, bufferSize); </code></pre> <p>Setting the sample rate to a lower value like 8000 does not solve the problem. Setting the channelMode to stereo does not solve the problem.</p> <p>When executing this code inside my service while the microphone is available for usage, the following errors will be returned:</p> <pre><code>01-28 14:50:14.860: ERROR/audio_input(2358): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value 01-28 14:50:14.860: ERROR/audio_input(2358): VerifyAndSetParameter failed 01-28 14:50:15.246: ERROR/PVOMXEncNode(2358): PVMFOMXEncNode-Audio_AMRNB::DoPrepare(): Got Component OMX.SEC.amrenc handle 01-28 14:50:15.258: ERROR/audio_input(2358): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value 01-28 14:50:15.258: ERROR/audio_input(2358): VerifyAndSetParameter failed 01-28 14:50:15.328: ERROR/audio_input(2358): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value 01-28 14:50:15.328: ERROR/audio_input(2358): VerifyAndSetParameter failed 01-28 14:50:15.356: ERROR/PVOMXEncNode(2358): PVMFOMXEncNode-Audio_AMRNB::DoPrepare(): Got Component OMX.SEC.amrenc handle 01-28 14:50:15.359: ERROR/audio_input(2358): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value 01-28 14:50:15.359: ERROR/audio_input(2358): VerifyAndSetParameter failed 01-28 14:50:15.367: ERROR/AudioHardwareALSA(2358): AudioStreamInALSA - input - format = 1, channels = 16, rate = 44100 01-28 14:50:15.367: ERROR/AudioHardwareALSA(2358): AudioStreamInALSA - default - format = 1, channels = 16, rate = 44100 01-28 14:50:15.457: ERROR/AudioFlinger(2358): readInputParameters mInputBytes 8320, mFrameSize 2 mSampleRate 44100 mChannelCount(1) 01-28 14:50:15.457: ERROR/(2358): AFCCreateReSampler: avAFCInfo-&gt;bUsed[0] inSampleRate[44100] outSampleRate[44100] nChannel[1] outbitDepth[16] </code></pre> <p>Does anyone have a solution to this problem?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload