1 /*
2  * Copyright (c) 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_SASDK_H
17 #define AUDIO_SASDK_H
18 
19 namespace OHOS {
20 namespace AudioStandard {
21 
22 enum SaSdkAudioVolumeType {
23     /**
24      * Indicates audio streams of voices in calls.
25      */
26     SASDK_STREAM_VOICE_CALL = 0,
27     /**
28      * Indicates audio streams for music.
29      */
30     SASDK_STREAM_MUSIC = 1,
31     /**
32      * Indicates audio streams for ringtones.
33      */
34     SASDK_STREAM_RING = 2,
35 };
36 
37 /**
38  * @brief The AudioSaSdk class is an abstract definition of audio sasdk abilities.
39  */
40 class AudioSaSdk {
41 public:
42     static AudioSaSdk *GetInstance();
43 
44     AudioSaSdk();
45 
46     ~AudioSaSdk();
47 
48     /**
49      * @brief Is stream active.
50      *
51      * @param volumeType audio volume type.
52      * @return Returns <b>true</b> if the rendering is successfully started; returns <b>false</b> otherwise.
53      * @since 11
54      */
55     bool IsStreamActive(SaSdkAudioVolumeType volumeType);
56 };
57 }  // namespace AudioStandard
58 }  // namespace OHOS
59 #endif  // AUDIO_SASDK_H
60