/* * Copyright (c) 2020-2021 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @addtogroup Audio * @{ * * @brief Defines audio-related APIs, including custom data types and functions for loading drivers, * accessing a driver adapter, and rendering and capturing audios. * * @since 1.0 * @version 1.0 */ /** * @file audio_scene.h * * @brief Declares APIs for audio scenes. * * @since 1.0 * @version 1.0 */ #ifndef AUDIO_SCENE_H #define AUDIO_SCENE_H #include "audio_types.h" namespace OHOS::HDI::Audio_Bluetooth { /** * @brief Provides scene-related APIs for audio rendering or capturing, including functions to * select an audio scene and check whether the configuration of an audio scene is supported. * * @since 1.0 * @version 1.0 */ struct AudioScene { /** * @brief Checks whether the configuration of an audio scene is supported. * * @param handle Indicates the audio handle. * @param scene Indicates the pointer to the descriptor of the audio scene. * @param supported Indicates the pointer to the variable specifying whether the configuration is supported. * Value true means that the configuration is supported, and false means the opposite. * @return Returns 0 if the result is obtained; returns a negative value otherwise. * @see SelectScene */ int32_t (*CheckSceneCapability)(AudioHandle handle, const struct AudioSceneDescriptor *scene, bool *supported); /** * @brief Selects an audio scene. * *