Android OpenSL “pAudioSrc: data format 2 not allowed” - denying SL_DATAFORMAT_PCM?
问题 I'm trying to create an AudioPlayer with a bufferqueue source and outputmix sink. I've configured the source with a pcm format very similar to that shown in the ndk samples, but OpenSL is rejecting SL_DATAFORMAT_PCM ("data format 2"). This doesn't make any sense to me. Here's the error (on a Samsung Galaxy S2): 02-27 15:43:47.315: E/libOpenSLES(12681): pAudioSrc: data format 2 not allowed 02-27 15:43:47.315: W/libOpenSLES(12681): Leaving Engine::CreateAudioPlayer (SL_RESULT_CONTENT