1 /* 2 * Copyright (c) 2021-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 16 #ifndef AUDIO_SOURCE_TYPE_H 17 #define AUDIO_SOURCE_TYPE_H 18 19 /** 20 * Enumerates the capturer source type 21 */ 22 #ifdef __cplusplus 23 namespace OHOS { 24 namespace AudioStandard { 25 #endif 26 enum SourceType { 27 SOURCE_TYPE_INVALID = -1, 28 SOURCE_TYPE_MIC, 29 SOURCE_TYPE_VOICE_RECOGNITION = 1, 30 SOURCE_TYPE_PLAYBACK_CAPTURE = 2, 31 SOURCE_TYPE_WAKEUP = 3, 32 SOURCE_TYPE_VOICE_CALL = 4, 33 SOURCE_TYPE_VOICE_COMMUNICATION = 7, 34 SOURCE_TYPE_ULTRASONIC = 8, 35 SOURCE_TYPE_VIRTUAL_CAPTURE = 9, // only for voice call 36 SOURCE_TYPE_VOICE_MESSAGE = 10, 37 SOURCE_TYPE_REMOTE_CAST = 11, 38 SOURCE_TYPE_VOICE_TRANSCRIPTION = 12, 39 SOURCE_TYPE_CAMCORDER = 13, 40 SOURCE_TYPE_MAX = SOURCE_TYPE_CAMCORDER 41 }; 42 43 typedef enum { 44 /** Invalid audio source */ 45 AUDIO_SOURCE_INVALID = -1, 46 /** Default audio source */ 47 AUDIO_SOURCE_DEFAULT = 0, 48 /** Microphone */ 49 AUDIO_MIC = 1, 50 /** Uplink voice */ 51 AUDIO_VOICE_UPLINK = 2, 52 /** Downlink voice */ 53 AUDIO_VOICE_DOWNLINK = 3, 54 /** Voice call */ 55 AUDIO_VOICE_CALL = 4, 56 /** Camcorder */ 57 AUDIO_CAMCORDER = 5, 58 /** Voice recognition */ 59 AUDIO_VOICE_RECOGNITION = 6, 60 /** Voice communication */ 61 AUDIO_VOICE_COMMUNICATION = 7, 62 /** Remote submix */ 63 AUDIO_REMOTE_SUBMIX = 8, 64 /** Unprocessed audio */ 65 AUDIO_UNPROCESSED = 9, 66 /** Voice performance */ 67 AUDIO_VOICE_PERFORMANCE = 10, 68 /** Echo reference */ 69 AUDIO_ECHO_REFERENCE = 1997, 70 /** Radio tuner */ 71 AUDIO_RADIO_TUNER = 1998, 72 /** Hotword */ 73 AUDIO_HOTWORD = 1999, 74 /** Extended remote submix */ 75 AUDIO_REMOTE_SUBMIX_EXTEND = 10007, 76 } AudioSourceType; 77 #ifdef __cplusplus 78 } // namespace AudioStandard 79 } // namespace OHOS 80 #endif 81 #endif //AUDIO_SOURCE_TYPE_H 82