1 /*
2 * Copyright (c) 2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #ifndef LOG_TAG
17 #define LOG_TAG "AudioManagerUtil"
18 #endif
19
20 #include "audio_effect_map.h"
21 #include "audio_effect.h"
22
23 namespace OHOS {
24 namespace AudioStandard {
GetSupportedSceneType()25 const std::unordered_map<AudioEffectScene, std::string>& GetSupportedSceneType()
26 {
27 static const std::unordered_map<AudioEffectScene, std::string> audioSupportedSceneTypes = {
28 {SCENE_OTHERS, "SCENE_OTHERS"},
29 {SCENE_MUSIC, "SCENE_MUSIC"},
30 {SCENE_MOVIE, "SCENE_MOVIE"},
31 {SCENE_GAME, "SCENE_GAME"},
32 {SCENE_SPEECH, "SCENE_SPEECH"},
33 {SCENE_RING, "SCENE_RING"},
34 {SCENE_VOIP_DOWN, "SCENE_VOIP_DOWN"},
35 };
36 return audioSupportedSceneTypes;
37 }
38
GetEnhanceSupportedSceneType()39 const std::unordered_map<AudioEnhanceScene, std::string>& GetEnhanceSupportedSceneType()
40 {
41 static const std::unordered_map<AudioEnhanceScene, std::string> audioEnhanceSupportedSceneTypes = {
42 {SCENE_VOIP_UP, "SCENE_VOIP_UP"},
43 {SCENE_RECORD, "SCENE_RECORD"},
44 {SCENE_ASR, "SCENE_ASR"},
45 {SCENE_PRE_ENHANCE, "SCENE_PRE_ENHANCE"},
46 {SCENE_VOICE_MESSAGE, "SCENE_VOICE_MESSAGE"},
47 };
48 return audioEnhanceSupportedSceneTypes;
49 }
50
GetAudioSupportedSceneModes()51 const std::unordered_map<AudioEffectMode, std::string>& GetAudioSupportedSceneModes()
52 {
53 static const std::unordered_map<AudioEffectMode, std::string> audioSupportedSceneModes = {
54 {EFFECT_NONE, "EFFECT_NONE"},
55 {EFFECT_DEFAULT, "EFFECT_DEFAULT"},
56 };
57 return audioSupportedSceneModes;
58 }
59
60 } // namespace AudioStandard
61 } // namespace OHOS