1 /* 2 * Copyright (c) 2023 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 #ifndef AUDIO_EFFECT_CONFIG_PARSER_H 16 #define AUDIO_EFFECT_CONFIG_PARSER_H 17 18 #include <map> 19 #include <memory> 20 #include <string> 21 #include <vector> 22 #include <iostream> 23 #include <cstdio> 24 #include "audio_policy_log.h" 25 #include "audio_effect.h" 26 27 namespace OHOS { 28 namespace AudioStandard { 29 typedef enum { 30 INDEX_PRE_DEFAULT_SCENE = 0, 31 INDEX_PRE_PRIOR_SCENE = 1, 32 INDEX_PRE_NORMAL_SCENE = 2, 33 INDEX_PRE_EXCEPTION = 3, 34 NODE_SIZE_PRE = 4, 35 } XmlPreNodeIndex; 36 37 typedef enum { 38 INDEX_POST_DEFAULT_SCENE = 0, 39 INDEX_POST_PRIOR_SCENE = 1, 40 INDEX_POST_NORMAL_SCENE = 2, 41 INDEX_POST_MAPPING = 3, 42 INDEX_POST_EXCEPTION = 4, 43 NODE_SIZE_POST = 5, 44 } XmlPostNodeIndex; 45 46 class AudioEffectConfigParser { 47 public: 48 explicit AudioEffectConfigParser(); 49 ~AudioEffectConfigParser(); 50 int32_t LoadEffectConfig(OriginalEffectConfig &result); 51 }; 52 } // namespace AudioStandard 53 } // namespace OHOS 54 #endif // AUDIO_EFFECT_CONFIG_PARSER_H