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