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_UNPROCESSED = 14, 41 SOURCE_TYPE_MAX = SOURCE_TYPE_UNPROCESSED 42 }; 43 44 typedef enum { 45 /** Invalid audio source */ 46 AUDIO_SOURCE_INVALID = -1, 47 /** Default audio source */ 48 AUDIO_SOURCE_DEFAULT = 0, 49 /** Microphone */ 50 AUDIO_MIC = 1, 51 /** Uplink voice */ 52 AUDIO_VOICE_UPLINK = 2, 53 /** Downlink voice */ 54 AUDIO_VOICE_DOWNLINK = 3, 55 /** Voice call */ 56 AUDIO_VOICE_CALL = 4, 57 /** Camcorder */ 58 AUDIO_CAMCORDER = 5, 59 /** Voice recognition */ 60 AUDIO_VOICE_RECOGNITION = 6, 61 /** Voice communication */ 62 AUDIO_VOICE_COMMUNICATION = 7, 63 /** Remote submix */ 64 AUDIO_REMOTE_SUBMIX = 8, 65 /** Unprocessed audio */ 66 AUDIO_UNPROCESSED = 9, 67 /** Voice performance */ 68 AUDIO_VOICE_PERFORMANCE = 10, 69 /** Echo reference */ 70 AUDIO_ECHO_REFERENCE = 1997, 71 /** Radio tuner */ 72 AUDIO_RADIO_TUNER = 1998, 73 /** Hotword */ 74 AUDIO_HOTWORD = 1999, 75 /** Extended remote submix */ 76 AUDIO_REMOTE_SUBMIX_EXTEND = 10007, 77 } AudioSourceType; 78 #ifdef __cplusplus 79 } // namespace AudioStandard 80 } // namespace OHOS 81 #endif 82 #endif //AUDIO_SOURCE_TYPE_H 83