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

エミュレータはサンプルレート= 8000のみをサポートしているようで、サンプルレートを変更すると問題なく動作します。

于 2012-12-23T13:01:03.900 に答える
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 に答える