1 /* 2 * Copyright (c) 2024 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 ST_AUDIO_EFFECT_MANAGER_H 17 #define ST_AUDIO_EFFECT_MANAGER_H 18 19 #include <iostream> 20 #include <map> 21 #include "audio_effect.h" 22 #include "audio_system_manager.h" 23 24 namespace OHOS { 25 namespace AudioStandard { 26 27 class AudioEffectManager { 28 public: 29 AudioEffectManager() = default; 30 virtual ~AudioEffectManager() = default; 31 32 static AudioEffectManager *GetInstance(); 33 34 /** 35 * @brief Get Audio render Effect param. 36 * 37 * @param AudioSceneEffectInfo AudioSceneEffectInfo 38 * @return Returns {@link SUCCESS} if callback registration is successful; returns an error code 39 * defined in {@link audio_errors.h} otherwise. 40 * @since 13 41 */ 42 int32_t GetSupportedAudioEffectProperty(AudioEffectPropertyArrayV3 &propertyArray); 43 44 /** 45 * @brief Sets the audio effect Param. 46 * 47 * * @param effectParam The audio effect Param at which the effect needs to be rendered. 48 * @return Returns {@link SUCCESS} if audio effect Param is successfully set; returns an error code 49 * defined in {@link audio_errors.h} otherwise. 50 * @since 13 51 */ 52 int32_t SetAudioEffectProperty(const AudioEffectPropertyArrayV3 &propertyArray); 53 54 /** 55 * @brief Gets the audio effect Param. 56 * 57 * * @param effectParam The audio effect moParamde at which the effect needs to be rendered. 58 * @return Returns {@link SUCCESS} if audio effect Param is successfully set; returns an error code 59 * defined in {@link audio_errors.h} otherwise. 60 * @since 13 61 */ 62 int32_t GetAudioEffectProperty(AudioEffectPropertyArrayV3 &propertyArray); 63 }; 64 65 } // namespace AudioStandard 66 } // namespace OHOS 67 #endif // ST_AUDIO_EFFECT_MANAGER_H 68