From cad8b763392311c96c26025374ea087ce151abe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=BF=97=E5=BA=86?= Date: Thu, 28 Aug 2025 10:38:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=B3=E8=BF=94=E6=B7=B7=E5=93=8D=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E5=90=8D=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蒋志庆 --- frameworks/js/napi/common/napi_audio_enum.cpp | 4 ++-- .../native/audioloopback/include/audio_loopback_private.h | 2 +- frameworks/native/audioloopback/src/audio_loopback.cpp | 2 +- .../test/unittest/src/audio_loopback_unit_test.cpp | 4 ++-- interfaces/inner_api/native/audiocommon/include/audio_info.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frameworks/js/napi/common/napi_audio_enum.cpp b/frameworks/js/napi/common/napi_audio_enum.cpp index 551e994118..bdc34f0084 100644 --- a/frameworks/js/napi/common/napi_audio_enum.cpp +++ b/frameworks/js/napi/common/napi_audio_enum.cpp @@ -514,7 +514,7 @@ const std::map NapiAudioEnum::audioLoopbackStatusMap = { const std::map NapiAudioEnum::audioLoopbackReverbPresetMap = { {"ORIGINAL", REVERB_PRESET_ORIGINAL}, {"KTV", REVERB_PRESET_KTV}, - {"THEATRE", REVERB_PRESET_THEATRE}, + {"THEATER", REVERB_PRESET_THEATER}, {"CONCERT", REVERB_PRESET_CONCERT}, }; @@ -1874,7 +1874,7 @@ bool NapiAudioEnum::IsLegalInputArgumentAudioLoopbackReverbPreset(int32_t preset switch (preset) { case AudioLoopbackReverbPreset::REVERB_PRESET_ORIGINAL: case AudioLoopbackReverbPreset::REVERB_PRESET_KTV: - case AudioLoopbackReverbPreset::REVERB_PRESET_THEATRE: + case AudioLoopbackReverbPreset::REVERB_PRESET_THEATER: case AudioLoopbackReverbPreset::REVERB_PRESET_CONCERT: result = true; break; diff --git a/frameworks/native/audioloopback/include/audio_loopback_private.h b/frameworks/native/audioloopback/include/audio_loopback_private.h index fa66003cdd..672478d0d2 100644 --- a/frameworks/native/audioloopback/include/audio_loopback_private.h +++ b/frameworks/native/audioloopback/include/audio_loopback_private.h @@ -107,7 +107,7 @@ private: std::atomic capturerState_ = CAPTURER_INVALID; std::atomic isCapturerUsb_ = false; std::atomic capturerFastStatus_ = FASTSTATUS_NORMAL; - AudioLoopbackReverbPreset currentReverbPreset_ = REVERB_PRESET_THEATRE; + AudioLoopbackReverbPreset currentReverbPreset_ = REVERB_PRESET_THEATER; AudioLoopbackEqualizerPreset currentEqualizerPreset_ = EQUALIZER_PRESET_FULL; }; } // namespace AudioStandard diff --git a/frameworks/native/audioloopback/src/audio_loopback.cpp b/frameworks/native/audioloopback/src/audio_loopback.cpp index 47a77b0c28..2bd29865da 100644 --- a/frameworks/native/audioloopback/src/audio_loopback.cpp +++ b/frameworks/native/audioloopback/src/audio_loopback.cpp @@ -33,7 +33,7 @@ namespace { const std::map audioLoopbackReverbPresetMap = { {REVERB_PRESET_ORIGINAL, "disable"}, {REVERB_PRESET_KTV, "ktv"}, - {REVERB_PRESET_THEATRE, "theatre"}, + {REVERB_PRESET_THEATER, "theatre"}, {REVERB_PRESET_CONCERT, "concert"}, }; const std::map audioLoopbackEqualizerPresetMap = { diff --git a/frameworks/native/audioloopback/test/unittest/src/audio_loopback_unit_test.cpp b/frameworks/native/audioloopback/test/unittest/src/audio_loopback_unit_test.cpp index 4b2f34b26a..28746a574f 100644 --- a/frameworks/native/audioloopback/test/unittest/src/audio_loopback_unit_test.cpp +++ b/frameworks/native/audioloopback/test/unittest/src/audio_loopback_unit_test.cpp @@ -286,14 +286,14 @@ HWTEST_F(AudioLoopbackUnitTest, Audio_Loopback_SetReverbPreset_001, TestSize.Lev { auto audioLoopback = std::make_shared(LOOPBACK_HARDWARE, AppInfo()); audioLoopback->currentState_ = LOOPBACK_STATE_RUNNING; - bool ret = audioLoopback->SetReverbPreset(REVERB_PRESET_THEATRE); + bool ret = audioLoopback->SetReverbPreset(REVERB_PRESET_THEATER); EXPECT_EQ(ret, true); } HWTEST_F(AudioLoopbackUnitTest, Audio_Loopback_SetReverbPreset_002, TestSize.Level1) { auto audioLoopback = std::make_shared(LOOPBACK_HARDWARE, AppInfo()); - bool ret = audioLoopback->SetReverbPreset(REVERB_PRESET_THEATRE); + bool ret = audioLoopback->SetReverbPreset(REVERB_PRESET_THEATER); EXPECT_EQ(ret, true); } diff --git a/interfaces/inner_api/native/audiocommon/include/audio_info.h b/interfaces/inner_api/native/audiocommon/include/audio_info.h index 3a915bc08c..98b66eb36d 100644 --- a/interfaces/inner_api/native/audiocommon/include/audio_info.h +++ b/interfaces/inner_api/native/audiocommon/include/audio_info.h @@ -574,7 +574,7 @@ enum AudioLoopbackReverbPreset { /** * A preset representing a reverberation effect with theater-like acoustic characteristics. */ - REVERB_PRESET_THEATRE = 3, + REVERB_PRESET_THEATER = 3, /** * A preset representing a reverberation effect with concert-like acoustic characteristics. */ -- Gitee