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 #ifndef AUDIO_SESSION_INFO_H 16 #define AUDIO_SESSION_INFO_H 17 18 namespace OHOS { 19 namespace AudioStandard { 20 enum class AudioConcurrencyMode { 21 INVALID = -1, 22 DEFAULT = 0, 23 MIX_WITH_OTHERS = 1, 24 DUCK_OTHERS = 2, 25 PAUSE_OTHERS = 3, 26 SLIENT = 4, 27 }; 28 29 struct AudioSessionStrategy { 30 mutable AudioConcurrencyMode concurrencyMode; 31 }; 32 33 enum class AudioSessionDeactiveReason { 34 LOW_PRIORITY = 0, // All audio streams have been interrupted. 35 TIMEOUT = 1, // The audio session remains empty for one minute. 36 }; 37 38 struct AudioSessionDeactiveEvent { 39 AudioSessionDeactiveReason deactiveReason; 40 }; 41 42 enum class AudioSessionType { 43 DEFAULT = 0, 44 MEDIA = 1, 45 SONIFICATION = 2, 46 CALL = 3, 47 VOIP = 4, 48 SYSTEM = 5, 49 NOTIFICATION = 6, 50 DTMF = 7, 51 VOICE_ASSISTANT = 8, 52 }; 53 } // namespace AudioStandard 54 } // namespace OHOS 55 #endif // AUDIO_SESSION_INFO_H 56