0

我不明白为什么我有这个错误。你能帮助我吗?

这是我的代码:

int bufferSize = AudioRecord.getMinBufferSize(44100,AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT);

AudioRecord audioRecord = new AudioRecord( MediaRecorder.AudioSource.MIC, 44100,AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, bufferSize);

错误:

Error: Unsupported configuration: sampleRate 44100, format 1, channelCount 1"-AudioRecord Android
4

2 回答 2

2

Very odd, but the error is self-explanatory: the device you're running on doesn't have audio hardware/mixer support for a 16-bit mono audio channel at a 44.1 kHz sample rate. Is this a hardware device or an emulator?

于 2012-09-18T02:00:47.467 回答
2

似乎模拟器只支持采样率= 8000,改变了采样率,它工作得很好。

于 2012-12-23T13:01:03.900 回答