From c7b0211d2609f26c79be6d45c4c013a19008c023 Mon Sep 17 00:00:00 2001 From: jiaoyanlin3 Date: Mon, 20 Mar 2023 20:24:26 +0800 Subject: [PATCH] Opensl development guide modification Signed-off-by: jiaoyanlin3 --- zh-cn/application-dev/media/opensles-capture.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zh-cn/application-dev/media/opensles-capture.md b/zh-cn/application-dev/media/opensles-capture.md index 4230d6fcbb..9741fa11f7 100644 --- a/zh-cn/application-dev/media/opensles-capture.md +++ b/zh-cn/application-dev/media/opensles-capture.md @@ -53,10 +53,10 @@ //具体参数需要根据音频文件格式进行适配 SLDataFormat_PCM format_pcm = { - SL_DATAFORMAT_PCM, - 1, //单声道,等同于OHOS::AudioStandard::AudioChannel::MONO - 44100,//采样率,等同于OHOS::AudioStandard::AudioSamplingRate::SAMPLE_RATE_44100 - 1, //音频采样格式,OHOS::AudioStandard::AudioSampleFormat::SAMPLE_S16LE, + SL_DATAFORMAT_PCM, //输入的音频格式 + SL_SPEAKER_FRONT_LEFT,//前左声道 + SL_SAMPLINGRATE_44_1,//采样率,44100HZ + SL_PCMSAMPLEFORMAT_FIXED_16,//音频采样格式,小尾数,带符号的16位整数 0, 0, 0 -- GitLab