From 4f4e99b1fbbbae4f0c4d2d56eecc0d3774657329 Mon Sep 17 00:00:00 2001 From: yuandongping Date: Wed, 21 May 2025 09:23:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=93=9D=E7=89=99=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=92=AD=E6=94=BE=E6=97=A0=E5=A3=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yuandongping --- code/BasicFeature/Media/Audio/README.md | 4 ++-- code/BasicFeature/Media/Audio/build-profile.json5 | 6 +++--- .../Audio/entry/src/main/ets/pages/PreferOutputDevice.ets | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/BasicFeature/Media/Audio/README.md b/code/BasicFeature/Media/Audio/README.md index 88f373f739..91bdd1c4ca 100644 --- a/code/BasicFeature/Media/Audio/README.md +++ b/code/BasicFeature/Media/Audio/README.md @@ -167,7 +167,7 @@ library/ ### 约束与限制 1. 本示例仅支持标准系统上运行,支持设备:RK3568; -2. 本示例仅支持API16版本SDK,SDK版本号(API Version 16 Release),镜像版本号(5.1Release); +2. 本示例仅支持API18版本SDK,SDK版本号(API Version 18 Release),镜像版本号(5.1Release); 3. 本示例需要使用DevEco Studio 版本号(5.0Release)才可编译运行; ### 下载 @@ -177,7 +177,7 @@ library/ ``` git init git config core.sparsecheckout true -echo Audio/Audio/ > .git/info/sparse-checkout +echo code/BasicFeature/Media/Audio > .git/info/sparse-checkout git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master ``` \ No newline at end of file diff --git a/code/BasicFeature/Media/Audio/build-profile.json5 b/code/BasicFeature/Media/Audio/build-profile.json5 index 6d6e4ba6ec..c22b1168a4 100644 --- a/code/BasicFeature/Media/Audio/build-profile.json5 +++ b/code/BasicFeature/Media/Audio/build-profile.json5 @@ -1,5 +1,5 @@ /* -* Copyright (C) 2023 Huawei Device Co., Ltd. +* Copyright (C) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,8 +19,8 @@ { "name": "default", "signingConfig": "default", - "compileSdkVersion": 16, - "compatibleSdkVersion": 16, + "compileSdkVersion": 18, + "compatibleSdkVersion": 18, "runtimeOS": "OpenHarmony" } ] diff --git a/code/BasicFeature/Media/Audio/entry/src/main/ets/pages/PreferOutputDevice.ets b/code/BasicFeature/Media/Audio/entry/src/main/ets/pages/PreferOutputDevice.ets index f9b3290060..8aa1f63abf 100644 --- a/code/BasicFeature/Media/Audio/entry/src/main/ets/pages/PreferOutputDevice.ets +++ b/code/BasicFeature/Media/Audio/entry/src/main/ets/pages/PreferOutputDevice.ets @@ -1,5 +1,5 @@ /* -* Copyright (C) 2023 Huawei Device Co., Ltd. +* Copyright (C) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -30,7 +30,7 @@ struct PreferOutputDevice { private appContext?: common.Context; private audioRendererOption: audio.AudioRendererOptions = { streamInfo: { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_44100, + samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000, channels: audio.AudioChannel.CHANNEL_2, sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S16LE, encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW -- Gitee