161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit AudioKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport { ErrorCallback, AsyncCallback, Callback } from './@ohos.base';
2261847f8eSopenharmony_ci
2361847f8eSopenharmony_ci/**
2461847f8eSopenharmony_ci * @namespace audio
2561847f8eSopenharmony_ci * @since 7
2661847f8eSopenharmony_ci */
2761847f8eSopenharmony_ci/**
2861847f8eSopenharmony_ci * @namespace audio
2961847f8eSopenharmony_ci * @syscap SystemCapability.Multimedia.Audio.Core
3061847f8eSopenharmony_ci * @crossplatform
3161847f8eSopenharmony_ci * @atomicservice
3261847f8eSopenharmony_ci * @since 12
3361847f8eSopenharmony_ci */
3461847f8eSopenharmony_cideclare namespace audio {
3561847f8eSopenharmony_ci  /**
3661847f8eSopenharmony_ci   * Enumerates audio errors.
3761847f8eSopenharmony_ci   * @enum { number }
3861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
3961847f8eSopenharmony_ci   * @since 9
4061847f8eSopenharmony_ci   */
4161847f8eSopenharmony_ci  /**
4261847f8eSopenharmony_ci   * Enumerates audio errors.
4361847f8eSopenharmony_ci   * @enum { number }
4461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
4561847f8eSopenharmony_ci   * @crossplatform
4661847f8eSopenharmony_ci   * @since 12
4761847f8eSopenharmony_ci   */
4861847f8eSopenharmony_ci  enum AudioErrors {
4961847f8eSopenharmony_ci    /**
5061847f8eSopenharmony_ci     * Invalid parameter.
5161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
5261847f8eSopenharmony_ci     * @since 9
5361847f8eSopenharmony_ci     */
5461847f8eSopenharmony_ci    /**
5561847f8eSopenharmony_ci     * Invalid parameter.
5661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
5761847f8eSopenharmony_ci     * @crossplatform
5861847f8eSopenharmony_ci     * @since 12
5961847f8eSopenharmony_ci     */
6061847f8eSopenharmony_ci    ERROR_INVALID_PARAM = 6800101,
6161847f8eSopenharmony_ci    /**
6261847f8eSopenharmony_ci     * Allocate memory failed.
6361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
6461847f8eSopenharmony_ci     * @since 9
6561847f8eSopenharmony_ci     */
6661847f8eSopenharmony_ci    /**
6761847f8eSopenharmony_ci     * Allocate memory failed.
6861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
6961847f8eSopenharmony_ci     * @crossplatform
7061847f8eSopenharmony_ci     * @since 12
7161847f8eSopenharmony_ci     */
7261847f8eSopenharmony_ci    ERROR_NO_MEMORY = 6800102,
7361847f8eSopenharmony_ci    /**
7461847f8eSopenharmony_ci     * Operation not permit at current state.
7561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
7661847f8eSopenharmony_ci     * @since 9
7761847f8eSopenharmony_ci     */
7861847f8eSopenharmony_ci    /**
7961847f8eSopenharmony_ci     * Operation not permit at current state.
8061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
8161847f8eSopenharmony_ci     * @crossplatform
8261847f8eSopenharmony_ci     * @since 12
8361847f8eSopenharmony_ci     */
8461847f8eSopenharmony_ci    ERROR_ILLEGAL_STATE = 6800103,
8561847f8eSopenharmony_ci    /**
8661847f8eSopenharmony_ci     * Unsupported option.
8761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
8861847f8eSopenharmony_ci     * @since 9
8961847f8eSopenharmony_ci     */
9061847f8eSopenharmony_ci    /**
9161847f8eSopenharmony_ci     * Unsupported option.
9261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
9361847f8eSopenharmony_ci     * @crossplatform
9461847f8eSopenharmony_ci     * @since 12
9561847f8eSopenharmony_ci     */
9661847f8eSopenharmony_ci    ERROR_UNSUPPORTED = 6800104,
9761847f8eSopenharmony_ci    /**
9861847f8eSopenharmony_ci     * Time out.
9961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
10061847f8eSopenharmony_ci     * @since 9
10161847f8eSopenharmony_ci     */
10261847f8eSopenharmony_ci    ERROR_TIMEOUT = 6800105,
10361847f8eSopenharmony_ci    /**
10461847f8eSopenharmony_ci     * Audio specific errors.
10561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
10661847f8eSopenharmony_ci     * @since 9
10761847f8eSopenharmony_ci     */
10861847f8eSopenharmony_ci    ERROR_STREAM_LIMIT = 6800201,
10961847f8eSopenharmony_ci    /**
11061847f8eSopenharmony_ci     * Default error.
11161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
11261847f8eSopenharmony_ci     * @since 9
11361847f8eSopenharmony_ci     */
11461847f8eSopenharmony_ci    /**
11561847f8eSopenharmony_ci     * Default error.
11661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
11761847f8eSopenharmony_ci     * @crossplatform
11861847f8eSopenharmony_ci     * @since 12
11961847f8eSopenharmony_ci     */
12061847f8eSopenharmony_ci    ERROR_SYSTEM = 6800301
12161847f8eSopenharmony_ci  }
12261847f8eSopenharmony_ci
12361847f8eSopenharmony_ci  /**
12461847f8eSopenharmony_ci   * Define local device network id for audio
12561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
12661847f8eSopenharmony_ci   * @systemapi
12761847f8eSopenharmony_ci   * @since 9
12861847f8eSopenharmony_ci   */
12961847f8eSopenharmony_ci  const LOCAL_NETWORK_ID: string;
13061847f8eSopenharmony_ci
13161847f8eSopenharmony_ci  /**
13261847f8eSopenharmony_ci   * Define default volume group id for audio
13361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
13461847f8eSopenharmony_ci   * @since 9
13561847f8eSopenharmony_ci   */
13661847f8eSopenharmony_ci  /**
13761847f8eSopenharmony_ci   * Define default volume group id for audio
13861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
13961847f8eSopenharmony_ci   * @crossplatform
14061847f8eSopenharmony_ci   * @since 12
14161847f8eSopenharmony_ci   */
14261847f8eSopenharmony_ci  const DEFAULT_VOLUME_GROUP_ID: number;
14361847f8eSopenharmony_ci
14461847f8eSopenharmony_ci  /**
14561847f8eSopenharmony_ci   * Define default interrupt group id for audio
14661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Interrupt
14761847f8eSopenharmony_ci   * @since 9
14861847f8eSopenharmony_ci   */
14961847f8eSopenharmony_ci  const DEFAULT_INTERRUPT_GROUP_ID: number;
15061847f8eSopenharmony_ci
15161847f8eSopenharmony_ci  /**
15261847f8eSopenharmony_ci   * Obtains an {@link AudioManager} instance.
15361847f8eSopenharmony_ci   * @returns { AudioManager } this {@link AudioManager} object.
15461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
15561847f8eSopenharmony_ci   * @since 7
15661847f8eSopenharmony_ci   */
15761847f8eSopenharmony_ci  /**
15861847f8eSopenharmony_ci   * Obtains an {@link AudioManager} instance.
15961847f8eSopenharmony_ci   * @returns { AudioManager } this {@link AudioManager} object.
16061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
16161847f8eSopenharmony_ci   * @crossplatform
16261847f8eSopenharmony_ci   * @since 12
16361847f8eSopenharmony_ci   */
16461847f8eSopenharmony_ci  function getAudioManager(): AudioManager;
16561847f8eSopenharmony_ci
16661847f8eSopenharmony_ci  /**
16761847f8eSopenharmony_ci   * Obtains an {@link AudioCapturer} instance.
16861847f8eSopenharmony_ci   * Success: This method uses an asynchronous callback to return the capturer instance.
16961847f8eSopenharmony_ci   * Failure: This method uses an asynchronous callback to return the error instance. Possible causes:
17061847f8eSopenharmony_ci   *          6800301: Parameter verification failed, Permission denied, System error;
17161847f8eSopenharmony_ci   *          6800101: Mandatory parameters are left unspecified, Incorrect parameter types.
17261847f8eSopenharmony_ci   * @param { AudioCapturerOptions } options - Capturer configurations.
17361847f8eSopenharmony_ci   * @param { AsyncCallback<AudioCapturer> } callback - Callback used to return the audio capturer instance.
17461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
17561847f8eSopenharmony_ci   * @since 8
17661847f8eSopenharmony_ci   */
17761847f8eSopenharmony_ci  /**
17861847f8eSopenharmony_ci   * Obtains an {@link AudioCapturer} instance. This method uses an asynchronous callback to return the capturer instance.
17961847f8eSopenharmony_ci   * @param { AudioCapturerOptions } options - Capturer configurations.
18061847f8eSopenharmony_ci   * @param { AsyncCallback<AudioCapturer> } callback - Callback used to return the audio capturer instance.
18161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
18261847f8eSopenharmony_ci   * @crossplatform
18361847f8eSopenharmony_ci   * @since 12
18461847f8eSopenharmony_ci   */
18561847f8eSopenharmony_ci  function createAudioCapturer(options: AudioCapturerOptions, callback: AsyncCallback<AudioCapturer>): void;
18661847f8eSopenharmony_ci
18761847f8eSopenharmony_ci  /**
18861847f8eSopenharmony_ci   * Obtains an {@link AudioCapturer} instance.
18961847f8eSopenharmony_ci   * Success: This method uses a promise to return the capturer instance.
19061847f8eSopenharmony_ci   * Failure: This method uses a promise to return the error instance. Possible causes:
19161847f8eSopenharmony_ci   *          6800301: Parameter verification failed, Permission denied, System error;
19261847f8eSopenharmony_ci   *          6800101: Mandatory parameters are left unspecified, Incorrect parameter types.
19361847f8eSopenharmony_ci   * @param { AudioCapturerOptions } options - Capturer configurations.
19461847f8eSopenharmony_ci   * @returns { Promise<AudioCapturer> } Promise used to return the audio capturer instance.
19561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
19661847f8eSopenharmony_ci   * @since 8
19761847f8eSopenharmony_ci   */
19861847f8eSopenharmony_ci  /**
19961847f8eSopenharmony_ci   * Obtains an {@link AudioCapturer} instance. This method uses a promise to return the capturer instance.
20061847f8eSopenharmony_ci   * @param { AudioCapturerOptions } options - Capturer configurations.
20161847f8eSopenharmony_ci   * @returns { Promise<AudioCapturer> } Promise used to return the audio capturer instance.
20261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
20361847f8eSopenharmony_ci   * @crossplatform
20461847f8eSopenharmony_ci   * @since 12
20561847f8eSopenharmony_ci   */
20661847f8eSopenharmony_ci  function createAudioCapturer(options: AudioCapturerOptions): Promise<AudioCapturer>;
20761847f8eSopenharmony_ci
20861847f8eSopenharmony_ci  /**
20961847f8eSopenharmony_ci   * Obtains an {@link AudioRenderer} instance. This method uses an asynchronous callback to return the renderer instance.
21061847f8eSopenharmony_ci   * @param { AudioRendererOptions } options - Renderer configurations.
21161847f8eSopenharmony_ci   * @param { AsyncCallback<AudioRenderer> } callback - Callback used to return the audio renderer instance.
21261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
21361847f8eSopenharmony_ci   * @since 8
21461847f8eSopenharmony_ci   */
21561847f8eSopenharmony_ci  /**
21661847f8eSopenharmony_ci   * Obtains an {@link AudioRenderer} instance. This method uses an asynchronous callback to return the renderer instance.
21761847f8eSopenharmony_ci   * @param { AudioRendererOptions } options - Renderer configurations.
21861847f8eSopenharmony_ci   * @param { AsyncCallback<AudioRenderer> } callback - Callback used to return the audio renderer instance.
21961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
22061847f8eSopenharmony_ci   * @crossplatform
22161847f8eSopenharmony_ci   * @since 12
22261847f8eSopenharmony_ci   */
22361847f8eSopenharmony_ci  function createAudioRenderer(options: AudioRendererOptions, callback: AsyncCallback<AudioRenderer>): void;
22461847f8eSopenharmony_ci
22561847f8eSopenharmony_ci  /**
22661847f8eSopenharmony_ci   * Obtains an {@link AudioRenderer} instance. This method uses a promise to return the renderer instance.
22761847f8eSopenharmony_ci   * @param { AudioRendererOptions } options - Renderer configurations.
22861847f8eSopenharmony_ci   * @returns { Promise<AudioRenderer> } Promise used to return the audio renderer instance.
22961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
23061847f8eSopenharmony_ci   * @since 8
23161847f8eSopenharmony_ci   */
23261847f8eSopenharmony_ci  /**
23361847f8eSopenharmony_ci   * Obtains an {@link AudioRenderer} instance. This method uses a promise to return the renderer instance.
23461847f8eSopenharmony_ci   * @param { AudioRendererOptions } options - Renderer configurations.
23561847f8eSopenharmony_ci   * @returns { Promise<AudioRenderer> } Promise used to return the audio renderer instance.
23661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
23761847f8eSopenharmony_ci   * @crossplatform
23861847f8eSopenharmony_ci   * @since 12
23961847f8eSopenharmony_ci   */
24061847f8eSopenharmony_ci  function createAudioRenderer(options: AudioRendererOptions): Promise<AudioRenderer>;
24161847f8eSopenharmony_ci
24261847f8eSopenharmony_ci  /**
24361847f8eSopenharmony_ci   * Obtains a {@link TonePlayer} instance. This method uses an asynchronous callback to return the renderer instance.
24461847f8eSopenharmony_ci   * @param { AudioRendererInfo } options - Tone playing attribute.
24561847f8eSopenharmony_ci   * @param { AsyncCallback<TonePlayer> } callback - Callback used to return the tonePlayer instance.
24661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Tone
24761847f8eSopenharmony_ci   * @systemapi
24861847f8eSopenharmony_ci   * @since 9
24961847f8eSopenharmony_ci   */
25061847f8eSopenharmony_ci  function createTonePlayer(options: AudioRendererInfo, callback: AsyncCallback<TonePlayer>): void;
25161847f8eSopenharmony_ci
25261847f8eSopenharmony_ci  /**
25361847f8eSopenharmony_ci   * Obtains a {@link TonePlayer} instance. This method uses a promise to return the renderer instance.
25461847f8eSopenharmony_ci   * @param { AudioRendererInfo } options - Tone playing attribute.
25561847f8eSopenharmony_ci   * @returns { Promise<TonePlayer> } Promise used to return the tonePlayer instance.
25661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Tone
25761847f8eSopenharmony_ci   * @systemapi
25861847f8eSopenharmony_ci   * @since 9
25961847f8eSopenharmony_ci   */
26061847f8eSopenharmony_ci  function createTonePlayer(options: AudioRendererInfo): Promise<TonePlayer>;
26161847f8eSopenharmony_ci
26261847f8eSopenharmony_ci  /**
26361847f8eSopenharmony_ci   * Enumerates the audio states.
26461847f8eSopenharmony_ci   * @enum { number }
26561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
26661847f8eSopenharmony_ci   * @since 8
26761847f8eSopenharmony_ci   */
26861847f8eSopenharmony_ci  /**
26961847f8eSopenharmony_ci   * Enumerates the audio states.
27061847f8eSopenharmony_ci   * @enum { number }
27161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
27261847f8eSopenharmony_ci   * @crossplatform
27361847f8eSopenharmony_ci   * @since 12
27461847f8eSopenharmony_ci   */
27561847f8eSopenharmony_ci  enum AudioState {
27661847f8eSopenharmony_ci    /**
27761847f8eSopenharmony_ci     * Invalid state.
27861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
27961847f8eSopenharmony_ci     * @since 8
28061847f8eSopenharmony_ci     */
28161847f8eSopenharmony_ci    /**
28261847f8eSopenharmony_ci     * Invalid state.
28361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
28461847f8eSopenharmony_ci     * @crossplatform
28561847f8eSopenharmony_ci     * @since 12
28661847f8eSopenharmony_ci     */
28761847f8eSopenharmony_ci    STATE_INVALID = -1,
28861847f8eSopenharmony_ci    /**
28961847f8eSopenharmony_ci     * Create new instance state.
29061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
29161847f8eSopenharmony_ci     * @since 8
29261847f8eSopenharmony_ci     */
29361847f8eSopenharmony_ci    /**
29461847f8eSopenharmony_ci     * Create new instance state.
29561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
29661847f8eSopenharmony_ci     * @crossplatform
29761847f8eSopenharmony_ci     * @since 12
29861847f8eSopenharmony_ci     */
29961847f8eSopenharmony_ci    STATE_NEW = 0,
30061847f8eSopenharmony_ci    /**
30161847f8eSopenharmony_ci     * Prepared state.
30261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
30361847f8eSopenharmony_ci     * @since 8
30461847f8eSopenharmony_ci     */
30561847f8eSopenharmony_ci    /**
30661847f8eSopenharmony_ci     * Prepared state.
30761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
30861847f8eSopenharmony_ci     * @crossplatform
30961847f8eSopenharmony_ci     * @since 12
31061847f8eSopenharmony_ci     */
31161847f8eSopenharmony_ci    STATE_PREPARED = 1,
31261847f8eSopenharmony_ci    /**
31361847f8eSopenharmony_ci     * Running state.
31461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
31561847f8eSopenharmony_ci     * @since 8
31661847f8eSopenharmony_ci     */
31761847f8eSopenharmony_ci    /**
31861847f8eSopenharmony_ci     * Running state.
31961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
32061847f8eSopenharmony_ci     * @crossplatform
32161847f8eSopenharmony_ci     * @since 12
32261847f8eSopenharmony_ci     */
32361847f8eSopenharmony_ci    STATE_RUNNING = 2,
32461847f8eSopenharmony_ci    /**
32561847f8eSopenharmony_ci     * Stopped state.
32661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
32761847f8eSopenharmony_ci     * @since 8
32861847f8eSopenharmony_ci     */
32961847f8eSopenharmony_ci    /**
33061847f8eSopenharmony_ci     * Stopped state.
33161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
33261847f8eSopenharmony_ci     * @crossplatform
33361847f8eSopenharmony_ci     * @since 12
33461847f8eSopenharmony_ci     */
33561847f8eSopenharmony_ci    STATE_STOPPED = 3,
33661847f8eSopenharmony_ci    /**
33761847f8eSopenharmony_ci     * Released state.
33861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
33961847f8eSopenharmony_ci     * @since 8
34061847f8eSopenharmony_ci     */
34161847f8eSopenharmony_ci    /**
34261847f8eSopenharmony_ci     * Released state.
34361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
34461847f8eSopenharmony_ci     * @crossplatform
34561847f8eSopenharmony_ci     * @since 12
34661847f8eSopenharmony_ci     */
34761847f8eSopenharmony_ci    STATE_RELEASED = 4,
34861847f8eSopenharmony_ci    /**
34961847f8eSopenharmony_ci     * Paused state.
35061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
35161847f8eSopenharmony_ci     * @since 8
35261847f8eSopenharmony_ci     */
35361847f8eSopenharmony_ci    /**
35461847f8eSopenharmony_ci     * Paused state.
35561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
35661847f8eSopenharmony_ci     * @crossplatform
35761847f8eSopenharmony_ci     * @since 12
35861847f8eSopenharmony_ci     */
35961847f8eSopenharmony_ci    STATE_PAUSED = 5
36061847f8eSopenharmony_ci  }
36161847f8eSopenharmony_ci
36261847f8eSopenharmony_ci  /**
36361847f8eSopenharmony_ci   * Enumerates audio stream types.
36461847f8eSopenharmony_ci   * @enum { number }
36561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
36661847f8eSopenharmony_ci   * @since 7
36761847f8eSopenharmony_ci   */
36861847f8eSopenharmony_ci  /**
36961847f8eSopenharmony_ci   * Enumerates audio stream types.
37061847f8eSopenharmony_ci   * @enum { number }
37161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
37261847f8eSopenharmony_ci   * @crossplatform
37361847f8eSopenharmony_ci   * @since 12
37461847f8eSopenharmony_ci   */
37561847f8eSopenharmony_ci  enum AudioVolumeType {
37661847f8eSopenharmony_ci    /**
37761847f8eSopenharmony_ci     * Audio streams for voice calls.
37861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
37961847f8eSopenharmony_ci     * @since 8
38061847f8eSopenharmony_ci     */
38161847f8eSopenharmony_ci    /**
38261847f8eSopenharmony_ci     * Audio streams for voice calls.
38361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
38461847f8eSopenharmony_ci     * @crossplatform
38561847f8eSopenharmony_ci     * @since 12
38661847f8eSopenharmony_ci     */
38761847f8eSopenharmony_ci    VOICE_CALL = 0,
38861847f8eSopenharmony_ci    /**
38961847f8eSopenharmony_ci     * Audio streams for ringtones.
39061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
39161847f8eSopenharmony_ci     * @since 7
39261847f8eSopenharmony_ci     */
39361847f8eSopenharmony_ci    /**
39461847f8eSopenharmony_ci     * Audio streams for ringtones.
39561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
39661847f8eSopenharmony_ci     * @crossplatform
39761847f8eSopenharmony_ci     * @since 12
39861847f8eSopenharmony_ci     */
39961847f8eSopenharmony_ci    RINGTONE = 2,
40061847f8eSopenharmony_ci    /**
40161847f8eSopenharmony_ci     * Audio streams for media purpose.
40261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
40361847f8eSopenharmony_ci     * @since 7
40461847f8eSopenharmony_ci     */
40561847f8eSopenharmony_ci    /**
40661847f8eSopenharmony_ci     * Audio streams for media purpose.
40761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
40861847f8eSopenharmony_ci     * @crossplatform
40961847f8eSopenharmony_ci     * @since 12
41061847f8eSopenharmony_ci     */
41161847f8eSopenharmony_ci    MEDIA = 3,
41261847f8eSopenharmony_ci    /**
41361847f8eSopenharmony_ci     * Audio volume for alarm purpose.
41461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
41561847f8eSopenharmony_ci     * @since 10
41661847f8eSopenharmony_ci     */
41761847f8eSopenharmony_ci    /**
41861847f8eSopenharmony_ci     * Audio volume for alarm purpose.
41961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
42061847f8eSopenharmony_ci     * @crossplatform
42161847f8eSopenharmony_ci     * @since 12
42261847f8eSopenharmony_ci     */
42361847f8eSopenharmony_ci    ALARM = 4,
42461847f8eSopenharmony_ci    /**
42561847f8eSopenharmony_ci     * Audio volume for accessibility purpose.
42661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
42761847f8eSopenharmony_ci     * @since 10
42861847f8eSopenharmony_ci     */
42961847f8eSopenharmony_ci    /**
43061847f8eSopenharmony_ci     * Audio volume for accessibility purpose.
43161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
43261847f8eSopenharmony_ci     * @crossplatform
43361847f8eSopenharmony_ci     * @since 12
43461847f8eSopenharmony_ci     */
43561847f8eSopenharmony_ci    ACCESSIBILITY = 5,
43661847f8eSopenharmony_ci    /**
43761847f8eSopenharmony_ci     * Audio stream for voice assistant.
43861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
43961847f8eSopenharmony_ci     * @since 8
44061847f8eSopenharmony_ci     */
44161847f8eSopenharmony_ci    VOICE_ASSISTANT = 9,
44261847f8eSopenharmony_ci    /**
44361847f8eSopenharmony_ci     * Audio volume for ultrasonic.
44461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
44561847f8eSopenharmony_ci     * @systemapi
44661847f8eSopenharmony_ci     * @since 10
44761847f8eSopenharmony_ci     */
44861847f8eSopenharmony_ci    ULTRASONIC = 10,
44961847f8eSopenharmony_ci    /**
45061847f8eSopenharmony_ci     * Audio stream for all common.
45161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
45261847f8eSopenharmony_ci     * @systemapi
45361847f8eSopenharmony_ci     * @since 9
45461847f8eSopenharmony_ci     */
45561847f8eSopenharmony_ci    ALL = 100,
45661847f8eSopenharmony_ci  }
45761847f8eSopenharmony_ci
45861847f8eSopenharmony_ci  /**
45961847f8eSopenharmony_ci   * Enumerates audio device flags.
46061847f8eSopenharmony_ci   * @enum { number }
46161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
46261847f8eSopenharmony_ci   * @since 7
46361847f8eSopenharmony_ci   */
46461847f8eSopenharmony_ci  /**
46561847f8eSopenharmony_ci   * Enumerates audio device flags.
46661847f8eSopenharmony_ci   * @enum { number }
46761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
46861847f8eSopenharmony_ci   * @crossplatform
46961847f8eSopenharmony_ci   * @since 12
47061847f8eSopenharmony_ci   */
47161847f8eSopenharmony_ci  enum DeviceFlag {
47261847f8eSopenharmony_ci    /**
47361847f8eSopenharmony_ci     * None devices.
47461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
47561847f8eSopenharmony_ci     * @systemapi
47661847f8eSopenharmony_ci     * @since 9
47761847f8eSopenharmony_ci     */
47861847f8eSopenharmony_ci    NONE_DEVICES_FLAG = 0,
47961847f8eSopenharmony_ci    /**
48061847f8eSopenharmony_ci     * Output devices.
48161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
48261847f8eSopenharmony_ci     * @since 7
48361847f8eSopenharmony_ci     */
48461847f8eSopenharmony_ci    /**
48561847f8eSopenharmony_ci     * Output devices.
48661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
48761847f8eSopenharmony_ci     * @crossplatform
48861847f8eSopenharmony_ci     * @since 12
48961847f8eSopenharmony_ci     */
49061847f8eSopenharmony_ci    OUTPUT_DEVICES_FLAG = 1,
49161847f8eSopenharmony_ci    /**
49261847f8eSopenharmony_ci     * Input devices.
49361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
49461847f8eSopenharmony_ci     * @since 7
49561847f8eSopenharmony_ci     */
49661847f8eSopenharmony_ci    /**
49761847f8eSopenharmony_ci     * Input devices.
49861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
49961847f8eSopenharmony_ci     * @crossplatform
50061847f8eSopenharmony_ci     * @since 12
50161847f8eSopenharmony_ci     */
50261847f8eSopenharmony_ci    INPUT_DEVICES_FLAG = 2,
50361847f8eSopenharmony_ci    /**
50461847f8eSopenharmony_ci     * All devices.
50561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
50661847f8eSopenharmony_ci     * @since 7
50761847f8eSopenharmony_ci     */
50861847f8eSopenharmony_ci    /**
50961847f8eSopenharmony_ci     * All devices.
51061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
51161847f8eSopenharmony_ci     * @crossplatform
51261847f8eSopenharmony_ci     * @since 12
51361847f8eSopenharmony_ci     */
51461847f8eSopenharmony_ci    ALL_DEVICES_FLAG = 3,
51561847f8eSopenharmony_ci    /**
51661847f8eSopenharmony_ci     * Distributed output devices.
51761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
51861847f8eSopenharmony_ci     * @systemapi
51961847f8eSopenharmony_ci     * @since 9
52061847f8eSopenharmony_ci     */
52161847f8eSopenharmony_ci    DISTRIBUTED_OUTPUT_DEVICES_FLAG = 4,
52261847f8eSopenharmony_ci    /**
52361847f8eSopenharmony_ci     * Distributed input devices.
52461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
52561847f8eSopenharmony_ci     * @systemapi
52661847f8eSopenharmony_ci     * @since 9
52761847f8eSopenharmony_ci     */
52861847f8eSopenharmony_ci    DISTRIBUTED_INPUT_DEVICES_FLAG = 8,
52961847f8eSopenharmony_ci    /**
53061847f8eSopenharmony_ci     * All Distributed devices.
53161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
53261847f8eSopenharmony_ci     * @systemapi
53361847f8eSopenharmony_ci     * @since 9
53461847f8eSopenharmony_ci     */
53561847f8eSopenharmony_ci    ALL_DISTRIBUTED_DEVICES_FLAG = 12,
53661847f8eSopenharmony_ci  }
53761847f8eSopenharmony_ci
53861847f8eSopenharmony_ci  /**
53961847f8eSopenharmony_ci   * Enumerates audio device for usage.
54061847f8eSopenharmony_ci   * @enum { number }
54161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
54261847f8eSopenharmony_ci   * @since 12
54361847f8eSopenharmony_ci   */
54461847f8eSopenharmony_ci  enum DeviceUsage {
54561847f8eSopenharmony_ci    /**
54661847f8eSopenharmony_ci     * Media output devices.
54761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
54861847f8eSopenharmony_ci     * @since 12
54961847f8eSopenharmony_ci     */
55061847f8eSopenharmony_ci    MEDIA_OUTPUT_DEVICES = 1,
55161847f8eSopenharmony_ci    /**
55261847f8eSopenharmony_ci     * Media input devices.
55361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
55461847f8eSopenharmony_ci     * @since 12
55561847f8eSopenharmony_ci     */
55661847f8eSopenharmony_ci    MEDIA_INPUT_DEVICES = 2,
55761847f8eSopenharmony_ci    /**
55861847f8eSopenharmony_ci     * All media devices.
55961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
56061847f8eSopenharmony_ci     * @since 12
56161847f8eSopenharmony_ci     */
56261847f8eSopenharmony_ci    ALL_MEDIA_DEVICES = 3,
56361847f8eSopenharmony_ci    /**
56461847f8eSopenharmony_ci     * Call output devices.
56561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
56661847f8eSopenharmony_ci     * @since 12
56761847f8eSopenharmony_ci     */
56861847f8eSopenharmony_ci    CALL_OUTPUT_DEVICES = 4,
56961847f8eSopenharmony_ci    /**
57061847f8eSopenharmony_ci     * Call input devices.
57161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
57261847f8eSopenharmony_ci     * @since 12
57361847f8eSopenharmony_ci     */
57461847f8eSopenharmony_ci    CALL_INPUT_DEVICES = 8,
57561847f8eSopenharmony_ci    /**
57661847f8eSopenharmony_ci     * All call devices.
57761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
57861847f8eSopenharmony_ci     * @since 12
57961847f8eSopenharmony_ci     */
58061847f8eSopenharmony_ci    ALL_CALL_DEVICES = 12,
58161847f8eSopenharmony_ci  }
58261847f8eSopenharmony_ci
58361847f8eSopenharmony_ci  /**
58461847f8eSopenharmony_ci   * Enumerates device roles.
58561847f8eSopenharmony_ci   * @enum { number }
58661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
58761847f8eSopenharmony_ci   * @since 7
58861847f8eSopenharmony_ci   */
58961847f8eSopenharmony_ci  /**
59061847f8eSopenharmony_ci   * Enumerates device roles.
59161847f8eSopenharmony_ci   * @enum { number }
59261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
59361847f8eSopenharmony_ci   * @crossplatform
59461847f8eSopenharmony_ci   * @atomicservice
59561847f8eSopenharmony_ci   * @since 12
59661847f8eSopenharmony_ci   */
59761847f8eSopenharmony_ci  enum DeviceRole {
59861847f8eSopenharmony_ci    /**
59961847f8eSopenharmony_ci     * Input role.
60061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
60161847f8eSopenharmony_ci     * @since 7
60261847f8eSopenharmony_ci     */
60361847f8eSopenharmony_ci    /**
60461847f8eSopenharmony_ci     * Input role.
60561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
60661847f8eSopenharmony_ci     * @crossplatform
60761847f8eSopenharmony_ci     * @atomicservice
60861847f8eSopenharmony_ci     * @since 12
60961847f8eSopenharmony_ci     */
61061847f8eSopenharmony_ci    INPUT_DEVICE = 1,
61161847f8eSopenharmony_ci    /**
61261847f8eSopenharmony_ci     * Output role.
61361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
61461847f8eSopenharmony_ci     * @since 7
61561847f8eSopenharmony_ci     */
61661847f8eSopenharmony_ci    /**
61761847f8eSopenharmony_ci     * Output role.
61861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
61961847f8eSopenharmony_ci     * @crossplatform
62061847f8eSopenharmony_ci     * @atomicservice
62161847f8eSopenharmony_ci     * @since 12
62261847f8eSopenharmony_ci     */
62361847f8eSopenharmony_ci    OUTPUT_DEVICE = 2,
62461847f8eSopenharmony_ci  }
62561847f8eSopenharmony_ci
62661847f8eSopenharmony_ci  /**
62761847f8eSopenharmony_ci   * Enumerates device types.
62861847f8eSopenharmony_ci   * @enum { number }
62961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
63061847f8eSopenharmony_ci   * @since 7
63161847f8eSopenharmony_ci   */
63261847f8eSopenharmony_ci  /**
63361847f8eSopenharmony_ci   * Enumerates device types.
63461847f8eSopenharmony_ci   * @enum { number }
63561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
63661847f8eSopenharmony_ci   * @crossplatform
63761847f8eSopenharmony_ci   * @atomicservice
63861847f8eSopenharmony_ci   * @since 12
63961847f8eSopenharmony_ci   */
64061847f8eSopenharmony_ci  enum DeviceType {
64161847f8eSopenharmony_ci    /**
64261847f8eSopenharmony_ci     * Invalid device.
64361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
64461847f8eSopenharmony_ci     * @since 7
64561847f8eSopenharmony_ci     */
64661847f8eSopenharmony_ci    /**
64761847f8eSopenharmony_ci     * Invalid device.
64861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
64961847f8eSopenharmony_ci     * @crossplatform
65061847f8eSopenharmony_ci     * @atomicservice
65161847f8eSopenharmony_ci     * @since 12
65261847f8eSopenharmony_ci     */
65361847f8eSopenharmony_ci    INVALID = 0,
65461847f8eSopenharmony_ci    /**
65561847f8eSopenharmony_ci     * Built-in earpiece.
65661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
65761847f8eSopenharmony_ci     * @since 7
65861847f8eSopenharmony_ci     */
65961847f8eSopenharmony_ci    /**
66061847f8eSopenharmony_ci     * Built-in earpiece.
66161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
66261847f8eSopenharmony_ci     * @crossplatform
66361847f8eSopenharmony_ci     * @atomicservice
66461847f8eSopenharmony_ci     * @since 12
66561847f8eSopenharmony_ci     */
66661847f8eSopenharmony_ci    EARPIECE = 1,
66761847f8eSopenharmony_ci    /**
66861847f8eSopenharmony_ci     * Built-in speaker.
66961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
67061847f8eSopenharmony_ci     * @since 7
67161847f8eSopenharmony_ci     */
67261847f8eSopenharmony_ci    /**
67361847f8eSopenharmony_ci     * Built-in speaker.
67461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
67561847f8eSopenharmony_ci     * @crossplatform
67661847f8eSopenharmony_ci     * @atomicservice
67761847f8eSopenharmony_ci     * @since 12
67861847f8eSopenharmony_ci     */
67961847f8eSopenharmony_ci    SPEAKER = 2,
68061847f8eSopenharmony_ci    /**
68161847f8eSopenharmony_ci     * Wired headset, which is a combination of a pair of earpieces and a microphone.
68261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
68361847f8eSopenharmony_ci     * @since 7
68461847f8eSopenharmony_ci     */
68561847f8eSopenharmony_ci    /**
68661847f8eSopenharmony_ci     * Wired headset, which is a combination of a pair of earpieces and a microphone.
68761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
68861847f8eSopenharmony_ci     * @crossplatform
68961847f8eSopenharmony_ci     * @atomicservice
69061847f8eSopenharmony_ci     * @since 12
69161847f8eSopenharmony_ci     */
69261847f8eSopenharmony_ci    WIRED_HEADSET = 3,
69361847f8eSopenharmony_ci    /**
69461847f8eSopenharmony_ci     * A pair of wired headphones.
69561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
69661847f8eSopenharmony_ci     * @since 7
69761847f8eSopenharmony_ci     */
69861847f8eSopenharmony_ci    /**
69961847f8eSopenharmony_ci     * A pair of wired headphones.
70061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
70161847f8eSopenharmony_ci     * @crossplatform
70261847f8eSopenharmony_ci     * @atomicservice
70361847f8eSopenharmony_ci     * @since 12
70461847f8eSopenharmony_ci     */
70561847f8eSopenharmony_ci    WIRED_HEADPHONES = 4,
70661847f8eSopenharmony_ci    /**
70761847f8eSopenharmony_ci     * Bluetooth device using the synchronous connection oriented link (SCO).
70861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
70961847f8eSopenharmony_ci     * @since 7
71061847f8eSopenharmony_ci     */
71161847f8eSopenharmony_ci    /**
71261847f8eSopenharmony_ci     * Bluetooth device using the synchronous connection oriented link (SCO).
71361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
71461847f8eSopenharmony_ci     * @crossplatform
71561847f8eSopenharmony_ci     * @atomicservice
71661847f8eSopenharmony_ci     * @since 12
71761847f8eSopenharmony_ci     */
71861847f8eSopenharmony_ci    BLUETOOTH_SCO = 7,
71961847f8eSopenharmony_ci    /**
72061847f8eSopenharmony_ci     * Bluetooth device using advanced audio distribution profile (A2DP).
72161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
72261847f8eSopenharmony_ci     * @since 7
72361847f8eSopenharmony_ci     */
72461847f8eSopenharmony_ci    /**
72561847f8eSopenharmony_ci     * Bluetooth device using advanced audio distribution profile (A2DP).
72661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
72761847f8eSopenharmony_ci     * @crossplatform
72861847f8eSopenharmony_ci     * @atomicservice
72961847f8eSopenharmony_ci     * @since 12
73061847f8eSopenharmony_ci     */
73161847f8eSopenharmony_ci    BLUETOOTH_A2DP = 8,
73261847f8eSopenharmony_ci    /**
73361847f8eSopenharmony_ci     * Built-in microphone.
73461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
73561847f8eSopenharmony_ci     * @since 7
73661847f8eSopenharmony_ci     */
73761847f8eSopenharmony_ci    /**
73861847f8eSopenharmony_ci     * Built-in microphone.
73961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
74061847f8eSopenharmony_ci     * @crossplatform
74161847f8eSopenharmony_ci     * @atomicservice
74261847f8eSopenharmony_ci     * @since 12
74361847f8eSopenharmony_ci     */
74461847f8eSopenharmony_ci    MIC = 15,
74561847f8eSopenharmony_ci    /**
74661847f8eSopenharmony_ci     * USB audio headset.
74761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
74861847f8eSopenharmony_ci     * @since 7
74961847f8eSopenharmony_ci     */
75061847f8eSopenharmony_ci    /**
75161847f8eSopenharmony_ci     * USB audio headset.
75261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
75361847f8eSopenharmony_ci     * @crossplatform
75461847f8eSopenharmony_ci     * @atomicservice
75561847f8eSopenharmony_ci     * @since 12
75661847f8eSopenharmony_ci     */
75761847f8eSopenharmony_ci    USB_HEADSET = 22,
75861847f8eSopenharmony_ci    /**
75961847f8eSopenharmony_ci     * Display port device.
76061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
76161847f8eSopenharmony_ci     * @atomicservice
76261847f8eSopenharmony_ci     * @since 12
76361847f8eSopenharmony_ci     */
76461847f8eSopenharmony_ci    DISPLAY_PORT = 23,
76561847f8eSopenharmony_ci    /**
76661847f8eSopenharmony_ci     * Device type for rerouting audio to other remote devices by system application
76761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
76861847f8eSopenharmony_ci     * @atomicservice
76961847f8eSopenharmony_ci     * @since 12
77061847f8eSopenharmony_ci     */
77161847f8eSopenharmony_ci    REMOTE_CAST = 24,
77261847f8eSopenharmony_ci    /**
77361847f8eSopenharmony_ci     * Default device type.
77461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
77561847f8eSopenharmony_ci     * @since 9
77661847f8eSopenharmony_ci     */
77761847f8eSopenharmony_ci    /**
77861847f8eSopenharmony_ci     * Default device type.
77961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
78061847f8eSopenharmony_ci     * @crossplatform
78161847f8eSopenharmony_ci     * @atomicservice
78261847f8eSopenharmony_ci     * @since 12
78361847f8eSopenharmony_ci     */
78461847f8eSopenharmony_ci    DEFAULT = 1000,
78561847f8eSopenharmony_ci  }
78661847f8eSopenharmony_ci
78761847f8eSopenharmony_ci  /**
78861847f8eSopenharmony_ci   * Enumerates the active device types.
78961847f8eSopenharmony_ci   * @enum { number }
79061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
79161847f8eSopenharmony_ci   * @since 7
79261847f8eSopenharmony_ci   * @deprecated since 9
79361847f8eSopenharmony_ci   * @useinstead ohos.multimedia.audio.CommunicationDeviceType
79461847f8eSopenharmony_ci   */
79561847f8eSopenharmony_ci  enum ActiveDeviceType {
79661847f8eSopenharmony_ci    /**
79761847f8eSopenharmony_ci     * Speaker.
79861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
79961847f8eSopenharmony_ci     * @since 7
80061847f8eSopenharmony_ci     * @deprecated since 9
80161847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.CommunicationDeviceType.SPEAKER
80261847f8eSopenharmony_ci     */
80361847f8eSopenharmony_ci    SPEAKER = 2,
80461847f8eSopenharmony_ci    /**
80561847f8eSopenharmony_ci     * Bluetooth device using the SCO link.
80661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
80761847f8eSopenharmony_ci     * @since 7
80861847f8eSopenharmony_ci     * @deprecated since 9
80961847f8eSopenharmony_ci     */
81061847f8eSopenharmony_ci    BLUETOOTH_SCO = 7,
81161847f8eSopenharmony_ci  }
81261847f8eSopenharmony_ci
81361847f8eSopenharmony_ci  /**
81461847f8eSopenharmony_ci   * Enumerates the available device types for communication.
81561847f8eSopenharmony_ci   * @enum { number }
81661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Communication
81761847f8eSopenharmony_ci   * @since 9
81861847f8eSopenharmony_ci   */
81961847f8eSopenharmony_ci  /**
82061847f8eSopenharmony_ci   * Enumerates the available device types for communication.
82161847f8eSopenharmony_ci   * @enum { number }
82261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Communication
82361847f8eSopenharmony_ci   * @crossplatform
82461847f8eSopenharmony_ci   * @since 12
82561847f8eSopenharmony_ci   */
82661847f8eSopenharmony_ci  enum CommunicationDeviceType {
82761847f8eSopenharmony_ci    /**
82861847f8eSopenharmony_ci     * Speaker.
82961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
83061847f8eSopenharmony_ci     * @since 9
83161847f8eSopenharmony_ci     */
83261847f8eSopenharmony_ci    /**
83361847f8eSopenharmony_ci     * Speaker.
83461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
83561847f8eSopenharmony_ci     * @crossplatform
83661847f8eSopenharmony_ci     * @since 12
83761847f8eSopenharmony_ci     */
83861847f8eSopenharmony_ci    SPEAKER = 2
83961847f8eSopenharmony_ci  }
84061847f8eSopenharmony_ci
84161847f8eSopenharmony_ci  /**
84261847f8eSopenharmony_ci   * Enumerates ringer modes.
84361847f8eSopenharmony_ci   * @enum { number }
84461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Communication
84561847f8eSopenharmony_ci   * @since 7
84661847f8eSopenharmony_ci   */
84761847f8eSopenharmony_ci  /**
84861847f8eSopenharmony_ci   * Enumerates ringer modes.
84961847f8eSopenharmony_ci   * @enum { number }
85061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Communication
85161847f8eSopenharmony_ci   * @crossplatform
85261847f8eSopenharmony_ci   * @since 12
85361847f8eSopenharmony_ci   */
85461847f8eSopenharmony_ci  enum AudioRingMode {
85561847f8eSopenharmony_ci    /**
85661847f8eSopenharmony_ci     * Silent mode.
85761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
85861847f8eSopenharmony_ci     * @since 7
85961847f8eSopenharmony_ci     */
86061847f8eSopenharmony_ci    /**
86161847f8eSopenharmony_ci     * Silent mode.
86261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
86361847f8eSopenharmony_ci     * @crossplatform
86461847f8eSopenharmony_ci     * @since 12
86561847f8eSopenharmony_ci     */
86661847f8eSopenharmony_ci    RINGER_MODE_SILENT = 0,
86761847f8eSopenharmony_ci    /**
86861847f8eSopenharmony_ci     * Vibration mode.
86961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
87061847f8eSopenharmony_ci     * @since 7
87161847f8eSopenharmony_ci     */
87261847f8eSopenharmony_ci    /**
87361847f8eSopenharmony_ci     * Vibration mode.
87461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
87561847f8eSopenharmony_ci     * @crossplatform
87661847f8eSopenharmony_ci     * @since 12
87761847f8eSopenharmony_ci     */
87861847f8eSopenharmony_ci    RINGER_MODE_VIBRATE = 1,
87961847f8eSopenharmony_ci    /**
88061847f8eSopenharmony_ci     * Normal mode.
88161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
88261847f8eSopenharmony_ci     * @since 7
88361847f8eSopenharmony_ci     */
88461847f8eSopenharmony_ci    /**
88561847f8eSopenharmony_ci     * Normal mode.
88661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
88761847f8eSopenharmony_ci     * @crossplatform
88861847f8eSopenharmony_ci     * @since 12
88961847f8eSopenharmony_ci     */
89061847f8eSopenharmony_ci    RINGER_MODE_NORMAL = 2,
89161847f8eSopenharmony_ci  }
89261847f8eSopenharmony_ci
89361847f8eSopenharmony_ci  /**
89461847f8eSopenharmony_ci   * Enumerates type.
89561847f8eSopenharmony_ci   * @enum { number }
89661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
89761847f8eSopenharmony_ci   * @systemapi
89861847f8eSopenharmony_ci   * @since 12
89961847f8eSopenharmony_ci   */
90061847f8eSopenharmony_ci  enum PolicyType {
90161847f8eSopenharmony_ci    /**
90261847f8eSopenharmony_ci     * EDM type.
90361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
90461847f8eSopenharmony_ci     * @systemapi
90561847f8eSopenharmony_ci     * @since 12
90661847f8eSopenharmony_ci     */
90761847f8eSopenharmony_ci    EDM = 0,
90861847f8eSopenharmony_ci    /**
90961847f8eSopenharmony_ci     * PRIVACY type.
91061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
91161847f8eSopenharmony_ci     * @systemapi
91261847f8eSopenharmony_ci     * @since 12
91361847f8eSopenharmony_ci     */
91461847f8eSopenharmony_ci    PRIVACY = 1,
91561847f8eSopenharmony_ci  }
91661847f8eSopenharmony_ci
91761847f8eSopenharmony_ci  /**
91861847f8eSopenharmony_ci   * Enumerates the audio sample formats.
91961847f8eSopenharmony_ci   * @enum { number }
92061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
92161847f8eSopenharmony_ci   * @since 8
92261847f8eSopenharmony_ci   */
92361847f8eSopenharmony_ci  /**
92461847f8eSopenharmony_ci   * Enumerates the audio sample formats.
92561847f8eSopenharmony_ci   * @enum { number }
92661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
92761847f8eSopenharmony_ci   * @crossplatform
92861847f8eSopenharmony_ci   * @since 12
92961847f8eSopenharmony_ci   */
93061847f8eSopenharmony_ci  enum AudioSampleFormat {
93161847f8eSopenharmony_ci    /**
93261847f8eSopenharmony_ci     * Invalid format.
93361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
93461847f8eSopenharmony_ci     * @since 8
93561847f8eSopenharmony_ci     */
93661847f8eSopenharmony_ci    /**
93761847f8eSopenharmony_ci     * Invalid format.
93861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
93961847f8eSopenharmony_ci     * @crossplatform
94061847f8eSopenharmony_ci     * @since 12
94161847f8eSopenharmony_ci     */
94261847f8eSopenharmony_ci    SAMPLE_FORMAT_INVALID = -1,
94361847f8eSopenharmony_ci    /**
94461847f8eSopenharmony_ci     * Unsigned 8 format.
94561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
94661847f8eSopenharmony_ci     * @since 8
94761847f8eSopenharmony_ci     */
94861847f8eSopenharmony_ci    /**
94961847f8eSopenharmony_ci     * Unsigned 8 format.
95061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
95161847f8eSopenharmony_ci     * @crossplatform
95261847f8eSopenharmony_ci     * @since 12
95361847f8eSopenharmony_ci     */
95461847f8eSopenharmony_ci    SAMPLE_FORMAT_U8 = 0,
95561847f8eSopenharmony_ci    /**
95661847f8eSopenharmony_ci     * Signed 16 bit integer, little endian.
95761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
95861847f8eSopenharmony_ci     * @since 8
95961847f8eSopenharmony_ci     */
96061847f8eSopenharmony_ci    /**
96161847f8eSopenharmony_ci     * Signed 16 bit integer, little endian.
96261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
96361847f8eSopenharmony_ci     * @crossplatform
96461847f8eSopenharmony_ci     * @since 12
96561847f8eSopenharmony_ci     */
96661847f8eSopenharmony_ci    SAMPLE_FORMAT_S16LE = 1,
96761847f8eSopenharmony_ci    /**
96861847f8eSopenharmony_ci     * Signed 24 bit integer, little endian.
96961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
97061847f8eSopenharmony_ci     * @since 8
97161847f8eSopenharmony_ci     */
97261847f8eSopenharmony_ci    /**
97361847f8eSopenharmony_ci     * Signed 24 bit integer, little endian.
97461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
97561847f8eSopenharmony_ci     * @crossplatform
97661847f8eSopenharmony_ci     * @since 12
97761847f8eSopenharmony_ci     */
97861847f8eSopenharmony_ci    SAMPLE_FORMAT_S24LE = 2,
97961847f8eSopenharmony_ci    /**
98061847f8eSopenharmony_ci     * Signed 32 bit integer, little endian.
98161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
98261847f8eSopenharmony_ci     * @since 8
98361847f8eSopenharmony_ci     */
98461847f8eSopenharmony_ci    /**
98561847f8eSopenharmony_ci     * Signed 32 bit integer, little endian.
98661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
98761847f8eSopenharmony_ci     * @crossplatform
98861847f8eSopenharmony_ci     * @since 12
98961847f8eSopenharmony_ci     */
99061847f8eSopenharmony_ci    SAMPLE_FORMAT_S32LE = 3,
99161847f8eSopenharmony_ci    /**
99261847f8eSopenharmony_ci     * Signed 32 bit float, little endian.
99361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
99461847f8eSopenharmony_ci     * @since 9
99561847f8eSopenharmony_ci     */
99661847f8eSopenharmony_ci    /**
99761847f8eSopenharmony_ci     * Signed 32 bit float, little endian.
99861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
99961847f8eSopenharmony_ci     * @crossplatform
100061847f8eSopenharmony_ci     * @since 12
100161847f8eSopenharmony_ci     */
100261847f8eSopenharmony_ci    SAMPLE_FORMAT_F32LE = 4,
100361847f8eSopenharmony_ci  }
100461847f8eSopenharmony_ci
100561847f8eSopenharmony_ci  /**
100661847f8eSopenharmony_ci   * Enumerates the audio channel.
100761847f8eSopenharmony_ci   * @enum { number }
100861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
100961847f8eSopenharmony_ci   * @since 8
101061847f8eSopenharmony_ci   */
101161847f8eSopenharmony_ci  /**
101261847f8eSopenharmony_ci   * Enumerates the audio channel.
101361847f8eSopenharmony_ci   * @enum { number }
101461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
101561847f8eSopenharmony_ci   * @crossplatform
101661847f8eSopenharmony_ci   * @since 12
101761847f8eSopenharmony_ci   */
101861847f8eSopenharmony_ci  enum AudioChannel {
101961847f8eSopenharmony_ci    /**
102061847f8eSopenharmony_ci     * Channel 1.
102161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
102261847f8eSopenharmony_ci     * @since 8
102361847f8eSopenharmony_ci     */
102461847f8eSopenharmony_ci    /**
102561847f8eSopenharmony_ci     * Channel 1.
102661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
102761847f8eSopenharmony_ci     * @crossplatform
102861847f8eSopenharmony_ci     * @since 12
102961847f8eSopenharmony_ci     */
103061847f8eSopenharmony_ci    CHANNEL_1 = 0x1 << 0,
103161847f8eSopenharmony_ci    /**
103261847f8eSopenharmony_ci     * Channel 2.
103361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
103461847f8eSopenharmony_ci     * @since 8
103561847f8eSopenharmony_ci     */
103661847f8eSopenharmony_ci    /**
103761847f8eSopenharmony_ci     * Channel 2.
103861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
103961847f8eSopenharmony_ci     * @crossplatform
104061847f8eSopenharmony_ci     * @since 12
104161847f8eSopenharmony_ci     */
104261847f8eSopenharmony_ci    CHANNEL_2 = 0x1 << 1,
104361847f8eSopenharmony_ci    /**
104461847f8eSopenharmony_ci     * Channel 3.
104561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
104661847f8eSopenharmony_ci     * @since 11
104761847f8eSopenharmony_ci     */
104861847f8eSopenharmony_ci    /**
104961847f8eSopenharmony_ci     * Channel 3.
105061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
105161847f8eSopenharmony_ci     * @crossplatform
105261847f8eSopenharmony_ci     * @since 12
105361847f8eSopenharmony_ci     */
105461847f8eSopenharmony_ci    CHANNEL_3 = 3,
105561847f8eSopenharmony_ci    /**
105661847f8eSopenharmony_ci     * Channel 4.
105761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
105861847f8eSopenharmony_ci     * @since 11
105961847f8eSopenharmony_ci     */
106061847f8eSopenharmony_ci    /**
106161847f8eSopenharmony_ci     * Channel 4.
106261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
106361847f8eSopenharmony_ci     * @crossplatform
106461847f8eSopenharmony_ci     * @since 12
106561847f8eSopenharmony_ci     */
106661847f8eSopenharmony_ci    CHANNEL_4 = 4,
106761847f8eSopenharmony_ci    /**
106861847f8eSopenharmony_ci     * Channel 5.
106961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
107061847f8eSopenharmony_ci     * @since 11
107161847f8eSopenharmony_ci     */
107261847f8eSopenharmony_ci    /**
107361847f8eSopenharmony_ci     * Channel 5.
107461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
107561847f8eSopenharmony_ci     * @crossplatform
107661847f8eSopenharmony_ci     * @since 12
107761847f8eSopenharmony_ci     */
107861847f8eSopenharmony_ci    CHANNEL_5 = 5,
107961847f8eSopenharmony_ci    /**
108061847f8eSopenharmony_ci     * Channel 6.
108161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
108261847f8eSopenharmony_ci     * @since 11
108361847f8eSopenharmony_ci     */
108461847f8eSopenharmony_ci    /**
108561847f8eSopenharmony_ci     * Channel 6.
108661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
108761847f8eSopenharmony_ci     * @crossplatform
108861847f8eSopenharmony_ci     * @since 12
108961847f8eSopenharmony_ci     */
109061847f8eSopenharmony_ci    CHANNEL_6 = 6,
109161847f8eSopenharmony_ci    /**
109261847f8eSopenharmony_ci     * Channel 7.
109361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
109461847f8eSopenharmony_ci     * @since 11
109561847f8eSopenharmony_ci     */
109661847f8eSopenharmony_ci    /**
109761847f8eSopenharmony_ci     * Channel 7.
109861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
109961847f8eSopenharmony_ci     * @crossplatform
110061847f8eSopenharmony_ci     * @since 12
110161847f8eSopenharmony_ci     */
110261847f8eSopenharmony_ci    CHANNEL_7 = 7,
110361847f8eSopenharmony_ci    /**
110461847f8eSopenharmony_ci     * Channel 8.
110561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
110661847f8eSopenharmony_ci     * @since 11
110761847f8eSopenharmony_ci     */
110861847f8eSopenharmony_ci    /**
110961847f8eSopenharmony_ci     * Channel 8.
111061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
111161847f8eSopenharmony_ci     * @crossplatform
111261847f8eSopenharmony_ci     * @since 12
111361847f8eSopenharmony_ci     */
111461847f8eSopenharmony_ci    CHANNEL_8 = 8,
111561847f8eSopenharmony_ci    /**
111661847f8eSopenharmony_ci     * Channel 9.
111761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
111861847f8eSopenharmony_ci     * @since 11
111961847f8eSopenharmony_ci     */
112061847f8eSopenharmony_ci    /**
112161847f8eSopenharmony_ci     * Channel 9.
112261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
112361847f8eSopenharmony_ci     * @crossplatform
112461847f8eSopenharmony_ci     * @since 12
112561847f8eSopenharmony_ci     */
112661847f8eSopenharmony_ci    CHANNEL_9 = 9,
112761847f8eSopenharmony_ci    /**
112861847f8eSopenharmony_ci     * Channel 10.
112961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
113061847f8eSopenharmony_ci     * @since 11
113161847f8eSopenharmony_ci     */
113261847f8eSopenharmony_ci    /**
113361847f8eSopenharmony_ci     * Channel 10.
113461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
113561847f8eSopenharmony_ci     * @crossplatform
113661847f8eSopenharmony_ci     * @since 12
113761847f8eSopenharmony_ci     */
113861847f8eSopenharmony_ci    CHANNEL_10 = 10,
113961847f8eSopenharmony_ci    /**
114061847f8eSopenharmony_ci     * Channel 12.
114161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
114261847f8eSopenharmony_ci     * @since 11
114361847f8eSopenharmony_ci     */
114461847f8eSopenharmony_ci    /**
114561847f8eSopenharmony_ci     * Channel 12.
114661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
114761847f8eSopenharmony_ci     * @crossplatform
114861847f8eSopenharmony_ci     * @since 12
114961847f8eSopenharmony_ci     */
115061847f8eSopenharmony_ci    CHANNEL_12 = 12,
115161847f8eSopenharmony_ci    /**
115261847f8eSopenharmony_ci     * Channel 14.
115361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
115461847f8eSopenharmony_ci     * @since 11
115561847f8eSopenharmony_ci     */
115661847f8eSopenharmony_ci    /**
115761847f8eSopenharmony_ci     * Channel 14.
115861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
115961847f8eSopenharmony_ci     * @crossplatform
116061847f8eSopenharmony_ci     * @since 12
116161847f8eSopenharmony_ci     */
116261847f8eSopenharmony_ci    CHANNEL_14 = 14,
116361847f8eSopenharmony_ci    /**
116461847f8eSopenharmony_ci     * Channel 16.
116561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
116661847f8eSopenharmony_ci     * @since 11
116761847f8eSopenharmony_ci     */
116861847f8eSopenharmony_ci    /**
116961847f8eSopenharmony_ci     * Channel 16.
117061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
117161847f8eSopenharmony_ci     * @crossplatform
117261847f8eSopenharmony_ci     * @since 12
117361847f8eSopenharmony_ci     */
117461847f8eSopenharmony_ci    CHANNEL_16 = 16
117561847f8eSopenharmony_ci  }
117661847f8eSopenharmony_ci
117761847f8eSopenharmony_ci  /**
117861847f8eSopenharmony_ci   * Enumerates the audio sampling rate.
117961847f8eSopenharmony_ci   * @enum { number }
118061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
118161847f8eSopenharmony_ci   * @since 8
118261847f8eSopenharmony_ci   */
118361847f8eSopenharmony_ci  /**
118461847f8eSopenharmony_ci   * Enumerates the audio sampling rate.
118561847f8eSopenharmony_ci   * @enum { number }
118661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
118761847f8eSopenharmony_ci   * @crossplatform
118861847f8eSopenharmony_ci   * @since 12
118961847f8eSopenharmony_ci   */
119061847f8eSopenharmony_ci  enum AudioSamplingRate {
119161847f8eSopenharmony_ci    /**
119261847f8eSopenharmony_ci     * 8kHz sample rate.
119361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
119461847f8eSopenharmony_ci     * @since 8
119561847f8eSopenharmony_ci     */
119661847f8eSopenharmony_ci    /**
119761847f8eSopenharmony_ci     * 8kHz sample rate.
119861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
119961847f8eSopenharmony_ci     * @crossplatform
120061847f8eSopenharmony_ci     * @since 12
120161847f8eSopenharmony_ci     */
120261847f8eSopenharmony_ci    SAMPLE_RATE_8000 = 8000,
120361847f8eSopenharmony_ci    /**
120461847f8eSopenharmony_ci     * 11.025kHz sample rate.
120561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
120661847f8eSopenharmony_ci     * @since 8
120761847f8eSopenharmony_ci     */
120861847f8eSopenharmony_ci    /**
120961847f8eSopenharmony_ci     * 11.025kHz sample rate.
121061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
121161847f8eSopenharmony_ci     * @crossplatform
121261847f8eSopenharmony_ci     * @since 12
121361847f8eSopenharmony_ci     */
121461847f8eSopenharmony_ci    SAMPLE_RATE_11025 = 11025,
121561847f8eSopenharmony_ci    /**
121661847f8eSopenharmony_ci     * 12kHz sample rate.
121761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
121861847f8eSopenharmony_ci     * @since 8
121961847f8eSopenharmony_ci     */
122061847f8eSopenharmony_ci    /**
122161847f8eSopenharmony_ci     * 12kHz sample rate.
122261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
122361847f8eSopenharmony_ci     * @crossplatform
122461847f8eSopenharmony_ci     * @since 12
122561847f8eSopenharmony_ci     */
122661847f8eSopenharmony_ci    SAMPLE_RATE_12000 = 12000,
122761847f8eSopenharmony_ci    /**
122861847f8eSopenharmony_ci     * 16kHz sample rate.
122961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
123061847f8eSopenharmony_ci     * @since 8
123161847f8eSopenharmony_ci     */
123261847f8eSopenharmony_ci    /**
123361847f8eSopenharmony_ci     * 16kHz sample rate.
123461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
123561847f8eSopenharmony_ci     * @crossplatform
123661847f8eSopenharmony_ci     * @since 12
123761847f8eSopenharmony_ci     */
123861847f8eSopenharmony_ci    SAMPLE_RATE_16000 = 16000,
123961847f8eSopenharmony_ci    /**
124061847f8eSopenharmony_ci     * 22.05kHz sample rate.
124161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
124261847f8eSopenharmony_ci     * @since 8
124361847f8eSopenharmony_ci     */
124461847f8eSopenharmony_ci    /**
124561847f8eSopenharmony_ci     * 22.05kHz sample rate.
124661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
124761847f8eSopenharmony_ci     * @crossplatform
124861847f8eSopenharmony_ci     * @since 12
124961847f8eSopenharmony_ci     */
125061847f8eSopenharmony_ci    SAMPLE_RATE_22050 = 22050,
125161847f8eSopenharmony_ci    /**
125261847f8eSopenharmony_ci     * 24kHz sample rate.
125361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
125461847f8eSopenharmony_ci     * @since 8
125561847f8eSopenharmony_ci     */
125661847f8eSopenharmony_ci    /**
125761847f8eSopenharmony_ci     * 24kHz sample rate.
125861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
125961847f8eSopenharmony_ci     * @crossplatform
126061847f8eSopenharmony_ci     * @since 12
126161847f8eSopenharmony_ci     */
126261847f8eSopenharmony_ci    SAMPLE_RATE_24000 = 24000,
126361847f8eSopenharmony_ci    /**
126461847f8eSopenharmony_ci     * 32kHz sample rate.
126561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
126661847f8eSopenharmony_ci     * @since 8
126761847f8eSopenharmony_ci     */
126861847f8eSopenharmony_ci    /**
126961847f8eSopenharmony_ci     * 32kHz sample rate.
127061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
127161847f8eSopenharmony_ci     * @crossplatform
127261847f8eSopenharmony_ci     * @since 12
127361847f8eSopenharmony_ci     */
127461847f8eSopenharmony_ci    SAMPLE_RATE_32000 = 32000,
127561847f8eSopenharmony_ci    /**
127661847f8eSopenharmony_ci     * 44.1kHz sample rate.
127761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
127861847f8eSopenharmony_ci     * @since 8
127961847f8eSopenharmony_ci     */
128061847f8eSopenharmony_ci    /**
128161847f8eSopenharmony_ci     * 44.1kHz sample rate.
128261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
128361847f8eSopenharmony_ci     * @crossplatform
128461847f8eSopenharmony_ci     * @since 12
128561847f8eSopenharmony_ci     */
128661847f8eSopenharmony_ci    SAMPLE_RATE_44100 = 44100,
128761847f8eSopenharmony_ci    /**
128861847f8eSopenharmony_ci     * 48kHz sample rate.
128961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
129061847f8eSopenharmony_ci     * @since 8
129161847f8eSopenharmony_ci     */
129261847f8eSopenharmony_ci    /**
129361847f8eSopenharmony_ci     * 48kHz sample rate.
129461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
129561847f8eSopenharmony_ci     * @crossplatform
129661847f8eSopenharmony_ci     * @since 12
129761847f8eSopenharmony_ci     */
129861847f8eSopenharmony_ci    SAMPLE_RATE_48000 = 48000,
129961847f8eSopenharmony_ci    /**
130061847f8eSopenharmony_ci     * 64kHz sample rate.
130161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
130261847f8eSopenharmony_ci     * @since 8
130361847f8eSopenharmony_ci     */
130461847f8eSopenharmony_ci    /**
130561847f8eSopenharmony_ci     * 64kHz sample rate.
130661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
130761847f8eSopenharmony_ci     * @crossplatform
130861847f8eSopenharmony_ci     * @since 12
130961847f8eSopenharmony_ci     */
131061847f8eSopenharmony_ci    SAMPLE_RATE_64000 = 64000,
131161847f8eSopenharmony_ci    /**
131261847f8eSopenharmony_ci     * 88.2kHz sample rate.
131361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
131461847f8eSopenharmony_ci     * @since 12
131561847f8eSopenharmony_ci     */
131661847f8eSopenharmony_ci    SAMPLE_RATE_88200 = 88200,
131761847f8eSopenharmony_ci    /**
131861847f8eSopenharmony_ci     * 96kHz sample rate.
131961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
132061847f8eSopenharmony_ci     * @since 8
132161847f8eSopenharmony_ci     */
132261847f8eSopenharmony_ci    /**
132361847f8eSopenharmony_ci     * 96kHz sample rate.
132461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
132561847f8eSopenharmony_ci     * @crossplatform
132661847f8eSopenharmony_ci     * @since 12
132761847f8eSopenharmony_ci     */
132861847f8eSopenharmony_ci    SAMPLE_RATE_96000 = 96000,
132961847f8eSopenharmony_ci    /**
133061847f8eSopenharmony_ci     * 176.4kHz sample rate.
133161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
133261847f8eSopenharmony_ci     * @since 12
133361847f8eSopenharmony_ci     */
133461847f8eSopenharmony_ci    SAMPLE_RATE_176400 = 176400,
133561847f8eSopenharmony_ci    /**
133661847f8eSopenharmony_ci     * 192kHz sample rate.
133761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
133861847f8eSopenharmony_ci     * @since 12
133961847f8eSopenharmony_ci     */
134061847f8eSopenharmony_ci    SAMPLE_RATE_192000 = 192000
134161847f8eSopenharmony_ci  }
134261847f8eSopenharmony_ci
134361847f8eSopenharmony_ci  /**
134461847f8eSopenharmony_ci   * Enumerates the audio encoding type.
134561847f8eSopenharmony_ci   * @enum { number }
134661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
134761847f8eSopenharmony_ci   * @since 8
134861847f8eSopenharmony_ci   */
134961847f8eSopenharmony_ci  /**
135061847f8eSopenharmony_ci   * Enumerates the audio encoding type.
135161847f8eSopenharmony_ci   * @enum { number }
135261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
135361847f8eSopenharmony_ci   * @crossplatform
135461847f8eSopenharmony_ci   * @atomicservice
135561847f8eSopenharmony_ci   * @since 12
135661847f8eSopenharmony_ci   */
135761847f8eSopenharmony_ci  enum AudioEncodingType {
135861847f8eSopenharmony_ci    /**
135961847f8eSopenharmony_ci     * Invalid type.
136061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
136161847f8eSopenharmony_ci     * @since 8
136261847f8eSopenharmony_ci     */
136361847f8eSopenharmony_ci    /**
136461847f8eSopenharmony_ci     * Invalid type.
136561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
136661847f8eSopenharmony_ci     * @crossplatform
136761847f8eSopenharmony_ci     * @atomicservice
136861847f8eSopenharmony_ci     * @since 12
136961847f8eSopenharmony_ci     */
137061847f8eSopenharmony_ci    ENCODING_TYPE_INVALID = -1,
137161847f8eSopenharmony_ci    /**
137261847f8eSopenharmony_ci     * PCM encoding.
137361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
137461847f8eSopenharmony_ci     * @since 8
137561847f8eSopenharmony_ci     */
137661847f8eSopenharmony_ci    /**
137761847f8eSopenharmony_ci     * PCM encoding.
137861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
137961847f8eSopenharmony_ci     * @crossplatform
138061847f8eSopenharmony_ci     * @atomicservice
138161847f8eSopenharmony_ci     * @since 12
138261847f8eSopenharmony_ci     */
138361847f8eSopenharmony_ci    ENCODING_TYPE_RAW = 0
138461847f8eSopenharmony_ci  }
138561847f8eSopenharmony_ci
138661847f8eSopenharmony_ci  /**
138761847f8eSopenharmony_ci   * Enumerates the audio content type.
138861847f8eSopenharmony_ci   * @enum { number }
138961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
139061847f8eSopenharmony_ci   * @since 7
139161847f8eSopenharmony_ci   * @deprecated since 10
139261847f8eSopenharmony_ci   * @useinstead ohos.multimedia.audio.StreamUsage
139361847f8eSopenharmony_ci   */
139461847f8eSopenharmony_ci  enum ContentType {
139561847f8eSopenharmony_ci    /**
139661847f8eSopenharmony_ci     * Unknown content.
139761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
139861847f8eSopenharmony_ci     * @since 7
139961847f8eSopenharmony_ci     * @deprecated since 10
140061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.StreamUsage.STREAM_USAGE_UNKNOWN
140161847f8eSopenharmony_ci     */
140261847f8eSopenharmony_ci    CONTENT_TYPE_UNKNOWN = 0,
140361847f8eSopenharmony_ci    /**
140461847f8eSopenharmony_ci     * Speech content.
140561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
140661847f8eSopenharmony_ci     * @since 7
140761847f8eSopenharmony_ci     * @deprecated since 10
140861847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION
140961847f8eSopenharmony_ci     */
141061847f8eSopenharmony_ci    CONTENT_TYPE_SPEECH = 1,
141161847f8eSopenharmony_ci    /**
141261847f8eSopenharmony_ci     * Music content.
141361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
141461847f8eSopenharmony_ci     * @since 7
141561847f8eSopenharmony_ci     * @deprecated since 10
141661847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.StreamUsage.STREAM_USAGE_MUSIC
141761847f8eSopenharmony_ci     */
141861847f8eSopenharmony_ci    CONTENT_TYPE_MUSIC = 2,
141961847f8eSopenharmony_ci    /**
142061847f8eSopenharmony_ci     * Movie content.
142161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
142261847f8eSopenharmony_ci     * @since 7
142361847f8eSopenharmony_ci     * @deprecated since 10
142461847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.StreamUsage.STREAM_USAGE_MOVIE
142561847f8eSopenharmony_ci     */
142661847f8eSopenharmony_ci    CONTENT_TYPE_MOVIE = 3,
142761847f8eSopenharmony_ci    /**
142861847f8eSopenharmony_ci     * Notification content.
142961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
143061847f8eSopenharmony_ci     * @since 7
143161847f8eSopenharmony_ci     * @deprecated since 10
143261847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.StreamUsage.STREAM_USAGE_NOTIFICATION
143361847f8eSopenharmony_ci     */
143461847f8eSopenharmony_ci    CONTENT_TYPE_SONIFICATION = 4,
143561847f8eSopenharmony_ci    /**
143661847f8eSopenharmony_ci     * Ringtone content.
143761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
143861847f8eSopenharmony_ci     * @since 8
143961847f8eSopenharmony_ci     * @deprecated since 10
144061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.StreamUsage.STREAM_USAGE_RINGTONE
144161847f8eSopenharmony_ci     */
144261847f8eSopenharmony_ci    CONTENT_TYPE_RINGTONE = 5,
144361847f8eSopenharmony_ci  }
144461847f8eSopenharmony_ci
144561847f8eSopenharmony_ci  /**
144661847f8eSopenharmony_ci   * Enumerates the stream usage.
144761847f8eSopenharmony_ci   * @enum { number }
144861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
144961847f8eSopenharmony_ci   * @since 7
145061847f8eSopenharmony_ci   */
145161847f8eSopenharmony_ci  /**
145261847f8eSopenharmony_ci   * Enumerates the stream usage.
145361847f8eSopenharmony_ci   * @enum { number }
145461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
145561847f8eSopenharmony_ci   * @crossplatform
145661847f8eSopenharmony_ci   * @atomicservice
145761847f8eSopenharmony_ci   * @since 12
145861847f8eSopenharmony_ci   */
145961847f8eSopenharmony_ci  enum StreamUsage {
146061847f8eSopenharmony_ci    /**
146161847f8eSopenharmony_ci     * Unknown usage.
146261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
146361847f8eSopenharmony_ci     * @since 7
146461847f8eSopenharmony_ci     */
146561847f8eSopenharmony_ci    /**
146661847f8eSopenharmony_ci     * Unknown usage.
146761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
146861847f8eSopenharmony_ci     * @crossplatform
146961847f8eSopenharmony_ci     * @atomicservice
147061847f8eSopenharmony_ci     * @since 12
147161847f8eSopenharmony_ci     */
147261847f8eSopenharmony_ci    STREAM_USAGE_UNKNOWN = 0,
147361847f8eSopenharmony_ci    /**
147461847f8eSopenharmony_ci     * Media usage.
147561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
147661847f8eSopenharmony_ci     * @since 7
147761847f8eSopenharmony_ci     * @deprecated since 10
147861847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.StreamUsage.STREAM_USAGE_MUSIC or
147961847f8eSopenharmony_ci     *             ohos.multimedia.audio.StreamUsage.STREAM_USAGE_MOVIE or
148061847f8eSopenharmony_ci     *             ohos.multimedia.audio.StreamUsage.STREAM_USAGE_GAME or
148161847f8eSopenharmony_ci     *             ohos.multimedia.audio.StreamUsage.STREAM_USAGE_AUDIOBOOK
148261847f8eSopenharmony_ci     */
148361847f8eSopenharmony_ci    STREAM_USAGE_MEDIA = 1,
148461847f8eSopenharmony_ci    /**
148561847f8eSopenharmony_ci     * Music usage.
148661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
148761847f8eSopenharmony_ci     * @since 10
148861847f8eSopenharmony_ci     */
148961847f8eSopenharmony_ci    /**
149061847f8eSopenharmony_ci     * Music usage.
149161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
149261847f8eSopenharmony_ci     * @crossplatform
149361847f8eSopenharmony_ci     * @atomicservice
149461847f8eSopenharmony_ci     * @since 12
149561847f8eSopenharmony_ci     */
149661847f8eSopenharmony_ci    STREAM_USAGE_MUSIC = 1,
149761847f8eSopenharmony_ci    /**
149861847f8eSopenharmony_ci     * Voice communication usage.
149961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
150061847f8eSopenharmony_ci     * @since 7
150161847f8eSopenharmony_ci     */
150261847f8eSopenharmony_ci    /**
150361847f8eSopenharmony_ci     * Voice communication usage.
150461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
150561847f8eSopenharmony_ci     * @crossplatform
150661847f8eSopenharmony_ci     * @atomicservice
150761847f8eSopenharmony_ci     * @since 12
150861847f8eSopenharmony_ci     */
150961847f8eSopenharmony_ci    STREAM_USAGE_VOICE_COMMUNICATION = 2,
151061847f8eSopenharmony_ci    /**
151161847f8eSopenharmony_ci     * Voice assistant broadcast usage.
151261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
151361847f8eSopenharmony_ci     * @since 9
151461847f8eSopenharmony_ci     */
151561847f8eSopenharmony_ci    /**
151661847f8eSopenharmony_ci     * Voice assistant broadcast usage.
151761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
151861847f8eSopenharmony_ci     * @crossplatform
151961847f8eSopenharmony_ci     * @atomicservice
152061847f8eSopenharmony_ci     * @since 12
152161847f8eSopenharmony_ci     */
152261847f8eSopenharmony_ci    STREAM_USAGE_VOICE_ASSISTANT = 3,
152361847f8eSopenharmony_ci    /**
152461847f8eSopenharmony_ci     * Alarm usage.
152561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
152661847f8eSopenharmony_ci     * @since 10
152761847f8eSopenharmony_ci     */
152861847f8eSopenharmony_ci    /**
152961847f8eSopenharmony_ci     * Alarm usage.
153061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
153161847f8eSopenharmony_ci     * @crossplatform
153261847f8eSopenharmony_ci     * @atomicservice
153361847f8eSopenharmony_ci     * @since 12
153461847f8eSopenharmony_ci     */
153561847f8eSopenharmony_ci    STREAM_USAGE_ALARM = 4,
153661847f8eSopenharmony_ci    /**
153761847f8eSopenharmony_ci     * Voice message usage.
153861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
153961847f8eSopenharmony_ci     * @since 10
154061847f8eSopenharmony_ci     */
154161847f8eSopenharmony_ci    /**
154261847f8eSopenharmony_ci     * Voice message usage.
154361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
154461847f8eSopenharmony_ci     * @atomicservice
154561847f8eSopenharmony_ci     * @since 12
154661847f8eSopenharmony_ci     */
154761847f8eSopenharmony_ci    STREAM_USAGE_VOICE_MESSAGE = 5,
154861847f8eSopenharmony_ci    /**
154961847f8eSopenharmony_ci     * Notification or ringtone usage.
155061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
155161847f8eSopenharmony_ci     * @since 7
155261847f8eSopenharmony_ci     * @deprecated since 10
155361847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.StreamUsage.STREAM_USAGE_RINGTONE
155461847f8eSopenharmony_ci     */
155561847f8eSopenharmony_ci    STREAM_USAGE_NOTIFICATION_RINGTONE = 6,
155661847f8eSopenharmony_ci    /**
155761847f8eSopenharmony_ci     * Ringtone usage.
155861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
155961847f8eSopenharmony_ci     * @since 10
156061847f8eSopenharmony_ci     */
156161847f8eSopenharmony_ci    /**
156261847f8eSopenharmony_ci     * Ringtone usage.
156361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
156461847f8eSopenharmony_ci     * @crossplatform
156561847f8eSopenharmony_ci     * @atomicservice
156661847f8eSopenharmony_ci     * @since 12
156761847f8eSopenharmony_ci     */
156861847f8eSopenharmony_ci    STREAM_USAGE_RINGTONE = 6,
156961847f8eSopenharmony_ci    /**
157061847f8eSopenharmony_ci     * Notification usage.
157161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
157261847f8eSopenharmony_ci     * @since 10
157361847f8eSopenharmony_ci     */
157461847f8eSopenharmony_ci    /**
157561847f8eSopenharmony_ci     * Notification usage.
157661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
157761847f8eSopenharmony_ci     * @crossplatform
157861847f8eSopenharmony_ci     * @atomicservice
157961847f8eSopenharmony_ci     * @since 12
158061847f8eSopenharmony_ci     */
158161847f8eSopenharmony_ci    STREAM_USAGE_NOTIFICATION = 7,
158261847f8eSopenharmony_ci    /**
158361847f8eSopenharmony_ci     * Accessibility usage, such as screen reader.
158461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
158561847f8eSopenharmony_ci     * @since 10
158661847f8eSopenharmony_ci     */
158761847f8eSopenharmony_ci    /**
158861847f8eSopenharmony_ci     * Accessibility usage, such as screen reader.
158961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
159061847f8eSopenharmony_ci     * @crossplatform
159161847f8eSopenharmony_ci     * @atomicservice
159261847f8eSopenharmony_ci     * @since 12
159361847f8eSopenharmony_ci     */
159461847f8eSopenharmony_ci    STREAM_USAGE_ACCESSIBILITY = 8,
159561847f8eSopenharmony_ci    /**
159661847f8eSopenharmony_ci     * System usage, such as screen lock or key click.
159761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
159861847f8eSopenharmony_ci     * @systemapi
159961847f8eSopenharmony_ci     * @since 10
160061847f8eSopenharmony_ci     */
160161847f8eSopenharmony_ci    STREAM_USAGE_SYSTEM = 9,
160261847f8eSopenharmony_ci    /**
160361847f8eSopenharmony_ci     * Movie or video usage.
160461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
160561847f8eSopenharmony_ci     * @since 10
160661847f8eSopenharmony_ci     */
160761847f8eSopenharmony_ci    /**
160861847f8eSopenharmony_ci     * Movie or video usage.
160961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
161061847f8eSopenharmony_ci     * @crossplatform
161161847f8eSopenharmony_ci     * @atomicservice
161261847f8eSopenharmony_ci     * @since 12
161361847f8eSopenharmony_ci     */
161461847f8eSopenharmony_ci    STREAM_USAGE_MOVIE = 10,
161561847f8eSopenharmony_ci    /**
161661847f8eSopenharmony_ci     * Game sound effect usage.
161761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
161861847f8eSopenharmony_ci     * @since 10
161961847f8eSopenharmony_ci     */
162061847f8eSopenharmony_ci    /**
162161847f8eSopenharmony_ci     * Game sound effect usage.
162261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
162361847f8eSopenharmony_ci     * @crossplatform
162461847f8eSopenharmony_ci     * @atomicservice
162561847f8eSopenharmony_ci     * @since 12
162661847f8eSopenharmony_ci     */
162761847f8eSopenharmony_ci    STREAM_USAGE_GAME = 11,
162861847f8eSopenharmony_ci    /**
162961847f8eSopenharmony_ci     * Audiobook usage.
163061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
163161847f8eSopenharmony_ci     * @since 10
163261847f8eSopenharmony_ci     */
163361847f8eSopenharmony_ci    /**
163461847f8eSopenharmony_ci     * Audiobook usage.
163561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
163661847f8eSopenharmony_ci     * @crossplatform
163761847f8eSopenharmony_ci     * @atomicservice
163861847f8eSopenharmony_ci     * @since 12
163961847f8eSopenharmony_ci     */
164061847f8eSopenharmony_ci    STREAM_USAGE_AUDIOBOOK = 12,
164161847f8eSopenharmony_ci    /**
164261847f8eSopenharmony_ci     * Navigation usage.
164361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
164461847f8eSopenharmony_ci     * @since 10
164561847f8eSopenharmony_ci     */
164661847f8eSopenharmony_ci    /**
164761847f8eSopenharmony_ci     * Navigation usage.
164861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
164961847f8eSopenharmony_ci     * @crossplatform
165061847f8eSopenharmony_ci     * @atomicservice
165161847f8eSopenharmony_ci     * @since 12
165261847f8eSopenharmony_ci     */
165361847f8eSopenharmony_ci    STREAM_USAGE_NAVIGATION = 13,
165461847f8eSopenharmony_ci    /**
165561847f8eSopenharmony_ci     * DTMF dial tone usage.
165661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
165761847f8eSopenharmony_ci     * @systemapi
165861847f8eSopenharmony_ci     * @since 10
165961847f8eSopenharmony_ci     */
166061847f8eSopenharmony_ci    STREAM_USAGE_DTMF = 14,
166161847f8eSopenharmony_ci    /**
166261847f8eSopenharmony_ci     * Enforced tone usage, such as camera shutter.
166361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
166461847f8eSopenharmony_ci     * @systemapi
166561847f8eSopenharmony_ci     * @since 10
166661847f8eSopenharmony_ci     */
166761847f8eSopenharmony_ci    STREAM_USAGE_ENFORCED_TONE = 15,
166861847f8eSopenharmony_ci    /**
166961847f8eSopenharmony_ci     * Ultrasonic playing usage. This type is only used for msdp condition.
167061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
167161847f8eSopenharmony_ci     * @systemapi
167261847f8eSopenharmony_ci     * @since 10
167361847f8eSopenharmony_ci     */
167461847f8eSopenharmony_ci    STREAM_USAGE_ULTRASONIC = 16,
167561847f8eSopenharmony_ci    /**
167661847f8eSopenharmony_ci     * Video call usage.
167761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
167861847f8eSopenharmony_ci     * @atomicservice
167961847f8eSopenharmony_ci     * @since 12
168061847f8eSopenharmony_ci     */
168161847f8eSopenharmony_ci    STREAM_USAGE_VIDEO_COMMUNICATION = 17,
168261847f8eSopenharmony_ci    /**
168361847f8eSopenharmony_ci     * Voice call assistant type. This type is only used for call assistant functionalities.
168461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
168561847f8eSopenharmony_ci     * @systemapi
168661847f8eSopenharmony_ci     * @since 12
168761847f8eSopenharmony_ci     */
168861847f8eSopenharmony_ci    STREAM_USAGE_VOICE_CALL_ASSISTANT = 21,
168961847f8eSopenharmony_ci  }
169061847f8eSopenharmony_ci
169161847f8eSopenharmony_ci  /**
169261847f8eSopenharmony_ci   * Enumerates the audio interrupt request type.
169361847f8eSopenharmony_ci   * @enum { number }
169461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Interrupt
169561847f8eSopenharmony_ci   * @systemapi
169661847f8eSopenharmony_ci   * @since 9
169761847f8eSopenharmony_ci   */
169861847f8eSopenharmony_ci  enum InterruptRequestType {
169961847f8eSopenharmony_ci    /**
170061847f8eSopenharmony_ci     * Default type to request audio interrupt.
170161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
170261847f8eSopenharmony_ci     * @systemapi
170361847f8eSopenharmony_ci     * @since 9
170461847f8eSopenharmony_ci     */
170561847f8eSopenharmony_ci    INTERRUPT_REQUEST_TYPE_DEFAULT = 0,
170661847f8eSopenharmony_ci  }
170761847f8eSopenharmony_ci
170861847f8eSopenharmony_ci  /**
170961847f8eSopenharmony_ci   * Enumerates volume related operations.
171061847f8eSopenharmony_ci   * Flags should be powers of 2!
171161847f8eSopenharmony_ci   * @enum { number }
171261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
171361847f8eSopenharmony_ci   * @systemapi
171461847f8eSopenharmony_ci   * @since 12
171561847f8eSopenharmony_ci   */
171661847f8eSopenharmony_ci  enum VolumeFlag {
171761847f8eSopenharmony_ci    /**
171861847f8eSopenharmony_ci     * Show system volume bar.
171961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
172061847f8eSopenharmony_ci     * @systemapi
172161847f8eSopenharmony_ci     * @since 12
172261847f8eSopenharmony_ci     */
172361847f8eSopenharmony_ci    FLAG_SHOW_SYSTEM_UI = 1,
172461847f8eSopenharmony_ci  }
172561847f8eSopenharmony_ci
172661847f8eSopenharmony_ci  /**
172761847f8eSopenharmony_ci   * Describes audio stream information.
172861847f8eSopenharmony_ci   * @typedef AudioStreamInfo
172961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
173061847f8eSopenharmony_ci   * @since 8
173161847f8eSopenharmony_ci   */
173261847f8eSopenharmony_ci   /**
173361847f8eSopenharmony_ci   * Describes audio stream information.
173461847f8eSopenharmony_ci   * @typedef AudioStreamInfo
173561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
173661847f8eSopenharmony_ci   * @crossplatform
173761847f8eSopenharmony_ci   * @since 12
173861847f8eSopenharmony_ci   */
173961847f8eSopenharmony_ci  interface AudioStreamInfo {
174061847f8eSopenharmony_ci    /**
174161847f8eSopenharmony_ci     * Sampling rate.
174261847f8eSopenharmony_ci     * @type { AudioSamplingRate }
174361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
174461847f8eSopenharmony_ci     * @since 8
174561847f8eSopenharmony_ci     */
174661847f8eSopenharmony_ci    /**
174761847f8eSopenharmony_ci     * Sampling rate.
174861847f8eSopenharmony_ci     * @type { AudioSamplingRate }
174961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
175061847f8eSopenharmony_ci     * @crossplatform
175161847f8eSopenharmony_ci     * @since 12
175261847f8eSopenharmony_ci     */
175361847f8eSopenharmony_ci    samplingRate: AudioSamplingRate;
175461847f8eSopenharmony_ci    /**
175561847f8eSopenharmony_ci     * Audio channels.
175661847f8eSopenharmony_ci     * @type { AudioChannel }
175761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
175861847f8eSopenharmony_ci     * @since 8
175961847f8eSopenharmony_ci     */
176061847f8eSopenharmony_ci   /**
176161847f8eSopenharmony_ci     * Audio channels.
176261847f8eSopenharmony_ci    * @type { AudioChannel }
176361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
176461847f8eSopenharmony_ci     * @crossplatform
176561847f8eSopenharmony_ci     * @since 12
176661847f8eSopenharmony_ci     */
176761847f8eSopenharmony_ci    channels: AudioChannel;
176861847f8eSopenharmony_ci    /**
176961847f8eSopenharmony_ci     * Audio sample format.
177061847f8eSopenharmony_ci     * @type { AudioSampleFormat }
177161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
177261847f8eSopenharmony_ci     * @since 8
177361847f8eSopenharmony_ci     */
177461847f8eSopenharmony_ci    /**
177561847f8eSopenharmony_ci     * Audio sample format.
177661847f8eSopenharmony_ci     * @type { AudioSampleFormat }
177761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
177861847f8eSopenharmony_ci     * @crossplatform
177961847f8eSopenharmony_ci     * @since 12
178061847f8eSopenharmony_ci     */
178161847f8eSopenharmony_ci    sampleFormat: AudioSampleFormat;
178261847f8eSopenharmony_ci    /**
178361847f8eSopenharmony_ci     * Audio encoding type.
178461847f8eSopenharmony_ci     * @type { AudioEncodingType }
178561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
178661847f8eSopenharmony_ci     * @since 8
178761847f8eSopenharmony_ci     */
178861847f8eSopenharmony_ci    /**
178961847f8eSopenharmony_ci     * Audio encoding type.
179061847f8eSopenharmony_ci     * @type { AudioEncodingType }
179161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
179261847f8eSopenharmony_ci     * @crossplatform
179361847f8eSopenharmony_ci     * @since 12
179461847f8eSopenharmony_ci     */
179561847f8eSopenharmony_ci    encodingType: AudioEncodingType;
179661847f8eSopenharmony_ci    /**
179761847f8eSopenharmony_ci     * Audio channel layout.
179861847f8eSopenharmony_ci     * @type { ?AudioChannelLayout }
179961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
180061847f8eSopenharmony_ci     * @since 11
180161847f8eSopenharmony_ci     */
180261847f8eSopenharmony_ci    /**
180361847f8eSopenharmony_ci     * Audio channel layout.
180461847f8eSopenharmony_ci     * @type { ?AudioChannelLayout }
180561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
180661847f8eSopenharmony_ci     * @crossplatform
180761847f8eSopenharmony_ci     * @since 12
180861847f8eSopenharmony_ci     */
180961847f8eSopenharmony_ci    channelLayout?: AudioChannelLayout;
181061847f8eSopenharmony_ci  }
181161847f8eSopenharmony_ci
181261847f8eSopenharmony_ci  /**
181361847f8eSopenharmony_ci   * Describes audio renderer information.
181461847f8eSopenharmony_ci   * @typedef AudioRendererInfo
181561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
181661847f8eSopenharmony_ci   * @since 8
181761847f8eSopenharmony_ci   */
181861847f8eSopenharmony_ci  /**
181961847f8eSopenharmony_ci   * Describes audio renderer information.
182061847f8eSopenharmony_ci   * @typedef AudioRendererInfo
182161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
182261847f8eSopenharmony_ci   * @crossplatform
182361847f8eSopenharmony_ci   * @atomicservice
182461847f8eSopenharmony_ci   * @since 12
182561847f8eSopenharmony_ci   */
182661847f8eSopenharmony_ci  interface AudioRendererInfo {
182761847f8eSopenharmony_ci    /**
182861847f8eSopenharmony_ci     * Content type.
182961847f8eSopenharmony_ci     * @type { ContentType }
183061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
183161847f8eSopenharmony_ci     * @since 8
183261847f8eSopenharmony_ci     * @deprecated since 10
183361847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRendererInfo#usage
183461847f8eSopenharmony_ci     */
183561847f8eSopenharmony_ci    /**
183661847f8eSopenharmony_ci     * Content type.
183761847f8eSopenharmony_ci     * @type { ?ContentType }
183861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
183961847f8eSopenharmony_ci     * @since 10
184061847f8eSopenharmony_ci     */
184161847f8eSopenharmony_ci    content?: ContentType;
184261847f8eSopenharmony_ci    /**
184361847f8eSopenharmony_ci     * Stream usage.
184461847f8eSopenharmony_ci     * @type { StreamUsage }
184561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
184661847f8eSopenharmony_ci     * @since 8
184761847f8eSopenharmony_ci     */
184861847f8eSopenharmony_ci    /**
184961847f8eSopenharmony_ci     * Stream usage.
185061847f8eSopenharmony_ci     * @type { StreamUsage }
185161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
185261847f8eSopenharmony_ci     * @crossplatform
185361847f8eSopenharmony_ci     * @atomicservice
185461847f8eSopenharmony_ci     * @since 12
185561847f8eSopenharmony_ci     */
185661847f8eSopenharmony_ci    usage: StreamUsage;
185761847f8eSopenharmony_ci    /**
185861847f8eSopenharmony_ci     * Audio renderer flags.
185961847f8eSopenharmony_ci     * @type { number }
186061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
186161847f8eSopenharmony_ci     * @since 8
186261847f8eSopenharmony_ci     */
186361847f8eSopenharmony_ci    /**
186461847f8eSopenharmony_ci     * Audio renderer flags.
186561847f8eSopenharmony_ci     * @type { number }
186661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
186761847f8eSopenharmony_ci     * @crossplatform
186861847f8eSopenharmony_ci     * @atomicservice
186961847f8eSopenharmony_ci     * @since 12
187061847f8eSopenharmony_ci     */
187161847f8eSopenharmony_ci    rendererFlags: number;
187261847f8eSopenharmony_ci  }
187361847f8eSopenharmony_ci
187461847f8eSopenharmony_ci  /**
187561847f8eSopenharmony_ci   * Describes audio renderer filter.
187661847f8eSopenharmony_ci   * @typedef AudioRendererFilter
187761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
187861847f8eSopenharmony_ci   * @systemapi
187961847f8eSopenharmony_ci   * @since 9
188061847f8eSopenharmony_ci   */
188161847f8eSopenharmony_ci  interface AudioRendererFilter {
188261847f8eSopenharmony_ci    /**
188361847f8eSopenharmony_ci     * Application uid.
188461847f8eSopenharmony_ci     * @type { ?number }
188561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
188661847f8eSopenharmony_ci     * @systemapi
188761847f8eSopenharmony_ci     * @since 9
188861847f8eSopenharmony_ci     */
188961847f8eSopenharmony_ci    uid?: number;
189061847f8eSopenharmony_ci    /**
189161847f8eSopenharmony_ci     * Renderer information.
189261847f8eSopenharmony_ci     * @type { ?AudioRendererInfo }
189361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
189461847f8eSopenharmony_ci     * @systemapi
189561847f8eSopenharmony_ci     * @since 9
189661847f8eSopenharmony_ci     */
189761847f8eSopenharmony_ci    rendererInfo?: AudioRendererInfo;
189861847f8eSopenharmony_ci    /**
189961847f8eSopenharmony_ci     * AudioRenderer id.
190061847f8eSopenharmony_ci     * @type { ?number }
190161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
190261847f8eSopenharmony_ci     * @systemapi
190361847f8eSopenharmony_ci     * @since 9
190461847f8eSopenharmony_ci     */
190561847f8eSopenharmony_ci    rendererId?: number;
190661847f8eSopenharmony_ci  }
190761847f8eSopenharmony_ci
190861847f8eSopenharmony_ci  /**
190961847f8eSopenharmony_ci   * Describe audio capturer filter.
191061847f8eSopenharmony_ci   * @typedef AudioCapturerFilter
191161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
191261847f8eSopenharmony_ci   * @systemapi
191361847f8eSopenharmony_ci   * @since 12
191461847f8eSopenharmony_ci   */
191561847f8eSopenharmony_ci  interface AudioCapturerFilter {
191661847f8eSopenharmony_ci    /**
191761847f8eSopenharmony_ci     * Application uid.
191861847f8eSopenharmony_ci     * @type { ?number }
191961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
192061847f8eSopenharmony_ci     * @systemapi
192161847f8eSopenharmony_ci     * @since 12
192261847f8eSopenharmony_ci     */
192361847f8eSopenharmony_ci    uid?: number;
192461847f8eSopenharmony_ci    /**
192561847f8eSopenharmony_ci     * Capturer information.
192661847f8eSopenharmony_ci     * @type { ?AudioCapturerInfo }
192761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
192861847f8eSopenharmony_ci     * @systemapi
192961847f8eSopenharmony_ci     * @since 12
193061847f8eSopenharmony_ci     */
193161847f8eSopenharmony_ci    capturerInfo?: AudioCapturerInfo;
193261847f8eSopenharmony_ci  }
193361847f8eSopenharmony_ci
193461847f8eSopenharmony_ci  /**
193561847f8eSopenharmony_ci   * Describes audio renderer configuration options.
193661847f8eSopenharmony_ci   * @typedef AudioRendererOptions
193761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
193861847f8eSopenharmony_ci   * @since 8
193961847f8eSopenharmony_ci   */
194061847f8eSopenharmony_ci   /**
194161847f8eSopenharmony_ci   * Describes audio renderer configuration options.
194261847f8eSopenharmony_ci   * @typedef AudioRendererOptions
194361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
194461847f8eSopenharmony_ci   * @crossplatform
194561847f8eSopenharmony_ci   * @since 12
194661847f8eSopenharmony_ci   */
194761847f8eSopenharmony_ci  interface AudioRendererOptions {
194861847f8eSopenharmony_ci    /**
194961847f8eSopenharmony_ci     * Stream information.
195061847f8eSopenharmony_ci     * @type { AudioStreamInfo }
195161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
195261847f8eSopenharmony_ci     * @since 8
195361847f8eSopenharmony_ci     */
195461847f8eSopenharmony_ci    /**
195561847f8eSopenharmony_ci     * Stream information.
195661847f8eSopenharmony_ci     * @type { AudioStreamInfo }
195761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
195861847f8eSopenharmony_ci     * @crossplatform
195961847f8eSopenharmony_ci     * @since 12
196061847f8eSopenharmony_ci     */
196161847f8eSopenharmony_ci    streamInfo: AudioStreamInfo;
196261847f8eSopenharmony_ci    /**
196361847f8eSopenharmony_ci     * Renderer information.
196461847f8eSopenharmony_ci     * @type { AudioRendererInfo }
196561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
196661847f8eSopenharmony_ci     * @since 8
196761847f8eSopenharmony_ci     */
196861847f8eSopenharmony_ci    /**
196961847f8eSopenharmony_ci     * Renderer information.
197061847f8eSopenharmony_ci     * @type { AudioRendererInfo }
197161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
197261847f8eSopenharmony_ci     * @crossplatform
197361847f8eSopenharmony_ci     * @since 12
197461847f8eSopenharmony_ci     */
197561847f8eSopenharmony_ci    rendererInfo: AudioRendererInfo;
197661847f8eSopenharmony_ci    /**
197761847f8eSopenharmony_ci     * Privacy configuration.
197861847f8eSopenharmony_ci     * @type { ?AudioPrivacyType }
197961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
198061847f8eSopenharmony_ci     * @since 10
198161847f8eSopenharmony_ci     */
198261847f8eSopenharmony_ci    /**
198361847f8eSopenharmony_ci     * Privacy configuration.
198461847f8eSopenharmony_ci     * @type { ?AudioPrivacyType }
198561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
198661847f8eSopenharmony_ci     * @crossplatform
198761847f8eSopenharmony_ci     * @since 12
198861847f8eSopenharmony_ci     */
198961847f8eSopenharmony_ci    privacyType?: AudioPrivacyType;
199061847f8eSopenharmony_ci  }
199161847f8eSopenharmony_ci
199261847f8eSopenharmony_ci  /**
199361847f8eSopenharmony_ci   * Enumerates audio stream privacy type for playback capture.
199461847f8eSopenharmony_ci   * @enum { number }
199561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
199661847f8eSopenharmony_ci   * @since 10
199761847f8eSopenharmony_ci   */
199861847f8eSopenharmony_ci  /**
199961847f8eSopenharmony_ci   * Enumerates audio stream privacy type for playback capture.
200061847f8eSopenharmony_ci   * @enum { number }
200161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
200261847f8eSopenharmony_ci   * @crossplatform
200361847f8eSopenharmony_ci   * @since 12
200461847f8eSopenharmony_ci   */
200561847f8eSopenharmony_ci  enum AudioPrivacyType {
200661847f8eSopenharmony_ci    /**
200761847f8eSopenharmony_ci     * Privacy type that stream can be captured by third party applications.
200861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
200961847f8eSopenharmony_ci     * @since 10
201061847f8eSopenharmony_ci     */
201161847f8eSopenharmony_ci    /**
201261847f8eSopenharmony_ci     * Privacy type that stream can be captured by third party applications.
201361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
201461847f8eSopenharmony_ci     * @crossplatform
201561847f8eSopenharmony_ci     * @since 12
201661847f8eSopenharmony_ci     */
201761847f8eSopenharmony_ci    PRIVACY_TYPE_PUBLIC = 0,
201861847f8eSopenharmony_ci
201961847f8eSopenharmony_ci    /**
202061847f8eSopenharmony_ci     * Privacy type that stream can not be captured.
202161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
202261847f8eSopenharmony_ci     * @since 10
202361847f8eSopenharmony_ci     */
202461847f8eSopenharmony_ci    /**
202561847f8eSopenharmony_ci     * Privacy type that stream can not be captured.
202661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
202761847f8eSopenharmony_ci     * @crossplatform
202861847f8eSopenharmony_ci     * @since 12
202961847f8eSopenharmony_ci     */
203061847f8eSopenharmony_ci    PRIVACY_TYPE_PRIVATE = 1,
203161847f8eSopenharmony_ci  }
203261847f8eSopenharmony_ci
203361847f8eSopenharmony_ci  /**
203461847f8eSopenharmony_ci   * Enumerates the interrupt modes.
203561847f8eSopenharmony_ci   * @enum { number }
203661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Interrupt
203761847f8eSopenharmony_ci   * @since 9
203861847f8eSopenharmony_ci   */
203961847f8eSopenharmony_ci  /**
204061847f8eSopenharmony_ci   * Enumerates the interrupt modes.
204161847f8eSopenharmony_ci   * @enum { number }
204261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Interrupt
204361847f8eSopenharmony_ci   * @crossplatform
204461847f8eSopenharmony_ci   * @atomicservice
204561847f8eSopenharmony_ci   * @since 12
204661847f8eSopenharmony_ci   */
204761847f8eSopenharmony_ci  enum InterruptMode {
204861847f8eSopenharmony_ci    /**
204961847f8eSopenharmony_ci     * Mode that different stream share one interrupt unit.
205061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
205161847f8eSopenharmony_ci     * @since 9
205261847f8eSopenharmony_ci     */
205361847f8eSopenharmony_ci    /**
205461847f8eSopenharmony_ci     * Mode that different stream share one interrupt unit.
205561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
205661847f8eSopenharmony_ci     * @crossplatform
205761847f8eSopenharmony_ci     * @atomicservice
205861847f8eSopenharmony_ci     * @since 12
205961847f8eSopenharmony_ci     */
206061847f8eSopenharmony_ci    SHARE_MODE = 0,
206161847f8eSopenharmony_ci    /**
206261847f8eSopenharmony_ci     * Mode that each stream has independent interrupt unit.
206361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
206461847f8eSopenharmony_ci     * @since 9
206561847f8eSopenharmony_ci     */
206661847f8eSopenharmony_ci    /**
206761847f8eSopenharmony_ci     * Mode that each stream has independent interrupt unit.
206861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
206961847f8eSopenharmony_ci     * @crossplatform
207061847f8eSopenharmony_ci     * @atomicservice
207161847f8eSopenharmony_ci     * @since 12
207261847f8eSopenharmony_ci     */
207361847f8eSopenharmony_ci    INDEPENDENT_MODE = 1
207461847f8eSopenharmony_ci  }
207561847f8eSopenharmony_ci
207661847f8eSopenharmony_ci  /**
207761847f8eSopenharmony_ci   * Enumerates the audio renderer rates.
207861847f8eSopenharmony_ci   * @enum { number }
207961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
208061847f8eSopenharmony_ci   * @since 8
208161847f8eSopenharmony_ci   */
208261847f8eSopenharmony_ci  enum AudioRendererRate {
208361847f8eSopenharmony_ci    /**
208461847f8eSopenharmony_ci     * Normal rate.
208561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
208661847f8eSopenharmony_ci     * @since 8
208761847f8eSopenharmony_ci     */
208861847f8eSopenharmony_ci    RENDER_RATE_NORMAL = 0,
208961847f8eSopenharmony_ci    /**
209061847f8eSopenharmony_ci     * Double rate.
209161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
209261847f8eSopenharmony_ci     * @since 8
209361847f8eSopenharmony_ci     */
209461847f8eSopenharmony_ci    RENDER_RATE_DOUBLE = 1,
209561847f8eSopenharmony_ci    /**
209661847f8eSopenharmony_ci     * Half rate.
209761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
209861847f8eSopenharmony_ci     * @since 8
209961847f8eSopenharmony_ci     */
210061847f8eSopenharmony_ci    RENDER_RATE_HALF = 2
210161847f8eSopenharmony_ci  }
210261847f8eSopenharmony_ci
210361847f8eSopenharmony_ci  /**
210461847f8eSopenharmony_ci   * Enumerates the interrupt types.
210561847f8eSopenharmony_ci   * @enum { number }
210661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
210761847f8eSopenharmony_ci   * @since 7
210861847f8eSopenharmony_ci   */
210961847f8eSopenharmony_ci  /**
211061847f8eSopenharmony_ci   * Enumerates the interrupt types.
211161847f8eSopenharmony_ci   * @enum { number }
211261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
211361847f8eSopenharmony_ci   * @crossplatform
211461847f8eSopenharmony_ci   * @atomicservice
211561847f8eSopenharmony_ci   * @since 12
211661847f8eSopenharmony_ci   */
211761847f8eSopenharmony_ci  enum InterruptType {
211861847f8eSopenharmony_ci    /**
211961847f8eSopenharmony_ci     * Audio playback interruption started.
212061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
212161847f8eSopenharmony_ci     * @since 7
212261847f8eSopenharmony_ci     */
212361847f8eSopenharmony_ci    /**
212461847f8eSopenharmony_ci     * Audio playback interruption started.
212561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
212661847f8eSopenharmony_ci     * @crossplatform
212761847f8eSopenharmony_ci     * @atomicservice
212861847f8eSopenharmony_ci     * @since 12
212961847f8eSopenharmony_ci     */
213061847f8eSopenharmony_ci    INTERRUPT_TYPE_BEGIN = 1,
213161847f8eSopenharmony_ci
213261847f8eSopenharmony_ci    /**
213361847f8eSopenharmony_ci     * Audio playback interruption ended.
213461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
213561847f8eSopenharmony_ci     * @since 7
213661847f8eSopenharmony_ci     */
213761847f8eSopenharmony_ci    /**
213861847f8eSopenharmony_ci     * Audio playback interruption ended.
213961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
214061847f8eSopenharmony_ci     * @crossplatform
214161847f8eSopenharmony_ci     * @atomicservice
214261847f8eSopenharmony_ci     * @since 12
214361847f8eSopenharmony_ci     */
214461847f8eSopenharmony_ci    INTERRUPT_TYPE_END = 2
214561847f8eSopenharmony_ci  }
214661847f8eSopenharmony_ci
214761847f8eSopenharmony_ci  /**
214861847f8eSopenharmony_ci   * Enumerates the interrupt hints.
214961847f8eSopenharmony_ci   * @enum { number }
215061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
215161847f8eSopenharmony_ci   * @since 7
215261847f8eSopenharmony_ci   */
215361847f8eSopenharmony_ci  /**
215461847f8eSopenharmony_ci   * Enumerates the interrupt hints.
215561847f8eSopenharmony_ci   * @enum { number }
215661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
215761847f8eSopenharmony_ci   * @crossplatform
215861847f8eSopenharmony_ci   * @atomicservice
215961847f8eSopenharmony_ci   * @since 12
216061847f8eSopenharmony_ci   */
216161847f8eSopenharmony_ci  enum InterruptHint {
216261847f8eSopenharmony_ci    /**
216361847f8eSopenharmony_ci     * None.
216461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
216561847f8eSopenharmony_ci     * @since 8
216661847f8eSopenharmony_ci     */
216761847f8eSopenharmony_ci    /**
216861847f8eSopenharmony_ci     * None.
216961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
217061847f8eSopenharmony_ci     * @atomicservice
217161847f8eSopenharmony_ci     * @since 12
217261847f8eSopenharmony_ci     */
217361847f8eSopenharmony_ci    INTERRUPT_HINT_NONE = 0,
217461847f8eSopenharmony_ci    /**
217561847f8eSopenharmony_ci     * Resume the playback.
217661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
217761847f8eSopenharmony_ci     * @since 7
217861847f8eSopenharmony_ci     */
217961847f8eSopenharmony_ci    /**
218061847f8eSopenharmony_ci     * Resume the playback.
218161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
218261847f8eSopenharmony_ci     * @crossplatform
218361847f8eSopenharmony_ci     * @atomicservice
218461847f8eSopenharmony_ci     * @since 12
218561847f8eSopenharmony_ci     */
218661847f8eSopenharmony_ci    INTERRUPT_HINT_RESUME = 1,
218761847f8eSopenharmony_ci
218861847f8eSopenharmony_ci    /**
218961847f8eSopenharmony_ci     * Paused/Pause the playback.
219061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
219161847f8eSopenharmony_ci     * @since 7
219261847f8eSopenharmony_ci     */
219361847f8eSopenharmony_ci    /**
219461847f8eSopenharmony_ci     * Paused/Pause the playback.
219561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
219661847f8eSopenharmony_ci     * @atomicservice
219761847f8eSopenharmony_ci     * @since 12
219861847f8eSopenharmony_ci     */
219961847f8eSopenharmony_ci    INTERRUPT_HINT_PAUSE = 2,
220061847f8eSopenharmony_ci
220161847f8eSopenharmony_ci    /**
220261847f8eSopenharmony_ci     * Stopped/Stop the playback.
220361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
220461847f8eSopenharmony_ci     * @since 7
220561847f8eSopenharmony_ci     */
220661847f8eSopenharmony_ci    /**
220761847f8eSopenharmony_ci     * Stopped/Stop the playback.
220861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
220961847f8eSopenharmony_ci     * @atomicservice
221061847f8eSopenharmony_ci     * @since 12
221161847f8eSopenharmony_ci     */
221261847f8eSopenharmony_ci    INTERRUPT_HINT_STOP = 3,
221361847f8eSopenharmony_ci
221461847f8eSopenharmony_ci    /**
221561847f8eSopenharmony_ci     * Ducked the playback. (In ducking, the audio volume is reduced, but not silenced.)
221661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
221761847f8eSopenharmony_ci     * @since 7
221861847f8eSopenharmony_ci     */
221961847f8eSopenharmony_ci    /**
222061847f8eSopenharmony_ci     * Ducked the playback. (In ducking, the audio volume is reduced, but not silenced.)
222161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
222261847f8eSopenharmony_ci     * @atomicservice
222361847f8eSopenharmony_ci     * @since 12
222461847f8eSopenharmony_ci     */
222561847f8eSopenharmony_ci    INTERRUPT_HINT_DUCK = 4,
222661847f8eSopenharmony_ci
222761847f8eSopenharmony_ci    /**
222861847f8eSopenharmony_ci     * Unducked the playback.
222961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
223061847f8eSopenharmony_ci     * @since 8
223161847f8eSopenharmony_ci     */
223261847f8eSopenharmony_ci    /**
223361847f8eSopenharmony_ci     * Unducked the playback.
223461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
223561847f8eSopenharmony_ci     * @atomicservice
223661847f8eSopenharmony_ci     * @since 12
223761847f8eSopenharmony_ci     */
223861847f8eSopenharmony_ci    INTERRUPT_HINT_UNDUCK = 5,
223961847f8eSopenharmony_ci  }
224061847f8eSopenharmony_ci
224161847f8eSopenharmony_ci  /**
224261847f8eSopenharmony_ci   * Enumerates the interrupt force types.
224361847f8eSopenharmony_ci   * @enum { number }
224461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
224561847f8eSopenharmony_ci   * @since 9
224661847f8eSopenharmony_ci   */
224761847f8eSopenharmony_ci  /**
224861847f8eSopenharmony_ci   * Enumerates the interrupt force types.
224961847f8eSopenharmony_ci   * @enum { number }
225061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
225161847f8eSopenharmony_ci   * @crossplatform
225261847f8eSopenharmony_ci   * @atomicservice
225361847f8eSopenharmony_ci   * @since 12
225461847f8eSopenharmony_ci   */
225561847f8eSopenharmony_ci  enum InterruptForceType {
225661847f8eSopenharmony_ci    /**
225761847f8eSopenharmony_ci     * Forced action taken by system.
225861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
225961847f8eSopenharmony_ci     * @since 9
226061847f8eSopenharmony_ci     */
226161847f8eSopenharmony_ci    /**
226261847f8eSopenharmony_ci     * Forced action taken by system.
226361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
226461847f8eSopenharmony_ci     * @crossplatform
226561847f8eSopenharmony_ci     * @atomicservice
226661847f8eSopenharmony_ci     * @since 12
226761847f8eSopenharmony_ci     */
226861847f8eSopenharmony_ci    INTERRUPT_FORCE = 0,
226961847f8eSopenharmony_ci    /**
227061847f8eSopenharmony_ci     * Share type, application can choose to take action or ignore.
227161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
227261847f8eSopenharmony_ci     * @since 9
227361847f8eSopenharmony_ci     */
227461847f8eSopenharmony_ci    /**
227561847f8eSopenharmony_ci     * Share type, application can choose to take action or ignore.
227661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
227761847f8eSopenharmony_ci     * @atomicservice
227861847f8eSopenharmony_ci     * @since 12
227961847f8eSopenharmony_ci     */
228061847f8eSopenharmony_ci    INTERRUPT_SHARE = 1
228161847f8eSopenharmony_ci  }
228261847f8eSopenharmony_ci
228361847f8eSopenharmony_ci  /**
228461847f8eSopenharmony_ci   * Describes the interrupt event received by the app when playback is interrupted.
228561847f8eSopenharmony_ci   * @typedef InterruptEvent
228661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
228761847f8eSopenharmony_ci   * @since 9
228861847f8eSopenharmony_ci   */
228961847f8eSopenharmony_ci  /**
229061847f8eSopenharmony_ci   * Describes the interrupt event received by the app when playback is interrupted.
229161847f8eSopenharmony_ci   * @typedef InterruptEvent
229261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
229361847f8eSopenharmony_ci   * @crossplatform
229461847f8eSopenharmony_ci   * @atomicservice
229561847f8eSopenharmony_ci   * @since 12
229661847f8eSopenharmony_ci   */
229761847f8eSopenharmony_ci  interface InterruptEvent {
229861847f8eSopenharmony_ci    /**
229961847f8eSopenharmony_ci     * Indicates whether the interruption has started or finished.
230061847f8eSopenharmony_ci     * @type { InterruptType }
230161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
230261847f8eSopenharmony_ci     * @since 9
230361847f8eSopenharmony_ci     */
230461847f8eSopenharmony_ci    /**
230561847f8eSopenharmony_ci     * Indicates whether the interruption has started or finished.
230661847f8eSopenharmony_ci     * @type { InterruptType }
230761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
230861847f8eSopenharmony_ci     * @crossplatform
230961847f8eSopenharmony_ci     * @atomicservice
231061847f8eSopenharmony_ci     * @since 12
231161847f8eSopenharmony_ci     */
231261847f8eSopenharmony_ci    eventType: InterruptType;
231361847f8eSopenharmony_ci
231461847f8eSopenharmony_ci    /**
231561847f8eSopenharmony_ci     * Indicates whether the action is taken by system or to be taken by the app.
231661847f8eSopenharmony_ci     * @type { InterruptForceType }
231761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
231861847f8eSopenharmony_ci     * @since 9
231961847f8eSopenharmony_ci     */
232061847f8eSopenharmony_ci    /**
232161847f8eSopenharmony_ci     * Indicates whether the action is taken by system or to be taken by the app.
232261847f8eSopenharmony_ci     * @type { InterruptForceType }
232361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
232461847f8eSopenharmony_ci     * @crossplatform
232561847f8eSopenharmony_ci     * @atomicservice
232661847f8eSopenharmony_ci     * @since 12
232761847f8eSopenharmony_ci     */
232861847f8eSopenharmony_ci    forceType: InterruptForceType;
232961847f8eSopenharmony_ci
233061847f8eSopenharmony_ci    /**
233161847f8eSopenharmony_ci     * Indicates the kind of action.
233261847f8eSopenharmony_ci     * @type { InterruptHint }
233361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
233461847f8eSopenharmony_ci     * @since 9
233561847f8eSopenharmony_ci     */
233661847f8eSopenharmony_ci    /**
233761847f8eSopenharmony_ci     * Indicates the kind of action.
233861847f8eSopenharmony_ci     * @type { InterruptHint }
233961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
234061847f8eSopenharmony_ci     * @crossplatform
234161847f8eSopenharmony_ci     * @atomicservice
234261847f8eSopenharmony_ci     * @since 12
234361847f8eSopenharmony_ci     */
234461847f8eSopenharmony_ci    hintType: InterruptHint;
234561847f8eSopenharmony_ci  }
234661847f8eSopenharmony_ci
234761847f8eSopenharmony_ci  /**
234861847f8eSopenharmony_ci   * Enumerates interrupt action types.
234961847f8eSopenharmony_ci   * @enum { number }
235061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
235161847f8eSopenharmony_ci   * @since 7
235261847f8eSopenharmony_ci   * @deprecated since 9
235361847f8eSopenharmony_ci   */
235461847f8eSopenharmony_ci  enum InterruptActionType {
235561847f8eSopenharmony_ci
235661847f8eSopenharmony_ci    /**
235761847f8eSopenharmony_ci     * Focus gain event.
235861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
235961847f8eSopenharmony_ci     * @since 7
236061847f8eSopenharmony_ci     * @deprecated since 9
236161847f8eSopenharmony_ci     */
236261847f8eSopenharmony_ci    TYPE_ACTIVATED = 0,
236361847f8eSopenharmony_ci
236461847f8eSopenharmony_ci    /**
236561847f8eSopenharmony_ci     * Audio interruption event.
236661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
236761847f8eSopenharmony_ci     * @since 7
236861847f8eSopenharmony_ci     * @deprecated since 9
236961847f8eSopenharmony_ci     */
237061847f8eSopenharmony_ci    TYPE_INTERRUPT = 1
237161847f8eSopenharmony_ci  }
237261847f8eSopenharmony_ci
237361847f8eSopenharmony_ci  /**
237461847f8eSopenharmony_ci   * Enumerates device change types.
237561847f8eSopenharmony_ci   * @enum { number }
237661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
237761847f8eSopenharmony_ci   * @since 7
237861847f8eSopenharmony_ci   */
237961847f8eSopenharmony_ci  /**
238061847f8eSopenharmony_ci   * Enumerates device change types.
238161847f8eSopenharmony_ci   * @enum { number }
238261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
238361847f8eSopenharmony_ci   * @crossplatform
238461847f8eSopenharmony_ci   * @since 12
238561847f8eSopenharmony_ci   */
238661847f8eSopenharmony_ci  enum DeviceChangeType {
238761847f8eSopenharmony_ci    /**
238861847f8eSopenharmony_ci     * Device connection.
238961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
239061847f8eSopenharmony_ci     * @since 7
239161847f8eSopenharmony_ci     */
239261847f8eSopenharmony_ci    /**
239361847f8eSopenharmony_ci     * Device connection.
239461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
239561847f8eSopenharmony_ci     * @crossplatform
239661847f8eSopenharmony_ci     * @since 12
239761847f8eSopenharmony_ci     */
239861847f8eSopenharmony_ci    CONNECT = 0,
239961847f8eSopenharmony_ci
240061847f8eSopenharmony_ci    /**
240161847f8eSopenharmony_ci     * Device disconnection.
240261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
240361847f8eSopenharmony_ci     * @since 7
240461847f8eSopenharmony_ci     */
240561847f8eSopenharmony_ci    /**
240661847f8eSopenharmony_ci     * Device disconnection.
240761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
240861847f8eSopenharmony_ci     * @crossplatform
240961847f8eSopenharmony_ci     * @since 12
241061847f8eSopenharmony_ci     */
241161847f8eSopenharmony_ci    DISCONNECT = 1,
241261847f8eSopenharmony_ci  }
241361847f8eSopenharmony_ci
241461847f8eSopenharmony_ci  /**
241561847f8eSopenharmony_ci   * Enumerates audio scenes.
241661847f8eSopenharmony_ci   * @enum { number }
241761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Communication
241861847f8eSopenharmony_ci   * @since 8
241961847f8eSopenharmony_ci   */
242061847f8eSopenharmony_ci  /**
242161847f8eSopenharmony_ci   * Enumerates audio scenes.
242261847f8eSopenharmony_ci   * @enum { number }
242361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Communication
242461847f8eSopenharmony_ci   * @crossplatform
242561847f8eSopenharmony_ci   * @since 12
242661847f8eSopenharmony_ci   */
242761847f8eSopenharmony_ci  enum AudioScene {
242861847f8eSopenharmony_ci    /**
242961847f8eSopenharmony_ci     * Default audio scene
243061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
243161847f8eSopenharmony_ci     * @since 8
243261847f8eSopenharmony_ci     */
243361847f8eSopenharmony_ci    /**
243461847f8eSopenharmony_ci     * Default audio scene
243561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
243661847f8eSopenharmony_ci     * @crossplatform
243761847f8eSopenharmony_ci     * @since 12
243861847f8eSopenharmony_ci     */
243961847f8eSopenharmony_ci    AUDIO_SCENE_DEFAULT = 0,
244061847f8eSopenharmony_ci    /**
244161847f8eSopenharmony_ci     * Ringing audio scene
244261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
244361847f8eSopenharmony_ci     * @since 12
244461847f8eSopenharmony_ci     */
244561847f8eSopenharmony_ci    AUDIO_SCENE_RINGING = 1,
244661847f8eSopenharmony_ci    /**
244761847f8eSopenharmony_ci     * Phone call audio scene
244861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
244961847f8eSopenharmony_ci     * @since 12
245061847f8eSopenharmony_ci     */
245161847f8eSopenharmony_ci    AUDIO_SCENE_PHONE_CALL = 2,
245261847f8eSopenharmony_ci    /**
245361847f8eSopenharmony_ci     * Voice chat audio scene
245461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
245561847f8eSopenharmony_ci     * @since 8
245661847f8eSopenharmony_ci     */
245761847f8eSopenharmony_ci    /**
245861847f8eSopenharmony_ci     * Voice chat audio scene
245961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
246061847f8eSopenharmony_ci     * @crossplatform
246161847f8eSopenharmony_ci     * @since 12
246261847f8eSopenharmony_ci     */
246361847f8eSopenharmony_ci    AUDIO_SCENE_VOICE_CHAT = 3
246461847f8eSopenharmony_ci  }
246561847f8eSopenharmony_ci
246661847f8eSopenharmony_ci  /**
246761847f8eSopenharmony_ci   * Enumerates volume adjustment types.
246861847f8eSopenharmony_ci   * @enum { number }
246961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
247061847f8eSopenharmony_ci   * @systemapi
247161847f8eSopenharmony_ci   * @since 10
247261847f8eSopenharmony_ci   */
247361847f8eSopenharmony_ci  enum VolumeAdjustType {
247461847f8eSopenharmony_ci    /**
247561847f8eSopenharmony_ci     * Adjust volume up.
247661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
247761847f8eSopenharmony_ci     * @systemapi
247861847f8eSopenharmony_ci     * @since 10
247961847f8eSopenharmony_ci     */
248061847f8eSopenharmony_ci    VOLUME_UP = 0,
248161847f8eSopenharmony_ci    /**
248261847f8eSopenharmony_ci     * Adjust volume down.
248361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
248461847f8eSopenharmony_ci     * @systemapi
248561847f8eSopenharmony_ci     * @since 10
248661847f8eSopenharmony_ci     */
248761847f8eSopenharmony_ci    VOLUME_DOWN = 1,
248861847f8eSopenharmony_ci  }
248961847f8eSopenharmony_ci
249061847f8eSopenharmony_ci  /**
249161847f8eSopenharmony_ci   * Implements audio volume and audio device management.
249261847f8eSopenharmony_ci   * @typedef AudioManager
249361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
249461847f8eSopenharmony_ci   * @since 7
249561847f8eSopenharmony_ci   */
249661847f8eSopenharmony_ci  /**
249761847f8eSopenharmony_ci   * Implements audio volume and audio device management.
249861847f8eSopenharmony_ci   * @typedef AudioManager
249961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
250061847f8eSopenharmony_ci   * @crossplatform
250161847f8eSopenharmony_ci   * @since 12
250261847f8eSopenharmony_ci   */
250361847f8eSopenharmony_ci  interface AudioManager {
250461847f8eSopenharmony_ci    /**
250561847f8eSopenharmony_ci     * Sets the volume for a stream. This method uses an asynchronous callback to return the result.
250661847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
250761847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
250861847f8eSopenharmony_ci     * @param { number } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume.
250961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
251061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
251161847f8eSopenharmony_ci     * @since 7
251261847f8eSopenharmony_ci     * @deprecated since 9
251361847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#setVolume
251461847f8eSopenharmony_ci     */
251561847f8eSopenharmony_ci    setVolume(volumeType: AudioVolumeType, volume: number, callback: AsyncCallback<void>): void;
251661847f8eSopenharmony_ci    /**
251761847f8eSopenharmony_ci     * Sets the volume for a stream. This method uses a promise to return the result.
251861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
251961847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
252061847f8eSopenharmony_ci     * @param { number } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume.
252161847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
252261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
252361847f8eSopenharmony_ci     * @since 7
252461847f8eSopenharmony_ci     * @deprecated since 9
252561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#setVolume
252661847f8eSopenharmony_ci     */
252761847f8eSopenharmony_ci    setVolume(volumeType: AudioVolumeType, volume: number): Promise<void>;
252861847f8eSopenharmony_ci    /**
252961847f8eSopenharmony_ci     * Obtains the volume of a stream. This method uses an asynchronous callback to return the query result.
253061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
253161847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the volume.
253261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
253361847f8eSopenharmony_ci     * @since 7
253461847f8eSopenharmony_ci     * @deprecated since 9
253561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#getVolume
253661847f8eSopenharmony_ci     */
253761847f8eSopenharmony_ci    getVolume(volumeType: AudioVolumeType, callback: AsyncCallback<number>): void;
253861847f8eSopenharmony_ci    /**
253961847f8eSopenharmony_ci     * Obtains the volume of a stream. This method uses a promise to return the query result.
254061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
254161847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the volume.
254261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
254361847f8eSopenharmony_ci     * @since 7
254461847f8eSopenharmony_ci     * @deprecated since 9
254561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#getVolume
254661847f8eSopenharmony_ci     */
254761847f8eSopenharmony_ci    getVolume(volumeType: AudioVolumeType): Promise<number>;
254861847f8eSopenharmony_ci    /**
254961847f8eSopenharmony_ci     * Obtains the minimum volume allowed for a stream. This method uses an asynchronous callback to return the query result.
255061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
255161847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the minimum volume.
255261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
255361847f8eSopenharmony_ci     * @since 7
255461847f8eSopenharmony_ci     * @deprecated since 9
255561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#getMinVolume
255661847f8eSopenharmony_ci     */
255761847f8eSopenharmony_ci    getMinVolume(volumeType: AudioVolumeType, callback: AsyncCallback<number>): void;
255861847f8eSopenharmony_ci    /**
255961847f8eSopenharmony_ci     * Obtains the minimum volume allowed for a stream. This method uses a promise to return the query result.
256061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
256161847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the minimum volume.
256261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
256361847f8eSopenharmony_ci     * @since 7
256461847f8eSopenharmony_ci     * @deprecated since 9
256561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#getMinVolume
256661847f8eSopenharmony_ci     */
256761847f8eSopenharmony_ci    getMinVolume(volumeType: AudioVolumeType): Promise<number>;
256861847f8eSopenharmony_ci    /**
256961847f8eSopenharmony_ci     * Obtains the maximum volume allowed for a stream. This method uses an asynchronous callback to return the query result.
257061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
257161847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the maximum volume.
257261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
257361847f8eSopenharmony_ci     * @since 7
257461847f8eSopenharmony_ci     * @deprecated since 9
257561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#getMaxVolume
257661847f8eSopenharmony_ci     */
257761847f8eSopenharmony_ci    getMaxVolume(volumeType: AudioVolumeType, callback: AsyncCallback<number>): void;
257861847f8eSopenharmony_ci    /**
257961847f8eSopenharmony_ci     * Obtains the maximum volume allowed for a stream. This method uses a promise to return the query result.
258061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
258161847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the maximum volume.
258261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
258361847f8eSopenharmony_ci     * @since 7
258461847f8eSopenharmony_ci     * @deprecated since 9
258561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#getMaxVolume
258661847f8eSopenharmony_ci     */
258761847f8eSopenharmony_ci    getMaxVolume(volumeType: AudioVolumeType): Promise<number>;
258861847f8eSopenharmony_ci    /**
258961847f8eSopenharmony_ci     * Obtains the audio devices with a specific flag. This method uses an asynchronous callback to return the query result.
259061847f8eSopenharmony_ci     * @param { DeviceFlag } deviceFlag - Audio device flag.
259161847f8eSopenharmony_ci     * @param { AsyncCallback<AudioDeviceDescriptors> } callback - Callback used to return the device list.
259261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
259361847f8eSopenharmony_ci     * @since 7
259461847f8eSopenharmony_ci     * @deprecated since 9
259561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRoutingManager#getDevices
259661847f8eSopenharmony_ci     */
259761847f8eSopenharmony_ci    getDevices(deviceFlag: DeviceFlag, callback: AsyncCallback<AudioDeviceDescriptors>): void;
259861847f8eSopenharmony_ci    /**
259961847f8eSopenharmony_ci     * Obtains the audio devices with a specific flag. This method uses a promise to return the query result.
260061847f8eSopenharmony_ci     * @param { DeviceFlag } deviceFlag - Audio device flag.
260161847f8eSopenharmony_ci     * @returns { Promise<AudioDeviceDescriptors> } Promise used to return the device list.
260261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
260361847f8eSopenharmony_ci     * @since 7
260461847f8eSopenharmony_ci     * @deprecated since 9
260561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRoutingManager#getDevices
260661847f8eSopenharmony_ci     */
260761847f8eSopenharmony_ci    getDevices(deviceFlag: DeviceFlag): Promise<AudioDeviceDescriptors>;
260861847f8eSopenharmony_ci    /**
260961847f8eSopenharmony_ci     * Mutes a stream. This method uses an asynchronous callback to return the result.
261061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
261161847f8eSopenharmony_ci     * @param { boolean } mute - Mute status to set. The value true means to mute the stream, and false means the opposite.
261261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
261361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
261461847f8eSopenharmony_ci     * @since 7
261561847f8eSopenharmony_ci     * @deprecated since 9
261661847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#mute
261761847f8eSopenharmony_ci     */
261861847f8eSopenharmony_ci    mute(volumeType: AudioVolumeType, mute: boolean, callback: AsyncCallback<void>): void;
261961847f8eSopenharmony_ci    /**
262061847f8eSopenharmony_ci     * Mutes a stream. This method uses a promise to return the result.
262161847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
262261847f8eSopenharmony_ci     * @param { boolean } mute -  Mute status to set. The value true means to mute the stream, and false means the opposite.
262361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
262461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
262561847f8eSopenharmony_ci     * @since 7
262661847f8eSopenharmony_ci     * @deprecated since 9
262761847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#mute
262861847f8eSopenharmony_ci     */
262961847f8eSopenharmony_ci    mute(volumeType: AudioVolumeType, mute: boolean): Promise<void>;
263061847f8eSopenharmony_ci    /**
263161847f8eSopenharmony_ci     * Checks whether a stream is muted. This method uses an asynchronous callback to return the query result.
263261847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
263361847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Callback used to return the mute status of the stream.
263461847f8eSopenharmony_ci     *        The value true means that the stream is muted, and false means the opposite.
263561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
263661847f8eSopenharmony_ci     * @since 7
263761847f8eSopenharmony_ci     * @deprecated since 9
263861847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#isMute
263961847f8eSopenharmony_ci     */
264061847f8eSopenharmony_ci    isMute(volumeType: AudioVolumeType, callback: AsyncCallback<boolean>): void;
264161847f8eSopenharmony_ci    /**
264261847f8eSopenharmony_ci     * Checks whether a stream is muted. This method uses a promise to return the result.
264361847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
264461847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the mute status of the stream. The value true means
264561847f8eSopenharmony_ci     *          that the stream is muted, and false means the opposite.
264661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
264761847f8eSopenharmony_ci     * @since 7
264861847f8eSopenharmony_ci     * @deprecated since 9
264961847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#isMute
265061847f8eSopenharmony_ci     */
265161847f8eSopenharmony_ci    isMute(volumeType: AudioVolumeType): Promise<boolean>;
265261847f8eSopenharmony_ci    /**
265361847f8eSopenharmony_ci     * Checks whether a stream is active. This method uses an asynchronous callback to return the query result.
265461847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
265561847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Callback used to return the active status of the stream.
265661847f8eSopenharmony_ci     *        The value true means that the stream is active, and false means the opposite.
265761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
265861847f8eSopenharmony_ci     * @since 7
265961847f8eSopenharmony_ci     * @deprecated since 9
266061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioStreamManager#isActive
266161847f8eSopenharmony_ci     */
266261847f8eSopenharmony_ci    isActive(volumeType: AudioVolumeType, callback: AsyncCallback<boolean>): void;
266361847f8eSopenharmony_ci    /**
266461847f8eSopenharmony_ci     * Checks whether a stream is active. This method uses a promise to return the query result.
266561847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
266661847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the active status of the stream. The value true means
266761847f8eSopenharmony_ci     *          that the stream is active, and false means the opposite.
266861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
266961847f8eSopenharmony_ci     * @since 7
267061847f8eSopenharmony_ci     * @deprecated since 9
267161847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioStreamManager#isActive
267261847f8eSopenharmony_ci     */
267361847f8eSopenharmony_ci    isActive(volumeType: AudioVolumeType): Promise<boolean>;
267461847f8eSopenharmony_ci    /**
267561847f8eSopenharmony_ci     * Mutes or unmutes the microphone. This method uses an asynchronous callback to return the result.
267661847f8eSopenharmony_ci     * @permission ohos.permission.MICROPHONE
267761847f8eSopenharmony_ci     * @param { boolean } mute - Mute status to set. The value true means to mute the microphone, and false means the opposite.
267861847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
267961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
268061847f8eSopenharmony_ci     * @since 7
268161847f8eSopenharmony_ci     * @deprecated since 9
268261847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#setMicrophoneMute
268361847f8eSopenharmony_ci     */
268461847f8eSopenharmony_ci    setMicrophoneMute(mute: boolean, callback: AsyncCallback<void>): void;
268561847f8eSopenharmony_ci    /**
268661847f8eSopenharmony_ci     * Mutes or unmutes the microphone. This method uses a promise to return the result.
268761847f8eSopenharmony_ci     * @permission ohos.permission.MICROPHONE
268861847f8eSopenharmony_ci     * @param { boolean } mute - Mute status to set. The value true means to mute the microphone, and false means the opposite.
268961847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
269061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
269161847f8eSopenharmony_ci     * @since 7
269261847f8eSopenharmony_ci     * @deprecated since 9
269361847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#setMicrophoneMute
269461847f8eSopenharmony_ci     */
269561847f8eSopenharmony_ci    setMicrophoneMute(mute: boolean): Promise<void>;
269661847f8eSopenharmony_ci    /**
269761847f8eSopenharmony_ci     * Checks whether the microphone is muted. This method uses an asynchronous callback to return the query result.
269861847f8eSopenharmony_ci     * @permission ohos.permission.MICROPHONE
269961847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - used to return the mute status of the microphone. The value
270061847f8eSopenharmony_ci     *        true means that the microphone is muted, and false means the opposite.
270161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
270261847f8eSopenharmony_ci     * @since 7
270361847f8eSopenharmony_ci     * @deprecated since 9
270461847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#isMicrophoneMute
270561847f8eSopenharmony_ci     */
270661847f8eSopenharmony_ci    isMicrophoneMute(callback: AsyncCallback<boolean>): void;
270761847f8eSopenharmony_ci    /**
270861847f8eSopenharmony_ci     * Checks whether the microphone is muted. This method uses a promise to return the query result.
270961847f8eSopenharmony_ci     * @permission ohos.permission.MICROPHONE
271061847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the mute status of the microphone. The value
271161847f8eSopenharmony_ci     *          true means that the microphone is muted, and false means the opposite.
271261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
271361847f8eSopenharmony_ci     * @since 7
271461847f8eSopenharmony_ci     * @deprecated since 9
271561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#isMicrophoneMute
271661847f8eSopenharmony_ci     */
271761847f8eSopenharmony_ci    isMicrophoneMute(): Promise<boolean>;
271861847f8eSopenharmony_ci    /**
271961847f8eSopenharmony_ci     * Sets the ringer mode. This method uses an asynchronous callback to return the result.
272061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
272161847f8eSopenharmony_ci     * @param { AudioRingMode } mode - Ringer mode.
272261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
272361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
272461847f8eSopenharmony_ci     * @since 7
272561847f8eSopenharmony_ci     * @deprecated since 9
272661847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#setRingerMode
272761847f8eSopenharmony_ci     */
272861847f8eSopenharmony_ci    setRingerMode(mode: AudioRingMode, callback: AsyncCallback<void>): void;
272961847f8eSopenharmony_ci    /**
273061847f8eSopenharmony_ci     * Sets the ringer mode. This method uses a promise to return the result.
273161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
273261847f8eSopenharmony_ci     * @param { AudioRingMode } mode - Ringer mode.
273361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
273461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
273561847f8eSopenharmony_ci     * @since 7
273661847f8eSopenharmony_ci     * @deprecated since 9
273761847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#setRingerMode
273861847f8eSopenharmony_ci     */
273961847f8eSopenharmony_ci    setRingerMode(mode: AudioRingMode): Promise<void>;
274061847f8eSopenharmony_ci    /**
274161847f8eSopenharmony_ci     * Obtains the ringer mode. This method uses an asynchronous callback to return the query result.
274261847f8eSopenharmony_ci     * @param { AsyncCallback<AudioRingMode> } callback - Callback used to return the ringer mode.
274361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
274461847f8eSopenharmony_ci     * @since 7
274561847f8eSopenharmony_ci     * @deprecated since 9
274661847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#getRingerMode
274761847f8eSopenharmony_ci     */
274861847f8eSopenharmony_ci    getRingerMode(callback: AsyncCallback<AudioRingMode>): void;
274961847f8eSopenharmony_ci    /**
275061847f8eSopenharmony_ci     * Obtains the ringer mode. This method uses a promise to return the query result.
275161847f8eSopenharmony_ci     * @returns { Promise<AudioRingMode> } Promise used to return the ringer mode.
275261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
275361847f8eSopenharmony_ci     * @since 7
275461847f8eSopenharmony_ci     * @deprecated since 9
275561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#getRingerMode
275661847f8eSopenharmony_ci     */
275761847f8eSopenharmony_ci    getRingerMode(): Promise<AudioRingMode>;
275861847f8eSopenharmony_ci    /**
275961847f8eSopenharmony_ci     * Sets an audio parameter. This method uses an asynchronous callback to return the result.
276061847f8eSopenharmony_ci     * @permission ohos.permission.MODIFY_AUDIO_SETTINGS
276161847f8eSopenharmony_ci     * @param { string } key - Key of the audio parameter to set.
276261847f8eSopenharmony_ci     * @param { string } value -  Value of the audio parameter to set.
276361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
276461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
276561847f8eSopenharmony_ci     * @since 7
276661847f8eSopenharmony_ci     * @deprecated since 11
276761847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioManager#setExtraParameters
276861847f8eSopenharmony_ci     */
276961847f8eSopenharmony_ci    setAudioParameter(key: string, value: string, callback: AsyncCallback<void>): void;
277061847f8eSopenharmony_ci    /**
277161847f8eSopenharmony_ci     * Sets an audio parameter. This method uses a promise to return the result.
277261847f8eSopenharmony_ci     * @permission ohos.permission.MODIFY_AUDIO_SETTINGS
277361847f8eSopenharmony_ci     * @param { string } key - Key of the audio parameter to set.
277461847f8eSopenharmony_ci     * @param { string } value - Value of the audio parameter to set.
277561847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
277661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
277761847f8eSopenharmony_ci     * @since 7
277861847f8eSopenharmony_ci     * @deprecated since 11
277961847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioManager#setExtraParameters
278061847f8eSopenharmony_ci     */
278161847f8eSopenharmony_ci    setAudioParameter(key: string, value: string): Promise<void>;
278261847f8eSopenharmony_ci
278361847f8eSopenharmony_ci    /**
278461847f8eSopenharmony_ci     * Obtains the value of an audio parameter. This method uses an asynchronous callback to return the query result.
278561847f8eSopenharmony_ci     * @param { string } key - Key of the audio parameter whose value is to be obtained.
278661847f8eSopenharmony_ci     * @param { AsyncCallback<string> } callback - Callback used to return the value of the audio parameter.
278761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
278861847f8eSopenharmony_ci     * @since 7
278961847f8eSopenharmony_ci     * @deprecated since 11
279061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioManager#getExtraParameters
279161847f8eSopenharmony_ci     */
279261847f8eSopenharmony_ci    getAudioParameter(key: string, callback: AsyncCallback<string>): void;
279361847f8eSopenharmony_ci    /**
279461847f8eSopenharmony_ci     * Obtains the value of an audio parameter. This method uses a promise to return the query result.
279561847f8eSopenharmony_ci     * @param { string } key - Key of the audio parameter whose value is to be obtained.
279661847f8eSopenharmony_ci     * @returns { Promise<string> } Promise used to return the value of the audio parameter.
279761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
279861847f8eSopenharmony_ci     * @since 7
279961847f8eSopenharmony_ci     * @deprecated since 11
280061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioManager#getExtraParameters
280161847f8eSopenharmony_ci     */
280261847f8eSopenharmony_ci    getAudioParameter(key: string): Promise<string>;
280361847f8eSopenharmony_ci
280461847f8eSopenharmony_ci    /**
280561847f8eSopenharmony_ci     * Sets extra audio parameters. This method uses a promise to return the result.
280661847f8eSopenharmony_ci     * @permission ohos.permission.MODIFY_AUDIO_SETTINGS
280761847f8eSopenharmony_ci     * @param { string } mainKey - Main key of the audio parameters to set.
280861847f8eSopenharmony_ci     * @param { Record<string, string> } kvpairs - Key-value pairs with subkeys and values to set.
280961847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
281061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
281161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
281261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
281361847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
281461847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
281561847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
281661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
281761847f8eSopenharmony_ci     * @systemapi
281861847f8eSopenharmony_ci     * @since 11
281961847f8eSopenharmony_ci     */
282061847f8eSopenharmony_ci    setExtraParameters(mainKey: string, kvpairs: Record<string, string>): Promise<void>;
282161847f8eSopenharmony_ci
282261847f8eSopenharmony_ci    /**
282361847f8eSopenharmony_ci     * Obtains the values of a certain key. This method uses a promise to return the query result.
282461847f8eSopenharmony_ci     * @param { string } mainKey - Main key of the audio parameters to get.
282561847f8eSopenharmony_ci     * @param { Array<string> } subKeys - Sub keys of the audio parameters to get.
282661847f8eSopenharmony_ci     * @returns { Promise<Record<string, string>> } Promise used to return the key-value pairs.
282761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
282861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
282961847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
283061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
283161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
283261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
283361847f8eSopenharmony_ci     * @systemapi
283461847f8eSopenharmony_ci     * @since 11
283561847f8eSopenharmony_ci     */
283661847f8eSopenharmony_ci    getExtraParameters(mainKey: string, subKeys?: Array<string>): Promise<Record<string, string>>;
283761847f8eSopenharmony_ci
283861847f8eSopenharmony_ci    /**
283961847f8eSopenharmony_ci     * Sets a device to the active state. This method uses an asynchronous callback to return the result.
284061847f8eSopenharmony_ci     * @param { ActiveDeviceType } deviceType - Audio device type.
284161847f8eSopenharmony_ci     * @param { boolean } active - Active status to set. The value true means to set the device to the active
284261847f8eSopenharmony_ci     *        status, and false means the opposite.
284361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
284461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
284561847f8eSopenharmony_ci     * @since 7
284661847f8eSopenharmony_ci     * @deprecated since 9
284761847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRoutingManager#setCommunicationDevice
284861847f8eSopenharmony_ci     */
284961847f8eSopenharmony_ci    setDeviceActive(deviceType: ActiveDeviceType, active: boolean, callback: AsyncCallback<void>): void;
285061847f8eSopenharmony_ci    /**
285161847f8eSopenharmony_ci     * Sets a device to the active state. This method uses a promise to return the result.
285261847f8eSopenharmony_ci     * @param { ActiveDeviceType } deviceType - Audio device type.
285361847f8eSopenharmony_ci     * @param { boolean } active - Active status to set. The value true means to set the device to the active
285461847f8eSopenharmony_ci     *        status, and false means the opposite.
285561847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
285661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
285761847f8eSopenharmony_ci     * @since 7
285861847f8eSopenharmony_ci     * @deprecated since 9
285961847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRoutingManager#setCommunicationDevice
286061847f8eSopenharmony_ci     */
286161847f8eSopenharmony_ci    setDeviceActive(deviceType: ActiveDeviceType, active: boolean): Promise<void>;
286261847f8eSopenharmony_ci    /**
286361847f8eSopenharmony_ci     * Checks whether a device is active. This method uses an asynchronous callback to return the query result.
286461847f8eSopenharmony_ci     * @param { ActiveDeviceType } deviceType - Audio device type.
286561847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Callback used to return the active status of the device.
286661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
286761847f8eSopenharmony_ci     * @since 7
286861847f8eSopenharmony_ci     * @deprecated since 9
286961847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRoutingManager#isCommunicationDeviceActive
287061847f8eSopenharmony_ci     */
287161847f8eSopenharmony_ci    isDeviceActive(deviceType: ActiveDeviceType, callback: AsyncCallback<boolean>): void;
287261847f8eSopenharmony_ci    /**
287361847f8eSopenharmony_ci     * Checks whether a device is active. This method uses a promise to return the query result.
287461847f8eSopenharmony_ci     * @param { ActiveDeviceType } deviceType - Audio device type.
287561847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the active status of the device.
287661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
287761847f8eSopenharmony_ci     * @since 7
287861847f8eSopenharmony_ci     * @deprecated since 9
287961847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRoutingManager#isCommunicationDeviceActive
288061847f8eSopenharmony_ci     */
288161847f8eSopenharmony_ci    isDeviceActive(deviceType: ActiveDeviceType): Promise<boolean>;
288261847f8eSopenharmony_ci    /**
288361847f8eSopenharmony_ci     * Listens for system volume change events. This method uses a callback to get volume change events.
288461847f8eSopenharmony_ci     * @param { 'volumeChange' } type - Type of the event to listen for. Only the volumeChange event is supported.
288561847f8eSopenharmony_ci     * @param { Callback<VolumeEvent> } callback - Callback used to get the system volume change event.
288661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
288761847f8eSopenharmony_ci     * @systemapi
288861847f8eSopenharmony_ci     * @since 8
288961847f8eSopenharmony_ci     * @deprecated since 9
289061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeManager#event:volumeChange
289161847f8eSopenharmony_ci     */
289261847f8eSopenharmony_ci    on(type: 'volumeChange', callback: Callback<VolumeEvent>): void;
289361847f8eSopenharmony_ci    /**
289461847f8eSopenharmony_ci     * Listens for ringer mode change events. This method uses a callback to get ringer mode changes.
289561847f8eSopenharmony_ci     * @param { 'ringerModeChange' } type - Type of the event to listen for. Only the ringerModeChange event is supported.
289661847f8eSopenharmony_ci     * @param { Callback<AudioRingMode> } callback - Callback used to get the updated ringer mode.
289761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
289861847f8eSopenharmony_ci     * @systemapi
289961847f8eSopenharmony_ci     * @since 8
290061847f8eSopenharmony_ci     * @deprecated since 9
290161847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#event:ringerModeChange
290261847f8eSopenharmony_ci     */
290361847f8eSopenharmony_ci    on(type: 'ringerModeChange', callback: Callback<AudioRingMode>): void;
290461847f8eSopenharmony_ci    /**
290561847f8eSopenharmony_ci     * Sets the audio scene mode to change audio strategies. This method uses an asynchronous callback to return the
290661847f8eSopenharmony_ci     * result.
290761847f8eSopenharmony_ci     * @param { AudioScene } scene - Audio scene mode.
290861847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
290961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
291061847f8eSopenharmony_ci     * @systemapi
291161847f8eSopenharmony_ci     * @since 8
291261847f8eSopenharmony_ci     */
291361847f8eSopenharmony_ci    setAudioScene(scene: AudioScene, callback: AsyncCallback<void>): void;
291461847f8eSopenharmony_ci    /**
291561847f8eSopenharmony_ci     * Sets the audio scene mode to change audio strategies. This method uses a promise to return the result.
291661847f8eSopenharmony_ci     * @param { AudioScene } scene - Audio scene mode.
291761847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
291861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
291961847f8eSopenharmony_ci     * @systemapi
292061847f8eSopenharmony_ci     * @since 8
292161847f8eSopenharmony_ci     */
292261847f8eSopenharmony_ci    setAudioScene(scene: AudioScene): Promise<void>;
292361847f8eSopenharmony_ci    /**
292461847f8eSopenharmony_ci     * Obtains the audio scene mode. This method uses an asynchronous callback to return the query result.
292561847f8eSopenharmony_ci     * @param { AsyncCallback<AudioScene> } callback - Callback used to return the audio scene mode.
292661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
292761847f8eSopenharmony_ci     * @since 8
292861847f8eSopenharmony_ci     */
292961847f8eSopenharmony_ci    /**
293061847f8eSopenharmony_ci     * Obtains the audio scene mode. This method uses an asynchronous callback to return the query result.
293161847f8eSopenharmony_ci     * @param { AsyncCallback<AudioScene> } callback - Callback used to return the audio scene mode.
293261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
293361847f8eSopenharmony_ci     * @crossplatform
293461847f8eSopenharmony_ci     * @since 12
293561847f8eSopenharmony_ci     */
293661847f8eSopenharmony_ci    getAudioScene(callback: AsyncCallback<AudioScene>): void;
293761847f8eSopenharmony_ci    /**
293861847f8eSopenharmony_ci     * Obtains the audio scene mode. This method uses a promise to return the query result.
293961847f8eSopenharmony_ci     * @returns { Promise<AudioScene> } Promise used to return the audio scene mode.
294061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
294161847f8eSopenharmony_ci     * @since 8
294261847f8eSopenharmony_ci     */
294361847f8eSopenharmony_ci    /**
294461847f8eSopenharmony_ci     * Obtains the audio scene mode. This method uses a promise to return the query result.
294561847f8eSopenharmony_ci     * @returns { Promise<AudioScene> } Promise used to return the audio scene mode.
294661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
294761847f8eSopenharmony_ci     * @crossplatform
294861847f8eSopenharmony_ci     * @since 12
294961847f8eSopenharmony_ci     */
295061847f8eSopenharmony_ci    getAudioScene(): Promise<AudioScene>;
295161847f8eSopenharmony_ci    /**
295261847f8eSopenharmony_ci     * Obtains the audio scene mode.
295361847f8eSopenharmony_ci     * @returns { AudioScene } Current audio scene mode.
295461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
295561847f8eSopenharmony_ci     * @since 10
295661847f8eSopenharmony_ci     */
295761847f8eSopenharmony_ci    /**
295861847f8eSopenharmony_ci     * Obtains the audio scene mode.
295961847f8eSopenharmony_ci     * @returns { AudioScene } Current audio scene mode.
296061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
296161847f8eSopenharmony_ci     * @crossplatform
296261847f8eSopenharmony_ci     * @since 12
296361847f8eSopenharmony_ci     */
296461847f8eSopenharmony_ci    getAudioSceneSync(): AudioScene;
296561847f8eSopenharmony_ci
296661847f8eSopenharmony_ci    /**
296761847f8eSopenharmony_ci     * Subscribes to device change events. When a device is connected/disconnected, registered clients will receive
296861847f8eSopenharmony_ci     * the callback.
296961847f8eSopenharmony_ci     * @param { 'deviceChange' } type - Type of the event to listen for. Only the deviceChange event is supported.
297061847f8eSopenharmony_ci     * @param { Callback<DeviceChangeAction> } callback - Callback used to obtain the device update details.
297161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
297261847f8eSopenharmony_ci     * @since 7
297361847f8eSopenharmony_ci     * @deprecated since 9
297461847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRoutingManager#event:deviceChange
297561847f8eSopenharmony_ci     */
297661847f8eSopenharmony_ci    on(type: 'deviceChange', callback: Callback<DeviceChangeAction>): void;
297761847f8eSopenharmony_ci
297861847f8eSopenharmony_ci    /**
297961847f8eSopenharmony_ci     * UnSubscribes to device change events.
298061847f8eSopenharmony_ci     * @param { 'deviceChange' } type - Type of the event to listen for. Only the deviceChange event is supported.
298161847f8eSopenharmony_ci     * @param { Callback<DeviceChangeAction> } callback - Callback used to obtain the device update details.
298261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
298361847f8eSopenharmony_ci     * @since 7
298461847f8eSopenharmony_ci     * @deprecated since 9
298561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRoutingManager#event:deviceChange
298661847f8eSopenharmony_ci     */
298761847f8eSopenharmony_ci    off(type: 'deviceChange', callback?: Callback<DeviceChangeAction>): void;
298861847f8eSopenharmony_ci
298961847f8eSopenharmony_ci    /**
299061847f8eSopenharmony_ci     * Listens for audio interruption events. When the audio of an application is interrupted by another application,
299161847f8eSopenharmony_ci     * the callback is invoked to notify the former application.
299261847f8eSopenharmony_ci     * @param { 'interrupt' } type - Type of the event to listen for. Only the interrupt event is supported.
299361847f8eSopenharmony_ci     * @param { AudioInterrupt } interrupt - Parameters of the audio interruption event type.
299461847f8eSopenharmony_ci     * @param { Callback<InterruptAction> } callback - Callback invoked for the audio interruption event.
299561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
299661847f8eSopenharmony_ci     * @since 7
299761847f8eSopenharmony_ci     * @deprecated since 11
299861847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRenderer#event:audioInterrupt
299961847f8eSopenharmony_ci     */
300061847f8eSopenharmony_ci    on(type: 'interrupt', interrupt: AudioInterrupt, callback: Callback<InterruptAction>): void;
300161847f8eSopenharmony_ci
300261847f8eSopenharmony_ci    /**
300361847f8eSopenharmony_ci     * Cancels the listening of audio interruption events.
300461847f8eSopenharmony_ci     * @param { 'interrupt' } type - Type of the event to listen for. Only the interrupt event is supported.
300561847f8eSopenharmony_ci     * @param { AudioInterrupt } interrupt - Input parameters of the audio interruption event.
300661847f8eSopenharmony_ci     * @param { Callback<InterruptAction> } callback - Callback invoked for the audio interruption event.
300761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
300861847f8eSopenharmony_ci     * @since 7
300961847f8eSopenharmony_ci     * @deprecated since 11
301061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRenderer#event:audioInterrupt
301161847f8eSopenharmony_ci     */
301261847f8eSopenharmony_ci    off(type: 'interrupt', interrupt: AudioInterrupt, callback?: Callback<InterruptAction>): void;
301361847f8eSopenharmony_ci
301461847f8eSopenharmony_ci    /**
301561847f8eSopenharmony_ci     * Obtains an {@link AudioVolumeManager} instance.
301661847f8eSopenharmony_ci     * @returns { AudioVolumeManager } AudioVolumeManager instance.
301761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
301861847f8eSopenharmony_ci     * @since 9
301961847f8eSopenharmony_ci     */
302061847f8eSopenharmony_ci    /**
302161847f8eSopenharmony_ci     * Obtains an {@link AudioVolumeManager} instance.
302261847f8eSopenharmony_ci     * @returns { AudioVolumeManager } AudioVolumeManager instance.
302361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
302461847f8eSopenharmony_ci     * @crossplatform
302561847f8eSopenharmony_ci     * @since 12
302661847f8eSopenharmony_ci     */
302761847f8eSopenharmony_ci    getVolumeManager(): AudioVolumeManager;
302861847f8eSopenharmony_ci
302961847f8eSopenharmony_ci    /**
303061847f8eSopenharmony_ci     * Obtains an {@link AudioStreamManager} instance.
303161847f8eSopenharmony_ci     * @returns { AudioStreamManager } AudioStreamManager instance.
303261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
303361847f8eSopenharmony_ci     * @since 9
303461847f8eSopenharmony_ci     */
303561847f8eSopenharmony_ci    /**
303661847f8eSopenharmony_ci     * Obtains an {@link AudioStreamManager} instance.
303761847f8eSopenharmony_ci     * @returns { AudioStreamManager } AudioStreamManager instance.
303861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
303961847f8eSopenharmony_ci     * @crossplatform
304061847f8eSopenharmony_ci     * @since 12
304161847f8eSopenharmony_ci     */
304261847f8eSopenharmony_ci    getStreamManager(): AudioStreamManager;
304361847f8eSopenharmony_ci
304461847f8eSopenharmony_ci    /**
304561847f8eSopenharmony_ci     * Obtains an {@link AudioRoutingManager} instance.
304661847f8eSopenharmony_ci     * @returns { AudioRoutingManager } AudioRoutingManager instance.
304761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
304861847f8eSopenharmony_ci     * @since 9
304961847f8eSopenharmony_ci     */
305061847f8eSopenharmony_ci    /**
305161847f8eSopenharmony_ci     * Obtains an {@link AudioRoutingManager} instance.
305261847f8eSopenharmony_ci     * @returns { AudioRoutingManager } AudioRoutingManager instance.
305361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
305461847f8eSopenharmony_ci     * @crossplatform
305561847f8eSopenharmony_ci     * @since 12
305661847f8eSopenharmony_ci     */
305761847f8eSopenharmony_ci    getRoutingManager(): AudioRoutingManager;
305861847f8eSopenharmony_ci
305961847f8eSopenharmony_ci    /**
306061847f8eSopenharmony_ci     * Obtains an {@link AudioSessionManager} instance.
306161847f8eSopenharmony_ci     * @returns { AudioSessionManager } AudioSessionManager instance.
306261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
306361847f8eSopenharmony_ci     * @crossplatform
306461847f8eSopenharmony_ci     * @since 12
306561847f8eSopenharmony_ci     */
306661847f8eSopenharmony_ci    getSessionManager(): AudioSessionManager;
306761847f8eSopenharmony_ci
306861847f8eSopenharmony_ci    /**
306961847f8eSopenharmony_ci     * Obtains an {@link AudioSpatializationManager} instance.
307061847f8eSopenharmony_ci     * @returns { AudioSpatializationManager } AudioSpatializationManager instance.
307161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
307261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
307361847f8eSopenharmony_ci     * @systemapi
307461847f8eSopenharmony_ci     * @since 11
307561847f8eSopenharmony_ci     */
307661847f8eSopenharmony_ci    getSpatializationManager(): AudioSpatializationManager;
307761847f8eSopenharmony_ci
307861847f8eSopenharmony_ci    /**
307961847f8eSopenharmony_ci     * user disable the safe media volume state.
308061847f8eSopenharmony_ci     * @permission ohos.permission.MODIFY_AUDIO_SETTINGS
308161847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
308261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
308361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
308461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
308561847f8eSopenharmony_ci     * @systemapi
308661847f8eSopenharmony_ci     * @since 12
308761847f8eSopenharmony_ci     */
308861847f8eSopenharmony_ci    disableSafeMediaVolume(): Promise<void>;
308961847f8eSopenharmony_ci  }
309061847f8eSopenharmony_ci
309161847f8eSopenharmony_ci  /**
309261847f8eSopenharmony_ci   * Enumerates audio interrupt request result type.
309361847f8eSopenharmony_ci   * @enum { number }
309461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Interrupt
309561847f8eSopenharmony_ci   * @systemapi
309661847f8eSopenharmony_ci   * @since 9
309761847f8eSopenharmony_ci   */
309861847f8eSopenharmony_ci  enum InterruptRequestResultType {
309961847f8eSopenharmony_ci    /**
310061847f8eSopenharmony_ci     * Request audio interrupt success
310161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
310261847f8eSopenharmony_ci     * @systemapi
310361847f8eSopenharmony_ci     * @since 9
310461847f8eSopenharmony_ci     */
310561847f8eSopenharmony_ci    INTERRUPT_REQUEST_GRANT = 0,
310661847f8eSopenharmony_ci    /**
310761847f8eSopenharmony_ci     * Request audio interrupt fail, may have higher priority type
310861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
310961847f8eSopenharmony_ci     * @systemapi
311061847f8eSopenharmony_ci     * @since 9
311161847f8eSopenharmony_ci     */
311261847f8eSopenharmony_ci    INTERRUPT_REQUEST_REJECT = 1
311361847f8eSopenharmony_ci  }
311461847f8eSopenharmony_ci
311561847f8eSopenharmony_ci  /**
311661847f8eSopenharmony_ci   * Describes audio interrupt operation results.
311761847f8eSopenharmony_ci   * @typedef InterruptResult
311861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Interrupt
311961847f8eSopenharmony_ci   * @systemapi
312061847f8eSopenharmony_ci   * @since 9
312161847f8eSopenharmony_ci   */
312261847f8eSopenharmony_ci  interface InterruptResult {
312361847f8eSopenharmony_ci    /**
312461847f8eSopenharmony_ci     * Interrupt request or abandon result.
312561847f8eSopenharmony_ci     * @type { InterruptRequestResultType }
312661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
312761847f8eSopenharmony_ci     * @systemapi
312861847f8eSopenharmony_ci     * @since 9
312961847f8eSopenharmony_ci     */
313061847f8eSopenharmony_ci    requestResult: InterruptRequestResultType;
313161847f8eSopenharmony_ci    /**
313261847f8eSopenharmony_ci     * Interrupt node as a unit to receive interrupt change event.
313361847f8eSopenharmony_ci     * @type { number }
313461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
313561847f8eSopenharmony_ci     * @systemapi
313661847f8eSopenharmony_ci     * @since 9
313761847f8eSopenharmony_ci     */
313861847f8eSopenharmony_ci    interruptNode: number;
313961847f8eSopenharmony_ci  }
314061847f8eSopenharmony_ci
314161847f8eSopenharmony_ci  /**
314261847f8eSopenharmony_ci   * Desribes audio device block status. By default, the device is consider as unblocked.
314361847f8eSopenharmony_ci   * @enum { number }
314461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
314561847f8eSopenharmony_ci   * @since 13
314661847f8eSopenharmony_ci   */
314761847f8eSopenharmony_ci  enum DeviceBlockStatus{
314861847f8eSopenharmony_ci    /**
314961847f8eSopenharmony_ci     * Device is unblocked.
315061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
315161847f8eSopenharmony_ci     * @since 13
315261847f8eSopenharmony_ci     */
315361847f8eSopenharmony_ci    UNBLOCKED = 0,
315461847f8eSopenharmony_ci    /**
315561847f8eSopenharmony_ci     * Device is blocked.
315661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
315761847f8eSopenharmony_ci     * @since 13
315861847f8eSopenharmony_ci     */
315961847f8eSopenharmony_ci    BLOCKED = 1,
316061847f8eSopenharmony_ci  }
316161847f8eSopenharmony_ci
316261847f8eSopenharmony_ci  /**
316361847f8eSopenharmony_ci   * Desribes audio device block status info.
316461847f8eSopenharmony_ci   * @typedef DeviceBlockStatusInfo
316561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
316661847f8eSopenharmony_ci   * @since 13
316761847f8eSopenharmony_ci   */
316861847f8eSopenharmony_ci  interface DeviceBlockStatusInfo {
316961847f8eSopenharmony_ci    /**
317061847f8eSopenharmony_ci     * Device block status.
317161847f8eSopenharmony_ci     * @type {DeviceBlockStatus}
317261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
317361847f8eSopenharmony_ci     * @since 13
317461847f8eSopenharmony_ci     */
317561847f8eSopenharmony_ci    blockStatus: DeviceBlockStatus;
317661847f8eSopenharmony_ci
317761847f8eSopenharmony_ci    /**
317861847f8eSopenharmony_ci     * Audio device descriptors whose block status has changed.
317961847f8eSopenharmony_ci     * @type {AudioDeviceDescriptors}
318061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
318161847f8eSopenharmony_ci     * @since 13
318261847f8eSopenharmony_ci     */
318361847f8eSopenharmony_ci    devices: AudioDeviceDescriptors;
318461847f8eSopenharmony_ci  }
318561847f8eSopenharmony_ci
318661847f8eSopenharmony_ci  /**
318761847f8eSopenharmony_ci   * Implements audio router management.
318861847f8eSopenharmony_ci   * @typedef AudioRoutingManager
318961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
319061847f8eSopenharmony_ci   * @since 9
319161847f8eSopenharmony_ci   */
319261847f8eSopenharmony_ci  /**
319361847f8eSopenharmony_ci   * Implements audio router management.
319461847f8eSopenharmony_ci   * @typedef AudioRoutingManager
319561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
319661847f8eSopenharmony_ci   * @crossplatform
319761847f8eSopenharmony_ci   * @since 12
319861847f8eSopenharmony_ci   */
319961847f8eSopenharmony_ci  interface AudioRoutingManager {
320061847f8eSopenharmony_ci    /**
320161847f8eSopenharmony_ci     * Obtains the audio devices with a specific flag. This method uses an asynchronous callback to return the query result.
320261847f8eSopenharmony_ci     * @param { DeviceFlag } deviceFlag - Audio device flag.
320361847f8eSopenharmony_ci     * @param { AsyncCallback<AudioDeviceDescriptors> } callback - Callback used to return the device list.
320461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
320561847f8eSopenharmony_ci     * @since 9
320661847f8eSopenharmony_ci     */
320761847f8eSopenharmony_ci    /**
320861847f8eSopenharmony_ci     * Obtains the audio devices with a specific flag. This method uses an asynchronous callback to return the query result.
320961847f8eSopenharmony_ci     * @param { DeviceFlag } deviceFlag - Audio device flag.
321061847f8eSopenharmony_ci     * @param { AsyncCallback<AudioDeviceDescriptors> } callback - Callback used to return the device list.
321161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
321261847f8eSopenharmony_ci     * @crossplatform
321361847f8eSopenharmony_ci     * @since 12
321461847f8eSopenharmony_ci     */
321561847f8eSopenharmony_ci    getDevices(deviceFlag: DeviceFlag, callback: AsyncCallback<AudioDeviceDescriptors>): void;
321661847f8eSopenharmony_ci    /**
321761847f8eSopenharmony_ci     * Obtains the audio devices with a specific flag. This method uses a promise to return the query result.
321861847f8eSopenharmony_ci     * @param { DeviceFlag } deviceFlag - Audio device flag.
321961847f8eSopenharmony_ci     * @returns { Promise<AudioDeviceDescriptors> } Promise used to return the device list.
322061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
322161847f8eSopenharmony_ci     * @since 9
322261847f8eSopenharmony_ci     */
322361847f8eSopenharmony_ci    /**
322461847f8eSopenharmony_ci     * Obtains the audio devices with a specific flag. This method uses a promise to return the query result.
322561847f8eSopenharmony_ci     * @param { DeviceFlag } deviceFlag - Audio device flag.
322661847f8eSopenharmony_ci     * @returns { Promise<AudioDeviceDescriptors> } Promise used to return the device list.
322761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
322861847f8eSopenharmony_ci     * @crossplatform
322961847f8eSopenharmony_ci     * @since 12
323061847f8eSopenharmony_ci     */
323161847f8eSopenharmony_ci    getDevices(deviceFlag: DeviceFlag): Promise<AudioDeviceDescriptors>;
323261847f8eSopenharmony_ci    /**
323361847f8eSopenharmony_ci     * Obtains the audio devices with a specific flag.
323461847f8eSopenharmony_ci     * @param { DeviceFlag } deviceFlag - Audio device flag.
323561847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } The device list.
323661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
323761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
323861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
323961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
324061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
324161847f8eSopenharmony_ci     * @since 10
324261847f8eSopenharmony_ci     */
324361847f8eSopenharmony_ci    /**
324461847f8eSopenharmony_ci     * Obtains the audio devices with a specific flag.
324561847f8eSopenharmony_ci     * @param { DeviceFlag } deviceFlag - Audio device flag.
324661847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } The device list.
324761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
324861847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
324961847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
325061847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
325161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
325261847f8eSopenharmony_ci     * @crossplatform
325361847f8eSopenharmony_ci     * @since 12
325461847f8eSopenharmony_ci     */
325561847f8eSopenharmony_ci    getDevicesSync(deviceFlag: DeviceFlag): AudioDeviceDescriptors;
325661847f8eSopenharmony_ci
325761847f8eSopenharmony_ci    /**
325861847f8eSopenharmony_ci     * Subscribes to device change events. When a device is connected/disconnected, registered clients will receive
325961847f8eSopenharmony_ci     * the callback.
326061847f8eSopenharmony_ci     * @param { 'deviceChange' } type - Type of the event to listen for. Only the deviceChange event is supported.
326161847f8eSopenharmony_ci     * @param { DeviceFlag } deviceFlag - Audio device flag.
326261847f8eSopenharmony_ci     * @param { Callback<DeviceChangeAction> } callback - Callback used to obtain the device update details.
326361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
326461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
326561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
326661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
326761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
326861847f8eSopenharmony_ci     * @since 9
326961847f8eSopenharmony_ci     */
327061847f8eSopenharmony_ci    /**
327161847f8eSopenharmony_ci     * Subscribes to device change events. When a device is connected/disconnected, registered clients will receive
327261847f8eSopenharmony_ci     * the callback.
327361847f8eSopenharmony_ci     * @param { 'deviceChange' } type - Type of the event to listen for. Only the deviceChange event is supported.
327461847f8eSopenharmony_ci     * @param { DeviceFlag } deviceFlag - Audio device flag.
327561847f8eSopenharmony_ci     * @param { Callback<DeviceChangeAction> } callback - Callback used to obtain the device update details.
327661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
327761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
327861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
327961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
328061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
328161847f8eSopenharmony_ci     * @crossplatform
328261847f8eSopenharmony_ci     * @since 12
328361847f8eSopenharmony_ci     */
328461847f8eSopenharmony_ci    on(type: 'deviceChange', deviceFlag: DeviceFlag, callback: Callback<DeviceChangeAction>): void;
328561847f8eSopenharmony_ci
328661847f8eSopenharmony_ci    /**
328761847f8eSopenharmony_ci     * UnSubscribes to device change events.
328861847f8eSopenharmony_ci     * @param { 'deviceChange' } type - Type of the event to listen for. Only the deviceChange event is supported.
328961847f8eSopenharmony_ci     * @param { Callback<DeviceChangeAction> } callback - Callback used to obtain the device update details.
329061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
329161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
329261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
329361847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
329461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
329561847f8eSopenharmony_ci     * @since 9
329661847f8eSopenharmony_ci     */
329761847f8eSopenharmony_ci    /**
329861847f8eSopenharmony_ci     * UnSubscribes to device change events.
329961847f8eSopenharmony_ci     * @param { 'deviceChange' } type - Type of the event to listen for. Only the deviceChange event is supported.
330061847f8eSopenharmony_ci     * @param { Callback<DeviceChangeAction> } callback - Callback used to obtain the device update details.
330161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
330261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
330361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
330461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
330561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
330661847f8eSopenharmony_ci     * @crossplatform
330761847f8eSopenharmony_ci     * @since 12
330861847f8eSopenharmony_ci     */
330961847f8eSopenharmony_ci    off(type: 'deviceChange', callback?: Callback<DeviceChangeAction>): void;
331061847f8eSopenharmony_ci
331161847f8eSopenharmony_ci    /**
331261847f8eSopenharmony_ci     * Obtains all the available audio devices with a specific device usage.
331361847f8eSopenharmony_ci     * @param { DeviceUsage } deviceUsage - Audio device usage.
331461847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } The device list.
331561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
331661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
331761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
331861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
331961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
332061847f8eSopenharmony_ci     * @since 12
332161847f8eSopenharmony_ci     */
332261847f8eSopenharmony_ci    getAvailableDevices(deviceUsage: DeviceUsage): AudioDeviceDescriptors;
332361847f8eSopenharmony_ci
332461847f8eSopenharmony_ci    /**
332561847f8eSopenharmony_ci     * Subscribes to available device change events. When a device is connected/disconnected, registered clients will receive
332661847f8eSopenharmony_ci     * the callback.
332761847f8eSopenharmony_ci     * @param { 'availableDeviceChange' } type - Type of the event to listen for. Only the availableDeviceChange event is supported.
332861847f8eSopenharmony_ci     * @param { DeviceUsage } deviceUsage - Audio device usage.
332961847f8eSopenharmony_ci     * @param { Callback<DeviceChangeAction> } callback - Callback used to obtain the device update details.
333061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
333161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
333261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
333361847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
333461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
333561847f8eSopenharmony_ci     * @since 12
333661847f8eSopenharmony_ci     */
333761847f8eSopenharmony_ci    on(type: 'availableDeviceChange', deviceUsage: DeviceUsage, callback: Callback<DeviceChangeAction>): void;
333861847f8eSopenharmony_ci
333961847f8eSopenharmony_ci    /**
334061847f8eSopenharmony_ci     * UnSubscribes to available device change events.
334161847f8eSopenharmony_ci     * @param { 'availableDeviceChange' } type - Type of the event to listen for. Only the availableDeviceChange event is supported.
334261847f8eSopenharmony_ci     * @param { Callback<DeviceChangeAction> } callback - Callback used to obtain the device update details.
334361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
334461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
334561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
334661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
334761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
334861847f8eSopenharmony_ci     * @since 12
334961847f8eSopenharmony_ci     */
335061847f8eSopenharmony_ci    off(type: 'availableDeviceChange', callback?: Callback<DeviceChangeAction>): void;
335161847f8eSopenharmony_ci
335261847f8eSopenharmony_ci    /**
335361847f8eSopenharmony_ci     * Sets a device to the active state. This method uses an asynchronous callback to return the result.
335461847f8eSopenharmony_ci     * @param { CommunicationDeviceType } deviceType - Audio device type.
335561847f8eSopenharmony_ci     * @param { boolean } active - Active status to set. The value true means to set the device to
335661847f8eSopenharmony_ci     *  the active status, and false means the opposite.
335761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
335861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
335961847f8eSopenharmony_ci     * @since 9
336061847f8eSopenharmony_ci     */
336161847f8eSopenharmony_ci    /**
336261847f8eSopenharmony_ci     * Sets a device to the active state. This method uses an asynchronous callback to return the result.
336361847f8eSopenharmony_ci     * @param { CommunicationDeviceType } deviceType - Audio device type.
336461847f8eSopenharmony_ci     * @param { boolean } active - Active status to set. The value true means to set the device to
336561847f8eSopenharmony_ci     *  the active status, and false means the opposite.
336661847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
336761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
336861847f8eSopenharmony_ci     * @crossplatform
336961847f8eSopenharmony_ci     * @since 12
337061847f8eSopenharmony_ci     */
337161847f8eSopenharmony_ci    setCommunicationDevice(deviceType: CommunicationDeviceType, active: boolean, callback: AsyncCallback<void>): void;
337261847f8eSopenharmony_ci    /**
337361847f8eSopenharmony_ci     * Sets a device to the active state. This method uses a promise to return the result.
337461847f8eSopenharmony_ci     * @param { CommunicationDeviceType } deviceType - Audio device type.
337561847f8eSopenharmony_ci     * @param { boolean } active - Active status to set. The value true means to set the device to the active status,
337661847f8eSopenharmony_ci     * and false means the opposite.
337761847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
337861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
337961847f8eSopenharmony_ci     * @since 9
338061847f8eSopenharmony_ci     */
338161847f8eSopenharmony_ci    /**
338261847f8eSopenharmony_ci     * Sets a device to the active state. This method uses a promise to return the result.
338361847f8eSopenharmony_ci     * @param { CommunicationDeviceType } deviceType - Audio device type.
338461847f8eSopenharmony_ci     * @param { boolean } active - Active status to set. The value true means to set the device to the active status,
338561847f8eSopenharmony_ci     * and false means the opposite.
338661847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
338761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
338861847f8eSopenharmony_ci     * @crossplatform
338961847f8eSopenharmony_ci     * @since 12
339061847f8eSopenharmony_ci     */
339161847f8eSopenharmony_ci    setCommunicationDevice(deviceType: CommunicationDeviceType, active: boolean): Promise<void>;
339261847f8eSopenharmony_ci
339361847f8eSopenharmony_ci    /**
339461847f8eSopenharmony_ci     * Checks whether a device is active. This method uses an asynchronous callback to return the query result.
339561847f8eSopenharmony_ci     * @param { CommunicationDeviceType } deviceType - Audio device type.
339661847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Callback used to return the active status of the device.
339761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
339861847f8eSopenharmony_ci     * @since 9
339961847f8eSopenharmony_ci     */
340061847f8eSopenharmony_ci    /**
340161847f8eSopenharmony_ci     * Checks whether a device is active. This method uses an asynchronous callback to return the query result.
340261847f8eSopenharmony_ci     * @param { CommunicationDeviceType } deviceType - Audio device type.
340361847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Callback used to return the active status of the device.
340461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
340561847f8eSopenharmony_ci     * @crossplatform
340661847f8eSopenharmony_ci     * @since 12
340761847f8eSopenharmony_ci     */
340861847f8eSopenharmony_ci    isCommunicationDeviceActive(deviceType: CommunicationDeviceType, callback: AsyncCallback<boolean>): void;
340961847f8eSopenharmony_ci    /**
341061847f8eSopenharmony_ci     * Checks whether a device is active. This method uses a promise to return the query result.
341161847f8eSopenharmony_ci     * @param { CommunicationDeviceType } deviceType - Audio device type.
341261847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the active status of the device.
341361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
341461847f8eSopenharmony_ci     * @since 9
341561847f8eSopenharmony_ci     */
341661847f8eSopenharmony_ci    /**
341761847f8eSopenharmony_ci     * Checks whether a device is active. This method uses a promise to return the query result.
341861847f8eSopenharmony_ci     * @param { CommunicationDeviceType } deviceType - Audio device type.
341961847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the active status of the device.
342061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
342161847f8eSopenharmony_ci     * @crossplatform
342261847f8eSopenharmony_ci     * @since 12
342361847f8eSopenharmony_ci     */
342461847f8eSopenharmony_ci    isCommunicationDeviceActive(deviceType: CommunicationDeviceType): Promise<boolean>;
342561847f8eSopenharmony_ci    /**
342661847f8eSopenharmony_ci     * Checks whether a device is active.
342761847f8eSopenharmony_ci     * @param { CommunicationDeviceType } deviceType - Audio device type.
342861847f8eSopenharmony_ci     * @returns { boolean } The active status of the device.
342961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
343061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
343161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
343261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
343361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
343461847f8eSopenharmony_ci     * @since 10
343561847f8eSopenharmony_ci     */
343661847f8eSopenharmony_ci    /**
343761847f8eSopenharmony_ci     * Checks whether a device is active.
343861847f8eSopenharmony_ci     * @param { CommunicationDeviceType } deviceType - Audio device type.
343961847f8eSopenharmony_ci     * @returns { boolean } The active status of the device.
344061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
344161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
344261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
344361847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
344461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Communication
344561847f8eSopenharmony_ci     * @crossplatform
344661847f8eSopenharmony_ci     * @since 12
344761847f8eSopenharmony_ci     */
344861847f8eSopenharmony_ci    isCommunicationDeviceActiveSync(deviceType: CommunicationDeviceType): boolean;
344961847f8eSopenharmony_ci
345061847f8eSopenharmony_ci    /**
345161847f8eSopenharmony_ci     * Select the output device. This method uses an asynchronous callback to return the result.
345261847f8eSopenharmony_ci     * @param { AudioDeviceDescriptors } outputAudioDevices - Audio device description
345361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
345461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
345561847f8eSopenharmony_ci     * @systemapi
345661847f8eSopenharmony_ci     * @since 9
345761847f8eSopenharmony_ci     */
345861847f8eSopenharmony_ci    selectOutputDevice(outputAudioDevices: AudioDeviceDescriptors, callback: AsyncCallback<void>): void;
345961847f8eSopenharmony_ci    /**
346061847f8eSopenharmony_ci     * Select the output device. This method uses a promise to return the result.
346161847f8eSopenharmony_ci     * @param { AudioDeviceDescriptors } outputAudioDevices - Audio device description
346261847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
346361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
346461847f8eSopenharmony_ci     * @systemapi
346561847f8eSopenharmony_ci     * @since 9
346661847f8eSopenharmony_ci     */
346761847f8eSopenharmony_ci    selectOutputDevice(outputAudioDevices: AudioDeviceDescriptors): Promise<void>;
346861847f8eSopenharmony_ci
346961847f8eSopenharmony_ci    /**
347061847f8eSopenharmony_ci     * Select the output device with desired AudioRenderer. This method uses an asynchronous callback to return the result.
347161847f8eSopenharmony_ci     * @param { AudioRendererFilter } filter - Filter for AudioRenderer.
347261847f8eSopenharmony_ci     * @param { AudioDeviceDescriptors } outputAudioDevices - Audio device description.
347361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
347461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
347561847f8eSopenharmony_ci     * @systemapi
347661847f8eSopenharmony_ci     * @since 9
347761847f8eSopenharmony_ci     */
347861847f8eSopenharmony_ci    selectOutputDeviceByFilter(filter: AudioRendererFilter, outputAudioDevices: AudioDeviceDescriptors, callback: AsyncCallback<void>): void;
347961847f8eSopenharmony_ci    /**
348061847f8eSopenharmony_ci     * Select the output device with desired AudioRenderer. This method uses a promise to return the result.
348161847f8eSopenharmony_ci     * @param { AudioRendererFilter } filter - Filter for AudioRenderer.
348261847f8eSopenharmony_ci     * @param { AudioDeviceDescriptors } outputAudioDevices - Audio device description
348361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
348461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
348561847f8eSopenharmony_ci     * @systemapi
348661847f8eSopenharmony_ci     * @since 9
348761847f8eSopenharmony_ci     */
348861847f8eSopenharmony_ci    selectOutputDeviceByFilter(filter: AudioRendererFilter, outputAudioDevices: AudioDeviceDescriptors): Promise<void>;
348961847f8eSopenharmony_ci
349061847f8eSopenharmony_ci    /**
349161847f8eSopenharmony_ci     * Select the input device. This method uses an asynchronous callback to return the result.
349261847f8eSopenharmony_ci     * @param { AudioDeviceDescriptors } inputAudioDevices - Audio device description
349361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
349461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
349561847f8eSopenharmony_ci     * @systemapi
349661847f8eSopenharmony_ci     * @since 9
349761847f8eSopenharmony_ci     */
349861847f8eSopenharmony_ci    selectInputDevice(inputAudioDevices: AudioDeviceDescriptors, callback: AsyncCallback<void>): void;
349961847f8eSopenharmony_ci    /**
350061847f8eSopenharmony_ci     * Select the input device. This method uses a promise to return the result.
350161847f8eSopenharmony_ci     * @param { AudioDeviceDescriptors } inputAudioDevices - Audio device description
350261847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
350361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
350461847f8eSopenharmony_ci     * @systemapi
350561847f8eSopenharmony_ci     * @since 9
350661847f8eSopenharmony_ci     */
350761847f8eSopenharmony_ci    selectInputDevice(inputAudioDevices: AudioDeviceDescriptors): Promise<void>;
350861847f8eSopenharmony_ci
350961847f8eSopenharmony_ci    /**
351061847f8eSopenharmony_ci     * Select the input device with desired AudioCapturer. This method uses a promise to return the result.
351161847f8eSopenharmony_ci     * @param { AudioCapturerFilter } filter - Filter for AudioCapturer.
351261847f8eSopenharmony_ci     * @param { AudioDeviceDescriptors } inputAudioDevices - Audio device descriptions
351361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
351461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
351561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
351661847f8eSopenharmony_ci     *                                 1.Mandatory parameters unspecified.
351761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
351861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
351961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
352061847f8eSopenharmony_ci     * @systemapi
352161847f8eSopenharmony_ci     * @since 12
352261847f8eSopenharmony_ci     */
352361847f8eSopenharmony_ci    selectInputDeviceByFilter(filter: AudioCapturerFilter, inputAudioDevices: AudioDeviceDescriptors): Promise<void>;
352461847f8eSopenharmony_ci
352561847f8eSopenharmony_ci    /**
352661847f8eSopenharmony_ci     * Get output device for target audio renderer info.
352761847f8eSopenharmony_ci     * @param { AudioRendererInfo } rendererInfo - Audio renderer information
352861847f8eSopenharmony_ci     * @param { AsyncCallback<AudioDeviceDescriptors> } callback - Callback used to return the result.
352961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
353061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
353161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
353261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback.
353361847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by callback.
353461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
353561847f8eSopenharmony_ci     * @since 10
353661847f8eSopenharmony_ci     */
353761847f8eSopenharmony_ci    /**
353861847f8eSopenharmony_ci     * Get output device for target audio renderer info.
353961847f8eSopenharmony_ci     * @param { AudioRendererInfo } rendererInfo - Audio renderer information
354061847f8eSopenharmony_ci     * @param { AsyncCallback<AudioDeviceDescriptors> } callback - Callback used to return the result.
354161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
354261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
354361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
354461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback.
354561847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by callback.
354661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
354761847f8eSopenharmony_ci     * @crossplatform
354861847f8eSopenharmony_ci     * @since 12
354961847f8eSopenharmony_ci     */
355061847f8eSopenharmony_ci    getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo, callback: AsyncCallback<AudioDeviceDescriptors>): void;
355161847f8eSopenharmony_ci    /**
355261847f8eSopenharmony_ci     * Get output device for target audio renderer info.
355361847f8eSopenharmony_ci     * @param { AudioRendererInfo } rendererInfo - Audio renderer information.
355461847f8eSopenharmony_ci     * @returns { Promise<AudioDeviceDescriptors> } Promise used to return the result.
355561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
355661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
355761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
355861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
355961847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by promise.
356061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
356161847f8eSopenharmony_ci     * @since 10
356261847f8eSopenharmony_ci     */
356361847f8eSopenharmony_ci    /**
356461847f8eSopenharmony_ci     * Get output device for target audio renderer info.
356561847f8eSopenharmony_ci     * @param { AudioRendererInfo } rendererInfo - Audio renderer information.
356661847f8eSopenharmony_ci     * @returns { Promise<AudioDeviceDescriptors> } Promise used to return the result.
356761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
356861847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
356961847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
357061847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
357161847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by promise.
357261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
357361847f8eSopenharmony_ci     * @crossplatform
357461847f8eSopenharmony_ci     * @since 12
357561847f8eSopenharmony_ci     */
357661847f8eSopenharmony_ci    getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo): Promise<AudioDeviceDescriptors>;
357761847f8eSopenharmony_ci
357861847f8eSopenharmony_ci    /**
357961847f8eSopenharmony_ci     * Gets preferred output device for target audio renderer info.
358061847f8eSopenharmony_ci     * @param { AudioRendererInfo } rendererInfo - Audio renderer information.
358161847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } The preferred devices.
358261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
358361847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
358461847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
358561847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
358661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
358761847f8eSopenharmony_ci     * @since 10
358861847f8eSopenharmony_ci     */
358961847f8eSopenharmony_ci    /**
359061847f8eSopenharmony_ci     * Gets preferred output device for target audio renderer info.
359161847f8eSopenharmony_ci     * @param { AudioRendererInfo } rendererInfo - Audio renderer information.
359261847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } The preferred devices.
359361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
359461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
359561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
359661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
359761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
359861847f8eSopenharmony_ci     * @crossplatform
359961847f8eSopenharmony_ci     * @since 12
360061847f8eSopenharmony_ci     */
360161847f8eSopenharmony_ci    getPreferredOutputDeviceForRendererInfoSync(rendererInfo: AudioRendererInfo): AudioDeviceDescriptors;
360261847f8eSopenharmony_ci
360361847f8eSopenharmony_ci    /**
360461847f8eSopenharmony_ci     * Get the preferred output devices by the target audio renderer filter.
360561847f8eSopenharmony_ci     * @param { AudioRendererFilter } filter - Audio renderer filter.
360661847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } The preferred devices.
360761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
360861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
360961847f8eSopenharmony_ci     *                                 1.Mandatory parameters unspecified.
361061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
361161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
361261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
361361847f8eSopenharmony_ci     * @systemapi
361461847f8eSopenharmony_ci     * @since 12
361561847f8eSopenharmony_ci     */
361661847f8eSopenharmony_ci    getPreferredOutputDeviceByFilter(filter: AudioRendererFilter): AudioDeviceDescriptors;
361761847f8eSopenharmony_ci
361861847f8eSopenharmony_ci    /**
361961847f8eSopenharmony_ci     * Subscribes to prefer output device change events. When prefer device for target audio renderer info changes,
362061847f8eSopenharmony_ci     * registered clients will receive the callback.
362161847f8eSopenharmony_ci     * @param { 'preferOutputDeviceChangeForRendererInfo' } type - Type of the event to listen for. Only the
362261847f8eSopenharmony_ci     * preferOutputDeviceChangeForRendererInfo event is supported.
362361847f8eSopenharmony_ci     * @param { AudioRendererInfo } rendererInfo - Audio renderer information.
362461847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to obtain the changed prefer devices information.
362561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
362661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
362761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
362861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
362961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
363061847f8eSopenharmony_ci     * @since 10
363161847f8eSopenharmony_ci     */
363261847f8eSopenharmony_ci    /**
363361847f8eSopenharmony_ci     * Subscribes to prefer output device change events. When prefer device for target audio renderer info changes,
363461847f8eSopenharmony_ci     * registered clients will receive the callback.
363561847f8eSopenharmony_ci     * @param { 'preferOutputDeviceChangeForRendererInfo' } type - Type of the event to listen for. Only the
363661847f8eSopenharmony_ci     * preferOutputDeviceChangeForRendererInfo event is supported.
363761847f8eSopenharmony_ci     * @param { AudioRendererInfo } rendererInfo - Audio renderer information.
363861847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to obtain the changed prefer devices information.
363961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
364061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
364161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
364261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
364361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
364461847f8eSopenharmony_ci     * @crossplatform
364561847f8eSopenharmony_ci     * @since 12
364661847f8eSopenharmony_ci     */
364761847f8eSopenharmony_ci    on(type: 'preferOutputDeviceChangeForRendererInfo', rendererInfo: AudioRendererInfo, callback: Callback<AudioDeviceDescriptors>): void;
364861847f8eSopenharmony_ci    /**
364961847f8eSopenharmony_ci     * UnSubscribes to prefer output device change events.
365061847f8eSopenharmony_ci     * @param { 'preferOutputDeviceChangeForRendererInfo' } type - Type of the event to listen for. Only the
365161847f8eSopenharmony_ci     * preferOutputDeviceChangeForRendererInfo event is supported.
365261847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to obtain the changed prefer devices in subscribe.
365361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
365461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
365561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
365661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
365761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
365861847f8eSopenharmony_ci     * @since 10
365961847f8eSopenharmony_ci     */
366061847f8eSopenharmony_ci    /**
366161847f8eSopenharmony_ci     * UnSubscribes to prefer output device change events.
366261847f8eSopenharmony_ci     * @param { 'preferOutputDeviceChangeForRendererInfo' } type - Type of the event to listen for. Only the
366361847f8eSopenharmony_ci     * preferOutputDeviceChangeForRendererInfo event is supported.
366461847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to obtain the changed prefer devices in subscribe.
366561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
366661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
366761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
366861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
366961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
367061847f8eSopenharmony_ci     * @crossplatform
367161847f8eSopenharmony_ci     * @since 12
367261847f8eSopenharmony_ci     */
367361847f8eSopenharmony_ci    off(type: 'preferOutputDeviceChangeForRendererInfo', callback?: Callback<AudioDeviceDescriptors>): void;
367461847f8eSopenharmony_ci
367561847f8eSopenharmony_ci    /**
367661847f8eSopenharmony_ci     * Get input device for target audio capturer info.
367761847f8eSopenharmony_ci     * @param { AudioCapturerInfo } capturerInfo - Audio capturer information.
367861847f8eSopenharmony_ci     * @param { AsyncCallback<AudioDeviceDescriptors> } callback - Callback used to return the result.
367961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
368061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
368161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
368261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback.
368361847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by callback.
368461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
368561847f8eSopenharmony_ci     * @since 10
368661847f8eSopenharmony_ci     */
368761847f8eSopenharmony_ci    /**
368861847f8eSopenharmony_ci     * Get input device for target audio capturer info.
368961847f8eSopenharmony_ci     * @param { AudioCapturerInfo } capturerInfo - Audio capturer information.
369061847f8eSopenharmony_ci     * @param { AsyncCallback<AudioDeviceDescriptors> } callback - Callback used to return the result.
369161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
369261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
369361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
369461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback.
369561847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by callback.
369661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
369761847f8eSopenharmony_ci     * @crossplatform
369861847f8eSopenharmony_ci     * @since 12
369961847f8eSopenharmony_ci     */
370061847f8eSopenharmony_ci    getPreferredInputDeviceForCapturerInfo(capturerInfo: AudioCapturerInfo, callback: AsyncCallback<AudioDeviceDescriptors>): void;
370161847f8eSopenharmony_ci    /**
370261847f8eSopenharmony_ci     * Get input device for target audio capturer info.
370361847f8eSopenharmony_ci     * @param { AudioCapturerInfo } capturerInfo - Audio capturer information.
370461847f8eSopenharmony_ci     * @returns { Promise<AudioDeviceDescriptors> } Promise used to return the result.
370561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
370661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
370761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
370861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
370961847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by promise.
371061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
371161847f8eSopenharmony_ci     * @since 10
371261847f8eSopenharmony_ci     */
371361847f8eSopenharmony_ci    /**
371461847f8eSopenharmony_ci     * Get input device for target audio capturer info.
371561847f8eSopenharmony_ci     * @param { AudioCapturerInfo } capturerInfo - Audio capturer information.
371661847f8eSopenharmony_ci     * @returns { Promise<AudioDeviceDescriptors> } Promise used to return the result.
371761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
371861847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
371961847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
372061847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
372161847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by promise.
372261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
372361847f8eSopenharmony_ci     * @crossplatform
372461847f8eSopenharmony_ci     * @since 12
372561847f8eSopenharmony_ci     */
372661847f8eSopenharmony_ci    getPreferredInputDeviceForCapturerInfo(capturerInfo: AudioCapturerInfo): Promise<AudioDeviceDescriptors>;
372761847f8eSopenharmony_ci
372861847f8eSopenharmony_ci    /**
372961847f8eSopenharmony_ci     * Get the preferred input device for the target audio capturer filter.
373061847f8eSopenharmony_ci     * @param { AudioCapturerFilter } filter - Audio capturer filter.
373161847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } The preferred devices.
373261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
373361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
373461847f8eSopenharmony_ci     *                                 1.Mandatory parameters unspecified;
373561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
373661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
373761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
373861847f8eSopenharmony_ci     * @systemapi
373961847f8eSopenharmony_ci     * @since 12
374061847f8eSopenharmony_ci     */
374161847f8eSopenharmony_ci    getPreferredInputDeviceByFilter(filter: AudioCapturerFilter): AudioDeviceDescriptors;
374261847f8eSopenharmony_ci
374361847f8eSopenharmony_ci    /**
374461847f8eSopenharmony_ci     * Subscribes to preferred input device change events. When preferred device for target audio capturer info changes,
374561847f8eSopenharmony_ci     * registered clients will receive the callback.
374661847f8eSopenharmony_ci     * @param { 'preferredInputDeviceChangeForCapturerInfo' } type - Type of the event to listen for.
374761847f8eSopenharmony_ci     * @param { AudioCapturerInfo } capturerInfo - Audio capturer information.
374861847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to obtain the changed preferred devices information.
374961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
375061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
375161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
375261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
375361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
375461847f8eSopenharmony_ci     * @since 10
375561847f8eSopenharmony_ci     */
375661847f8eSopenharmony_ci    /**
375761847f8eSopenharmony_ci     * Subscribes to preferred input device change events. When preferred device for target audio capturer info changes,
375861847f8eSopenharmony_ci     * registered clients will receive the callback.
375961847f8eSopenharmony_ci     * @param { 'preferredInputDeviceChangeForCapturerInfo' } type - Type of the event to listen for.
376061847f8eSopenharmony_ci     * @param { AudioCapturerInfo } capturerInfo - Audio capturer information.
376161847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to obtain the changed preferred devices information.
376261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
376361847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
376461847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
376561847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
376661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
376761847f8eSopenharmony_ci     * @crossplatform
376861847f8eSopenharmony_ci     * @since 12
376961847f8eSopenharmony_ci     */
377061847f8eSopenharmony_ci    on(type: 'preferredInputDeviceChangeForCapturerInfo', capturerInfo: AudioCapturerInfo, callback: Callback<AudioDeviceDescriptors>): void;
377161847f8eSopenharmony_ci    /**
377261847f8eSopenharmony_ci     * Unsubscribes to preferred input device change events.
377361847f8eSopenharmony_ci     * @param { 'preferredInputDeviceChangeForCapturerInfo' } type - Type of the event to listen for.
377461847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to obtain the changed preferred devices in subscribe.
377561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
377661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
377761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
377861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
377961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
378061847f8eSopenharmony_ci     * @since 10
378161847f8eSopenharmony_ci     */
378261847f8eSopenharmony_ci    /**
378361847f8eSopenharmony_ci     * Unsubscribes to preferred input device change events.
378461847f8eSopenharmony_ci     * @param { 'preferredInputDeviceChangeForCapturerInfo' } type - Type of the event to listen for.
378561847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to obtain the changed preferred devices in subscribe.
378661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
378761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
378861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
378961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
379061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
379161847f8eSopenharmony_ci     * @crossplatform
379261847f8eSopenharmony_ci     * @since 12
379361847f8eSopenharmony_ci     */
379461847f8eSopenharmony_ci    off(type: 'preferredInputDeviceChangeForCapturerInfo', callback?: Callback<AudioDeviceDescriptors>): void;
379561847f8eSopenharmony_ci
379661847f8eSopenharmony_ci    /**
379761847f8eSopenharmony_ci     * Gets preferred input device for target audio capturer info.
379861847f8eSopenharmony_ci     * @param { AudioCapturerInfo } capturerInfo - Audio capturer information.
379961847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } The preferred devices.
380061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
380161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
380261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
380361847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
380461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
380561847f8eSopenharmony_ci     * @since 10
380661847f8eSopenharmony_ci     */
380761847f8eSopenharmony_ci    /**
380861847f8eSopenharmony_ci     * Gets preferred input device for target audio capturer info.
380961847f8eSopenharmony_ci     * @param { AudioCapturerInfo } capturerInfo - Audio capturer information.
381061847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } The preferred devices.
381161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
381261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
381361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
381461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
381561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
381661847f8eSopenharmony_ci     * @crossplatform
381761847f8eSopenharmony_ci     * @since 12
381861847f8eSopenharmony_ci     */
381961847f8eSopenharmony_ci    getPreferredInputDeviceForCapturerInfoSync(capturerInfo: AudioCapturerInfo): AudioDeviceDescriptors;
382061847f8eSopenharmony_ci
382161847f8eSopenharmony_ci    /**
382261847f8eSopenharmony_ci     * Query whether microphone block detection is supported on current device.
382361847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the result.
382461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
382561847f8eSopenharmony_ci     * @since 13
382661847f8eSopenharmony_ci     */
382761847f8eSopenharmony_ci    isMicBlockDetectionSupported():Promise<boolean>;
382861847f8eSopenharmony_ci
382961847f8eSopenharmony_ci    /**
383061847f8eSopenharmony_ci     * Subscribes microphone blocked events. Before subscribing, users should query whether block detection is supported
383161847f8eSopenharmony_ci     * on current device. The caller will receive the callback only when it is recording and the used
383261847f8eSopenharmony_ci     * microphones' block status have changed. Currently, block detecting is only support for microphones located on
383361847f8eSopenharmony_ci     * the local device.
383461847f8eSopenharmony_ci     * @param { 'micBlockStatusChanged' } type - Type of the event to listen for.
383561847f8eSopenharmony_ci     * @param { Callback<DeviceBlockStatusInfo> } callback - Callback used to obtain the microphone block status.
383661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
383761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
383861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
383961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
384061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
384161847f8eSopenharmony_ci     * @since 13
384261847f8eSopenharmony_ci     */
384361847f8eSopenharmony_ci    on(type: 'micBlockStatusChanged', callback: Callback<DeviceBlockStatusInfo>): void;
384461847f8eSopenharmony_ci
384561847f8eSopenharmony_ci    /**
384661847f8eSopenharmony_ci     * Unsubscribes microphone blocked events.
384761847f8eSopenharmony_ci     * @param { 'microphoneBlockStatusChanged' } type - Type of the event to listen for.
384861847f8eSopenharmony_ci     * @param { Callback<DeviceBlockStatusInfo> } callback - Callback used to obtain the microphone block status.
384961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
385061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
385161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
385261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
385361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
385461847f8eSopenharmony_ci     * @since 13
385561847f8eSopenharmony_ci     */
385661847f8eSopenharmony_ci     off(type: 'micBlockStatusChanged', callback?: Callback<DeviceBlockStatusInfo>): void;
385761847f8eSopenharmony_ci  }
385861847f8eSopenharmony_ci
385961847f8eSopenharmony_ci  /**
386061847f8eSopenharmony_ci   * Implements audio stream management.
386161847f8eSopenharmony_ci   * @typedef AudioStreamManager
386261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
386361847f8eSopenharmony_ci   * @since 9
386461847f8eSopenharmony_ci   */
386561847f8eSopenharmony_ci  /**
386661847f8eSopenharmony_ci   * Implements audio stream management.
386761847f8eSopenharmony_ci   * @typedef AudioStreamManager
386861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
386961847f8eSopenharmony_ci   * @crossplatform
387061847f8eSopenharmony_ci   * @since 12
387161847f8eSopenharmony_ci   */
387261847f8eSopenharmony_ci  interface AudioStreamManager {
387361847f8eSopenharmony_ci    /**
387461847f8eSopenharmony_ci     * Get information of current existing audio renderers.
387561847f8eSopenharmony_ci     * @param { AsyncCallback<AudioRendererChangeInfoArray> } callback - Callback used to return the information
387661847f8eSopenharmony_ci     * of current existing audio renderers.
387761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
387861847f8eSopenharmony_ci     * @since 9
387961847f8eSopenharmony_ci     */
388061847f8eSopenharmony_ci    /**
388161847f8eSopenharmony_ci     * Get information of current existing audio renderers.
388261847f8eSopenharmony_ci     * @param { AsyncCallback<AudioRendererChangeInfoArray> } callback - Callback used to return the information
388361847f8eSopenharmony_ci     * of current existing audio renderers.
388461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
388561847f8eSopenharmony_ci     * @crossplatform
388661847f8eSopenharmony_ci     * @since 12
388761847f8eSopenharmony_ci     */
388861847f8eSopenharmony_ci    getCurrentAudioRendererInfoArray(callback: AsyncCallback<AudioRendererChangeInfoArray>): void;
388961847f8eSopenharmony_ci    /**
389061847f8eSopenharmony_ci     * Get information of current existing audio renderers.
389161847f8eSopenharmony_ci     * @returns { Promise<AudioRendererChangeInfoArray> } Promise used to return the information of current
389261847f8eSopenharmony_ci     * existing audio renderers.
389361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
389461847f8eSopenharmony_ci     * @since 9
389561847f8eSopenharmony_ci     */
389661847f8eSopenharmony_ci    /**
389761847f8eSopenharmony_ci     * Get information of current existing audio renderers.
389861847f8eSopenharmony_ci     * @returns { Promise<AudioRendererChangeInfoArray> } Promise used to return the information of current
389961847f8eSopenharmony_ci     * existing audio renderers.
390061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
390161847f8eSopenharmony_ci     * @crossplatform
390261847f8eSopenharmony_ci     * @since 12
390361847f8eSopenharmony_ci     */
390461847f8eSopenharmony_ci    getCurrentAudioRendererInfoArray(): Promise<AudioRendererChangeInfoArray>;
390561847f8eSopenharmony_ci    /**
390661847f8eSopenharmony_ci     * Get information of current existing audio renderers.
390761847f8eSopenharmony_ci     * @returns { AudioRendererChangeInfoArray } The information of current existing audio renderers.
390861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
390961847f8eSopenharmony_ci     * @since 10
391061847f8eSopenharmony_ci     */
391161847f8eSopenharmony_ci    /**
391261847f8eSopenharmony_ci     * Get information of current existing audio renderers.
391361847f8eSopenharmony_ci     * @returns { AudioRendererChangeInfoArray } The information of current existing audio renderers.
391461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
391561847f8eSopenharmony_ci     * @crossplatform
391661847f8eSopenharmony_ci     * @since 12
391761847f8eSopenharmony_ci     */
391861847f8eSopenharmony_ci    getCurrentAudioRendererInfoArraySync(): AudioRendererChangeInfoArray;
391961847f8eSopenharmony_ci
392061847f8eSopenharmony_ci    /**
392161847f8eSopenharmony_ci     * Get information of current existing audio capturers.
392261847f8eSopenharmony_ci     * @param { AsyncCallback<AudioCapturerChangeInfoArray> } callback - Callback used to return the information
392361847f8eSopenharmony_ci     * of current existing audio capturers.
392461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
392561847f8eSopenharmony_ci     * @since 9
392661847f8eSopenharmony_ci     */
392761847f8eSopenharmony_ci    /**
392861847f8eSopenharmony_ci     * Get information of current existing audio capturers.
392961847f8eSopenharmony_ci     * @param { AsyncCallback<AudioCapturerChangeInfoArray> } callback - Callback used to return the information
393061847f8eSopenharmony_ci     * of current existing audio capturers.
393161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
393261847f8eSopenharmony_ci     * @crossplatform
393361847f8eSopenharmony_ci     * @since 12
393461847f8eSopenharmony_ci     */
393561847f8eSopenharmony_ci    getCurrentAudioCapturerInfoArray(callback: AsyncCallback<AudioCapturerChangeInfoArray>): void;
393661847f8eSopenharmony_ci    /**
393761847f8eSopenharmony_ci     * Get information of current existing audio capturers.
393861847f8eSopenharmony_ci     * @returns { Promise<AudioCapturerChangeInfoArray> } Promise used to return the information of current existing
393961847f8eSopenharmony_ci     * audio capturers.
394061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
394161847f8eSopenharmony_ci     * @since 9
394261847f8eSopenharmony_ci     */
394361847f8eSopenharmony_ci    /**
394461847f8eSopenharmony_ci     * Get information of current existing audio capturers.
394561847f8eSopenharmony_ci     * @returns { Promise<AudioCapturerChangeInfoArray> } Promise used to return the information of current existing
394661847f8eSopenharmony_ci     * audio capturers.
394761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
394861847f8eSopenharmony_ci     * @crossplatform
394961847f8eSopenharmony_ci     * @since 12
395061847f8eSopenharmony_ci     */
395161847f8eSopenharmony_ci    getCurrentAudioCapturerInfoArray(): Promise<AudioCapturerChangeInfoArray>;
395261847f8eSopenharmony_ci    /**
395361847f8eSopenharmony_ci     * Get information of current existing audio capturers.
395461847f8eSopenharmony_ci     * @returns { AudioCapturerChangeInfoArray } The information of current existing audio capturers.
395561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
395661847f8eSopenharmony_ci     * @since 10
395761847f8eSopenharmony_ci     */
395861847f8eSopenharmony_ci    /**
395961847f8eSopenharmony_ci     * Get information of current existing audio capturers.
396061847f8eSopenharmony_ci     * @returns { AudioCapturerChangeInfoArray } The information of current existing audio capturers.
396161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
396261847f8eSopenharmony_ci     * @crossplatform
396361847f8eSopenharmony_ci     * @since 12
396461847f8eSopenharmony_ci     */
396561847f8eSopenharmony_ci    getCurrentAudioCapturerInfoArraySync(): AudioCapturerChangeInfoArray;
396661847f8eSopenharmony_ci
396761847f8eSopenharmony_ci    /**
396861847f8eSopenharmony_ci     * Gets information of audio effects.
396961847f8eSopenharmony_ci     * @param { StreamUsage } usage - Stream usage.
397061847f8eSopenharmony_ci     * @param { AsyncCallback<AudioEffectInfoArray> } callback - Callback used to return the information of audio effects.
397161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
397261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
397361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
397461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback.
397561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
397661847f8eSopenharmony_ci     * @since 10
397761847f8eSopenharmony_ci     */
397861847f8eSopenharmony_ci    getAudioEffectInfoArray(usage: StreamUsage, callback: AsyncCallback<AudioEffectInfoArray>): void;
397961847f8eSopenharmony_ci    /**
398061847f8eSopenharmony_ci     * Gets information of audio effects.
398161847f8eSopenharmony_ci     * @param { StreamUsage } usage - Stream usage.
398261847f8eSopenharmony_ci     * @returns { Promise<AudioEffectInfoArray> } Promise used to return the information of audio effects.
398361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
398461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
398561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
398661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
398761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
398861847f8eSopenharmony_ci     * @since 10
398961847f8eSopenharmony_ci     */
399061847f8eSopenharmony_ci    getAudioEffectInfoArray(usage: StreamUsage): Promise<AudioEffectInfoArray>;
399161847f8eSopenharmony_ci    /**
399261847f8eSopenharmony_ci     * Gets information of audio effects.
399361847f8eSopenharmony_ci     * @param { StreamUsage } usage - Stream usage.
399461847f8eSopenharmony_ci     * @returns { AudioEffectInfoArray } The information of audio effects.
399561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
399661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
399761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
399861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
399961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
400061847f8eSopenharmony_ci     * @since 10
400161847f8eSopenharmony_ci     */
400261847f8eSopenharmony_ci    getAudioEffectInfoArraySync(usage: StreamUsage): AudioEffectInfoArray;
400361847f8eSopenharmony_ci
400461847f8eSopenharmony_ci    /**
400561847f8eSopenharmony_ci     * Listens for audio renderer change events. When there is any audio renderer change,
400661847f8eSopenharmony_ci     * registered clients will receive the callback.
400761847f8eSopenharmony_ci     * @param { 'audioRendererChange' } type - Type of the event to listen for. Only the audioRendererChange event is supported.
400861847f8eSopenharmony_ci     * @param { Callback<AudioRendererChangeInfoArray> } callback - Callback invoked for the audio renderer change event.
400961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
401061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
401161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
401261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
401361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
401461847f8eSopenharmony_ci     * @since 9
401561847f8eSopenharmony_ci     */
401661847f8eSopenharmony_ci    /**
401761847f8eSopenharmony_ci     * Listens for audio renderer change events. When there is any audio renderer change,
401861847f8eSopenharmony_ci     * registered clients will receive the callback.
401961847f8eSopenharmony_ci     * @param { 'audioRendererChange' } type - Type of the event to listen for. Only the audioRendererChange event is supported.
402061847f8eSopenharmony_ci     * @param { Callback<AudioRendererChangeInfoArray> } callback - Callback invoked for the audio renderer change event.
402161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
402261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
402361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
402461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
402561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
402661847f8eSopenharmony_ci     * @crossplatform
402761847f8eSopenharmony_ci     * @since 12
402861847f8eSopenharmony_ci     */
402961847f8eSopenharmony_ci    on(type: 'audioRendererChange', callback: Callback<AudioRendererChangeInfoArray>): void;
403061847f8eSopenharmony_ci
403161847f8eSopenharmony_ci    /**
403261847f8eSopenharmony_ci     * UnSubscribes to audio renderer change events.
403361847f8eSopenharmony_ci     * @param { 'audioRendererChange' } type - Type of the event to listen for. Only the audioRendererChange event is supported.
403461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
403561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
403661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
403761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
403861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
403961847f8eSopenharmony_ci     * @since 9
404061847f8eSopenharmony_ci     */
404161847f8eSopenharmony_ci    /**
404261847f8eSopenharmony_ci     * UnSubscribes to audio renderer change events.
404361847f8eSopenharmony_ci     * @param { 'audioRendererChange' } type - Type of the event to listen for. Only the audioRendererChange event is supported.
404461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
404561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
404661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
404761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
404861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
404961847f8eSopenharmony_ci     * @crossplatform
405061847f8eSopenharmony_ci     * @since 12
405161847f8eSopenharmony_ci     */
405261847f8eSopenharmony_ci    off(type: 'audioRendererChange'): void;
405361847f8eSopenharmony_ci
405461847f8eSopenharmony_ci    /**
405561847f8eSopenharmony_ci     * Listens for audio capturer change events. When there is any audio capturer change,
405661847f8eSopenharmony_ci     * registered clients will receive the callback.
405761847f8eSopenharmony_ci     * @param { 'audioCapturerChange' } type - Type of the event to listen for. Only the audioCapturerChange event is supported.
405861847f8eSopenharmony_ci     * @param { Callback<AudioCapturerChangeInfoArray> } callback - Callback invoked for the audio capturer change event.
405961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
406061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
406161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
406261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
406361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
406461847f8eSopenharmony_ci     * @since 9
406561847f8eSopenharmony_ci     */
406661847f8eSopenharmony_ci    /**
406761847f8eSopenharmony_ci     * Listens for audio capturer change events. When there is any audio capturer change,
406861847f8eSopenharmony_ci     * registered clients will receive the callback.
406961847f8eSopenharmony_ci     * @param { 'audioCapturerChange' } type - Type of the event to listen for. Only the audioCapturerChange event is supported.
407061847f8eSopenharmony_ci     * @param { Callback<AudioCapturerChangeInfoArray> } callback - Callback invoked for the audio capturer change event.
407161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
407261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
407361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
407461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
407561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
407661847f8eSopenharmony_ci     * @crossplatform
407761847f8eSopenharmony_ci     * @since 12
407861847f8eSopenharmony_ci     */
407961847f8eSopenharmony_ci    on(type: 'audioCapturerChange', callback: Callback<AudioCapturerChangeInfoArray>): void;
408061847f8eSopenharmony_ci
408161847f8eSopenharmony_ci    /**
408261847f8eSopenharmony_ci     * UnSubscribes to audio capturer change events.
408361847f8eSopenharmony_ci     * @param { 'audioCapturerChange' } type - Type of the event to listen for. Only the audioCapturerChange event is supported.
408461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
408561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
408661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
408761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
408861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
408961847f8eSopenharmony_ci     * @since 9
409061847f8eSopenharmony_ci     */
409161847f8eSopenharmony_ci    /**
409261847f8eSopenharmony_ci     * UnSubscribes to audio capturer change events.
409361847f8eSopenharmony_ci     * @param { 'audioCapturerChange' } type - Type of the event to listen for. Only the audioCapturerChange event is supported.
409461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
409561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
409661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
409761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
409861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
409961847f8eSopenharmony_ci     * @crossplatform
410061847f8eSopenharmony_ci     * @since 12
410161847f8eSopenharmony_ci     */
410261847f8eSopenharmony_ci    off(type: 'audioCapturerChange'): void;
410361847f8eSopenharmony_ci
410461847f8eSopenharmony_ci    /**
410561847f8eSopenharmony_ci     * Checks whether a stream is active. This method uses an asynchronous callback to return the query result.
410661847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
410761847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Callback used to return the active status of the stream.
410861847f8eSopenharmony_ci     *  The value true means that the stream is active, and false means the opposite.
410961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
411061847f8eSopenharmony_ci     * @since 9
411161847f8eSopenharmony_ci     */
411261847f8eSopenharmony_ci    /**
411361847f8eSopenharmony_ci     * Checks whether a stream is active. This method uses an asynchronous callback to return the query result.
411461847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
411561847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Callback used to return the active status of the stream.
411661847f8eSopenharmony_ci     *  The value true means that the stream is active, and false means the opposite.
411761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
411861847f8eSopenharmony_ci     * @crossplatform
411961847f8eSopenharmony_ci     * @since 12
412061847f8eSopenharmony_ci     */
412161847f8eSopenharmony_ci    isActive(volumeType: AudioVolumeType, callback: AsyncCallback<boolean>): void;
412261847f8eSopenharmony_ci    /**
412361847f8eSopenharmony_ci     * Checks whether a stream is active. This method uses a promise to return the query result.
412461847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
412561847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the active status of the stream. The value
412661847f8eSopenharmony_ci     * true means that the stream is active, and false means the opposite.
412761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
412861847f8eSopenharmony_ci     * @since 9
412961847f8eSopenharmony_ci     */
413061847f8eSopenharmony_ci    /**
413161847f8eSopenharmony_ci     * Checks whether a stream is active. This method uses a promise to return the query result.
413261847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
413361847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the active status of the stream. The value
413461847f8eSopenharmony_ci     * true means that the stream is active, and false means the opposite.
413561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
413661847f8eSopenharmony_ci     * @crossplatform
413761847f8eSopenharmony_ci     * @since 12
413861847f8eSopenharmony_ci     */
413961847f8eSopenharmony_ci    isActive(volumeType: AudioVolumeType): Promise<boolean>;
414061847f8eSopenharmony_ci    /**
414161847f8eSopenharmony_ci     * Checks whether a stream is active.
414261847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
414361847f8eSopenharmony_ci     * @returns { boolean } The active status of the stream.
414461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
414561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
414661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
414761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
414861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
414961847f8eSopenharmony_ci     * @since 10
415061847f8eSopenharmony_ci     */
415161847f8eSopenharmony_ci    /**
415261847f8eSopenharmony_ci     * Checks whether a stream is active.
415361847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
415461847f8eSopenharmony_ci     * @returns { boolean } The active status of the stream.
415561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
415661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
415761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
415861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
415961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
416061847f8eSopenharmony_ci     * @crossplatform
416161847f8eSopenharmony_ci     * @since 12
416261847f8eSopenharmony_ci     */
416361847f8eSopenharmony_ci    isActiveSync(volumeType: AudioVolumeType): boolean;
416461847f8eSopenharmony_ci  }
416561847f8eSopenharmony_ci
416661847f8eSopenharmony_ci  /**
416761847f8eSopenharmony_ci   * Audio concurrency mode.
416861847f8eSopenharmony_ci   * @enum { number }
416961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
417061847f8eSopenharmony_ci   * @crossplatform
417161847f8eSopenharmony_ci   * @since 12
417261847f8eSopenharmony_ci   */
417361847f8eSopenharmony_ci  enum AudioConcurrencyMode {
417461847f8eSopenharmony_ci    /**
417561847f8eSopenharmony_ci     * Default concurrency mode.
417661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
417761847f8eSopenharmony_ci     * @crossplatform
417861847f8eSopenharmony_ci     * @since 12
417961847f8eSopenharmony_ci     */
418061847f8eSopenharmony_ci    CONCURRENCY_DEFAULT = 0,
418161847f8eSopenharmony_ci    /**
418261847f8eSopenharmony_ci     * Mix with others mode.
418361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
418461847f8eSopenharmony_ci     * @crossplatform
418561847f8eSopenharmony_ci     * @since 12
418661847f8eSopenharmony_ci     */
418761847f8eSopenharmony_ci    CONCURRENCY_MIX_WITH_OTHERS = 1,
418861847f8eSopenharmony_ci    /**
418961847f8eSopenharmony_ci     * Duck others mode.
419061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
419161847f8eSopenharmony_ci     * @crossplatform
419261847f8eSopenharmony_ci     * @since 12
419361847f8eSopenharmony_ci     */
419461847f8eSopenharmony_ci    CONCURRENCY_DUCK_OTHERS = 2,
419561847f8eSopenharmony_ci    /**
419661847f8eSopenharmony_ci     * Pause others mode.
419761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
419861847f8eSopenharmony_ci     * @crossplatform
419961847f8eSopenharmony_ci     * @since 12
420061847f8eSopenharmony_ci     */
420161847f8eSopenharmony_ci    CONCURRENCY_PAUSE_OTHERS = 3,
420261847f8eSopenharmony_ci  }
420361847f8eSopenharmony_ci
420461847f8eSopenharmony_ci  /**
420561847f8eSopenharmony_ci   * Audio session deactivated reason.
420661847f8eSopenharmony_ci   * @enum { number }
420761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
420861847f8eSopenharmony_ci   * @crossplatform
420961847f8eSopenharmony_ci   * @since 12
421061847f8eSopenharmony_ci   */
421161847f8eSopenharmony_ci  enum AudioSessionDeactivatedReason {
421261847f8eSopenharmony_ci    /**
421361847f8eSopenharmony_ci     * Lower priority.
421461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
421561847f8eSopenharmony_ci     * @crossplatform
421661847f8eSopenharmony_ci     * @since 12
421761847f8eSopenharmony_ci     */
421861847f8eSopenharmony_ci    DEACTIVATED_LOWER_PRIORITY = 0,
421961847f8eSopenharmony_ci    /**
422061847f8eSopenharmony_ci     * Time out.
422161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
422261847f8eSopenharmony_ci     * @crossplatform
422361847f8eSopenharmony_ci     * @since 12
422461847f8eSopenharmony_ci     */
422561847f8eSopenharmony_ci    DEACTIVATED_TIMEOUT = 1,
422661847f8eSopenharmony_ci  }
422761847f8eSopenharmony_ci
422861847f8eSopenharmony_ci  /**
422961847f8eSopenharmony_ci   * Audio session strategy.
423061847f8eSopenharmony_ci   * @typedef AudioSessionStrategy
423161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
423261847f8eSopenharmony_ci   * @crossplatform
423361847f8eSopenharmony_ci   * @since 12
423461847f8eSopenharmony_ci   */
423561847f8eSopenharmony_ci  interface AudioSessionStrategy {
423661847f8eSopenharmony_ci    /**
423761847f8eSopenharmony_ci     * Audio concurrency mode.
423861847f8eSopenharmony_ci     * @type { AudioConcurrencyMode }
423961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
424061847f8eSopenharmony_ci     * @crossplatform
424161847f8eSopenharmony_ci     * @since 12
424261847f8eSopenharmony_ci     */
424361847f8eSopenharmony_ci    concurrencyMode: AudioConcurrencyMode;
424461847f8eSopenharmony_ci  }
424561847f8eSopenharmony_ci
424661847f8eSopenharmony_ci  /**
424761847f8eSopenharmony_ci   * Audio session deactivated event.
424861847f8eSopenharmony_ci   * @typedef AudioSessionDeactivatedEvent
424961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
425061847f8eSopenharmony_ci   * @crossplatform
425161847f8eSopenharmony_ci   * @since 12
425261847f8eSopenharmony_ci   */
425361847f8eSopenharmony_ci  interface AudioSessionDeactivatedEvent {
425461847f8eSopenharmony_ci    /**
425561847f8eSopenharmony_ci     * Audio session deactivated reason.
425661847f8eSopenharmony_ci     * @type { AudioSessionDeactivatedReason }
425761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
425861847f8eSopenharmony_ci     * @crossplatform
425961847f8eSopenharmony_ci     * @since 12
426061847f8eSopenharmony_ci     */
426161847f8eSopenharmony_ci    reason: AudioSessionDeactivatedReason;
426261847f8eSopenharmony_ci  }
426361847f8eSopenharmony_ci
426461847f8eSopenharmony_ci  /**
426561847f8eSopenharmony_ci   * Implements audio session management.
426661847f8eSopenharmony_ci   * @typedef AudioSessionManager
426761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
426861847f8eSopenharmony_ci   * @crossplatform
426961847f8eSopenharmony_ci   * @since 12
427061847f8eSopenharmony_ci   */
427161847f8eSopenharmony_ci  interface AudioSessionManager {
427261847f8eSopenharmony_ci    /**
427361847f8eSopenharmony_ci     * Activate the audio session for the current pid application.
427461847f8eSopenharmony_ci     * @param { AudioSessionStrategy } strategy - Audio session strategy.
427561847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
427661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
427761847f8eSopenharmony_ci     *                                 1.Mandatory parameters unspecified.
427861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
427961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
428061847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Returned by promise.
428161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
428261847f8eSopenharmony_ci     * @crossplatform
428361847f8eSopenharmony_ci     * @since 12
428461847f8eSopenharmony_ci     */
428561847f8eSopenharmony_ci    activateAudioSession(strategy: AudioSessionStrategy): Promise<void>;
428661847f8eSopenharmony_ci
428761847f8eSopenharmony_ci    /**
428861847f8eSopenharmony_ci     * Deactivate the audio session for the current pid application.
428961847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
429061847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Returned by promise.
429161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
429261847f8eSopenharmony_ci     * @crossplatform
429361847f8eSopenharmony_ci     * @since 12
429461847f8eSopenharmony_ci     */
429561847f8eSopenharmony_ci    deactivateAudioSession(): Promise<void>;
429661847f8eSopenharmony_ci
429761847f8eSopenharmony_ci    /**
429861847f8eSopenharmony_ci     * Check whether the audio session is activated for the current pid application.
429961847f8eSopenharmony_ci     * @returns { boolean } The active audio session status for the current pid application.
430061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
430161847f8eSopenharmony_ci     * @crossplatform
430261847f8eSopenharmony_ci     * @since 12
430361847f8eSopenharmony_ci     */
430461847f8eSopenharmony_ci    isAudioSessionActivated(): boolean;
430561847f8eSopenharmony_ci
430661847f8eSopenharmony_ci    /**
430761847f8eSopenharmony_ci     * Listens for audio session deactivated event. When the audio session is deactivated,
430861847f8eSopenharmony_ci     * registered clients will receive the callback.
430961847f8eSopenharmony_ci     * @param { 'audioSessionDeactivated' } type - Type of the event to listen for. Only the audioSessionDeactivated event is supported.
431061847f8eSopenharmony_ci     * @param { Callback<AudioSessionDeactivatedEvent> } callback - Callback invoked for the audio session deactivated event.
431161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
431261847f8eSopenharmony_ci     *                                 1.Mandatory parameters unspecified.
431361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
431461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
431561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
431661847f8eSopenharmony_ci     * @crossplatform
431761847f8eSopenharmony_ci     * @since 12
431861847f8eSopenharmony_ci     */
431961847f8eSopenharmony_ci    on(type: 'audioSessionDeactivated', callback: Callback<AudioSessionDeactivatedEvent>): void;
432061847f8eSopenharmony_ci
432161847f8eSopenharmony_ci    /**
432261847f8eSopenharmony_ci    * Unsubscribes to audio session deactivated event.
432361847f8eSopenharmony_ci    * @param { 'audioSessionDeactivated' } type - Type of the event to listen for. Only the audioSessionDeactivated event is supported.
432461847f8eSopenharmony_ci    * @param { Callback<AudioSessionDeactivatedEvent> } callback - Callback invoked for the audio session deactivated event.
432561847f8eSopenharmony_ci    * @throws { BusinessError } 401 - Parameter error. Possible causes:
432661847f8eSopenharmony_ci    *                                 1.Mandatory parameters are left unspecified;
432761847f8eSopenharmony_ci    *                                 2.Incorrect parameter types.
432861847f8eSopenharmony_ci    * @throws { BusinessError } 6800101 - Parameter verification failed.
432961847f8eSopenharmony_ci    * @syscap SystemCapability.Multimedia.Audio.Core
433061847f8eSopenharmony_ci    * @crossplatform
433161847f8eSopenharmony_ci    * @since 12
433261847f8eSopenharmony_ci    */
433361847f8eSopenharmony_ci    off(type: 'audioSessionDeactivated', callback?: Callback<AudioSessionDeactivatedEvent>): void;
433461847f8eSopenharmony_ci  }
433561847f8eSopenharmony_ci
433661847f8eSopenharmony_ci  /**
433761847f8eSopenharmony_ci   * Implements audio volume management.
433861847f8eSopenharmony_ci   * @typedef AudioVolumeManager
433961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
434061847f8eSopenharmony_ci   * @since 9
434161847f8eSopenharmony_ci   */
434261847f8eSopenharmony_ci  /**
434361847f8eSopenharmony_ci   * Implements audio volume management.
434461847f8eSopenharmony_ci   * @typedef AudioVolumeManager
434561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
434661847f8eSopenharmony_ci   * @crossplatform
434761847f8eSopenharmony_ci   * @since 12
434861847f8eSopenharmony_ci   */
434961847f8eSopenharmony_ci  interface AudioVolumeManager {
435061847f8eSopenharmony_ci    /**
435161847f8eSopenharmony_ci     * Get the volume group list for a networkId. This method uses an asynchronous callback to return the result.
435261847f8eSopenharmony_ci     * @param { string } networkId - Distributed deice net work id
435361847f8eSopenharmony_ci     * @param { AsyncCallback<VolumeGroupInfos> } callback - Callback used to return the result.
435461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
435561847f8eSopenharmony_ci     * @systemapi
435661847f8eSopenharmony_ci     * @since 9
435761847f8eSopenharmony_ci     */
435861847f8eSopenharmony_ci    getVolumeGroupInfos(networkId: string, callback: AsyncCallback<VolumeGroupInfos>): void;
435961847f8eSopenharmony_ci    /**
436061847f8eSopenharmony_ci     * Get the volume group list for a networkId. This method uses a promise to return the result.
436161847f8eSopenharmony_ci     * @param { string } networkId - Distributed deice net work id
436261847f8eSopenharmony_ci     * @returns { Promise<VolumeGroupInfos> } Promise used to return the result.
436361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
436461847f8eSopenharmony_ci     * @systemapi
436561847f8eSopenharmony_ci     * @since 9
436661847f8eSopenharmony_ci     */
436761847f8eSopenharmony_ci    getVolumeGroupInfos(networkId: string): Promise<VolumeGroupInfos>;
436861847f8eSopenharmony_ci    /**
436961847f8eSopenharmony_ci     * Get the volume group list for a networkId.
437061847f8eSopenharmony_ci     * @param { string } networkId - Distributed deice net work id
437161847f8eSopenharmony_ci     * @returns { VolumeGroupInfos } Volume group info list.
437261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
437361847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
437461847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
437561847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
437661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
437761847f8eSopenharmony_ci     * @systemapi
437861847f8eSopenharmony_ci     * @since 10
437961847f8eSopenharmony_ci     */
438061847f8eSopenharmony_ci    getVolumeGroupInfosSync(networkId: string): VolumeGroupInfos;
438161847f8eSopenharmony_ci
438261847f8eSopenharmony_ci    /**
438361847f8eSopenharmony_ci     * Obtains an AudioVolumeGroupManager instance. This method uses an asynchronous callback to return the result.
438461847f8eSopenharmony_ci     * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default
438561847f8eSopenharmony_ci     * @param { AsyncCallback<AudioVolumeGroupManager> } callback - Callback used to return the result.
438661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
438761847f8eSopenharmony_ci     * @since 9
438861847f8eSopenharmony_ci     */
438961847f8eSopenharmony_ci    /**
439061847f8eSopenharmony_ci     * Obtains an AudioVolumeGroupManager instance. This method uses an asynchronous callback to return the result.
439161847f8eSopenharmony_ci     * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default
439261847f8eSopenharmony_ci     * @param { AsyncCallback<AudioVolumeGroupManager> } callback - Callback used to return the result.
439361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
439461847f8eSopenharmony_ci     * @crossplatform
439561847f8eSopenharmony_ci     * @since 12
439661847f8eSopenharmony_ci     */
439761847f8eSopenharmony_ci    getVolumeGroupManager(groupId: number, callback: AsyncCallback<AudioVolumeGroupManager>): void;
439861847f8eSopenharmony_ci    /**
439961847f8eSopenharmony_ci     * Obtains an AudioVolumeGroupManager instance. This method uses a promise to return the result.
440061847f8eSopenharmony_ci     * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default
440161847f8eSopenharmony_ci     * @returns { Promise<AudioVolumeGroupManager> } Promise used to return the result.
440261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
440361847f8eSopenharmony_ci     * @since 9
440461847f8eSopenharmony_ci     */
440561847f8eSopenharmony_ci    /**
440661847f8eSopenharmony_ci     * Obtains an AudioVolumeGroupManager instance. This method uses a promise to return the result.
440761847f8eSopenharmony_ci     * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default
440861847f8eSopenharmony_ci     * @returns { Promise<AudioVolumeGroupManager> } Promise used to return the result.
440961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
441061847f8eSopenharmony_ci     * @crossplatform
441161847f8eSopenharmony_ci     * @since 12
441261847f8eSopenharmony_ci     */
441361847f8eSopenharmony_ci    getVolumeGroupManager(groupId: number): Promise<AudioVolumeGroupManager>;
441461847f8eSopenharmony_ci    /**
441561847f8eSopenharmony_ci     * Obtains an AudioVolumeGroupManager instance.
441661847f8eSopenharmony_ci     * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default
441761847f8eSopenharmony_ci     * @returns { AudioVolumeGroupManager } The audio volume group manager instance.
441861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
441961847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
442061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
442161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
442261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
442361847f8eSopenharmony_ci     * @since 10
442461847f8eSopenharmony_ci     */
442561847f8eSopenharmony_ci    /**
442661847f8eSopenharmony_ci     * Obtains an AudioVolumeGroupManager instance.
442761847f8eSopenharmony_ci     * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default
442861847f8eSopenharmony_ci     * @returns { AudioVolumeGroupManager } The audio volume group manager instance.
442961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
443061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
443161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
443261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
443361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
443461847f8eSopenharmony_ci     * @crossplatform
443561847f8eSopenharmony_ci     * @since 12
443661847f8eSopenharmony_ci     */
443761847f8eSopenharmony_ci    getVolumeGroupManagerSync(groupId: number): AudioVolumeGroupManager;
443861847f8eSopenharmony_ci
443961847f8eSopenharmony_ci    /**
444061847f8eSopenharmony_ci     * Listens for system volume change events. This method uses a callback to get volume change events.
444161847f8eSopenharmony_ci     * @param { 'volumeChange' } type - Type of the event to listen for. Only the volumeChange event is supported.
444261847f8eSopenharmony_ci     * @param { Callback<VolumeEvent> } callback - Callback used to get the system volume change event.
444361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
444461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
444561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
444661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
444761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
444861847f8eSopenharmony_ci     * @since 9
444961847f8eSopenharmony_ci     */
445061847f8eSopenharmony_ci    /**
445161847f8eSopenharmony_ci     * Listens for system volume change events. This method uses a callback to get volume change events.
445261847f8eSopenharmony_ci     * @param { 'volumeChange' } type - Type of the event to listen for. Only the volumeChange event is supported.
445361847f8eSopenharmony_ci     * @param { Callback<VolumeEvent> } callback - Callback used to get the system volume change event.
445461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
445561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
445661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
445761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
445861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
445961847f8eSopenharmony_ci     * @crossplatform
446061847f8eSopenharmony_ci     * @since 12
446161847f8eSopenharmony_ci     */
446261847f8eSopenharmony_ci    on(type: 'volumeChange', callback: Callback<VolumeEvent>): void;
446361847f8eSopenharmony_ci
446461847f8eSopenharmony_ci    /**
446561847f8eSopenharmony_ci     * Unsubscribes to the volume change events..
446661847f8eSopenharmony_ci     * @param { 'volumeChange' } type - Type of the event to be unregistered. Only the volumeChange event is supported.
446761847f8eSopenharmony_ci     * @param { Callback<VolumeEvent> } callback - Callback used to obtain the invoking volume change event.
446861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
446961847f8eSopenharmony_ci     *                                 1.Mandatory parameters missing;
447061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
447161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
447261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
447361847f8eSopenharmony_ci     * @since 12
447461847f8eSopenharmony_ci     */
447561847f8eSopenharmony_ci    off(type: 'volumeChange', callback?: Callback<VolumeEvent>): void;
447661847f8eSopenharmony_ci  }
447761847f8eSopenharmony_ci
447861847f8eSopenharmony_ci  /**
447961847f8eSopenharmony_ci   * Implements audio volume group management.
448061847f8eSopenharmony_ci   * @typedef AudioVolumeGroupManager
448161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
448261847f8eSopenharmony_ci   * @since 9
448361847f8eSopenharmony_ci   */
448461847f8eSopenharmony_ci  /**
448561847f8eSopenharmony_ci   * Implements audio volume group management.
448661847f8eSopenharmony_ci   * @typedef AudioVolumeGroupManager
448761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
448861847f8eSopenharmony_ci   * @crossplatform
448961847f8eSopenharmony_ci   * @since 12
449061847f8eSopenharmony_ci   */
449161847f8eSopenharmony_ci  interface AudioVolumeGroupManager {
449261847f8eSopenharmony_ci    /**
449361847f8eSopenharmony_ci     * Sets the volume for a stream. This method uses an asynchronous callback to return the result.
449461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
449561847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
449661847f8eSopenharmony_ci     * @param { number } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume.
449761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
449861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
449961847f8eSopenharmony_ci     * @systemapi
450061847f8eSopenharmony_ci     * @since 9
450161847f8eSopenharmony_ci     */
450261847f8eSopenharmony_ci    setVolume(volumeType: AudioVolumeType, volume: number, callback: AsyncCallback<void>): void;
450361847f8eSopenharmony_ci    /**
450461847f8eSopenharmony_ci     * Sets the volume for a stream. This method uses a promise to return the result.
450561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
450661847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
450761847f8eSopenharmony_ci     * @param { number } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume.
450861847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
450961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
451061847f8eSopenharmony_ci     * @systemapi
451161847f8eSopenharmony_ci     * @since 9
451261847f8eSopenharmony_ci     */
451361847f8eSopenharmony_ci    setVolume(volumeType: AudioVolumeType, volume: number): Promise<void>;
451461847f8eSopenharmony_ci
451561847f8eSopenharmony_ci    /**
451661847f8eSopenharmony_ci     * Sets the volume for a stream. This method uses a promise to return the result.
451761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
451861847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
451961847f8eSopenharmony_ci     * @param { number } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume.
452061847f8eSopenharmony_ci     * @param { number } flags - volume flags used to enable different operations, can be union of {@link VolumeFlag}
452161847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
452261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
452361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
452461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
452561847f8eSopenharmony_ci     * @systemapi
452661847f8eSopenharmony_ci     * @since 12
452761847f8eSopenharmony_ci     */
452861847f8eSopenharmony_ci    setVolumeWithFlag(volumeType: AudioVolumeType, volume: number, flags: number): Promise<void>;
452961847f8eSopenharmony_ci
453061847f8eSopenharmony_ci    /**
453161847f8eSopenharmony_ci     * Obtains the active volume type in the calling moment. This method returns in sync mode.
453261847f8eSopenharmony_ci     * @param { number } uid - The target uid's active volume type or
453361847f8eSopenharmony_ci     * 0 which means the global active volume type.
453461847f8eSopenharmony_ci     * @returns { AudioVolumeType } Current active volume type.
453561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
453661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
453761847f8eSopenharmony_ci     *                                 1.Mandatory parameters unspecified.
453861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
453961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
454061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
454161847f8eSopenharmony_ci     * @systemapi
454261847f8eSopenharmony_ci     * @since 13
454361847f8eSopenharmony_ci     */
454461847f8eSopenharmony_ci    getActiveVolumeTypeSync(uid: number): AudioVolumeType;
454561847f8eSopenharmony_ci
454661847f8eSopenharmony_ci    /**
454761847f8eSopenharmony_ci     * Obtains the volume of a stream. This method uses an asynchronous callback to return the query result.
454861847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
454961847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the volume.
455061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
455161847f8eSopenharmony_ci     * @since 9
455261847f8eSopenharmony_ci     */
455361847f8eSopenharmony_ci    /**
455461847f8eSopenharmony_ci     * Obtains the volume of a stream. This method uses an asynchronous callback to return the query result.
455561847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
455661847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the volume.
455761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
455861847f8eSopenharmony_ci     * @crossplatform
455961847f8eSopenharmony_ci     * @since 12
456061847f8eSopenharmony_ci     */
456161847f8eSopenharmony_ci    getVolume(volumeType: AudioVolumeType, callback: AsyncCallback<number>): void;
456261847f8eSopenharmony_ci    /**
456361847f8eSopenharmony_ci     * Obtains the volume of a stream. This method uses a promise to return the query result.
456461847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
456561847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the volume.
456661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
456761847f8eSopenharmony_ci     * @since 9
456861847f8eSopenharmony_ci     */
456961847f8eSopenharmony_ci    /**
457061847f8eSopenharmony_ci     * Obtains the volume of a stream. This method uses a promise to return the query result.
457161847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
457261847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the volume.
457361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
457461847f8eSopenharmony_ci     * @crossplatform
457561847f8eSopenharmony_ci     * @since 12
457661847f8eSopenharmony_ci     */
457761847f8eSopenharmony_ci    getVolume(volumeType: AudioVolumeType): Promise<number>;
457861847f8eSopenharmony_ci    /**
457961847f8eSopenharmony_ci     * Obtains the volume of a stream.
458061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
458161847f8eSopenharmony_ci     * @returns { number } Current system volume level.
458261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
458361847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
458461847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
458561847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
458661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
458761847f8eSopenharmony_ci     * @since 10
458861847f8eSopenharmony_ci     */
458961847f8eSopenharmony_ci    /**
459061847f8eSopenharmony_ci     * Obtains the volume of a stream.
459161847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
459261847f8eSopenharmony_ci     * @returns { number } Current system volume level.
459361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
459461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
459561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
459661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
459761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
459861847f8eSopenharmony_ci     * @crossplatform
459961847f8eSopenharmony_ci     * @since 12
460061847f8eSopenharmony_ci     */
460161847f8eSopenharmony_ci    getVolumeSync(volumeType: AudioVolumeType): number;
460261847f8eSopenharmony_ci
460361847f8eSopenharmony_ci    /**
460461847f8eSopenharmony_ci     * Obtains the minimum volume allowed for a stream. This method uses an asynchronous callback to return the query result.
460561847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
460661847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the minimum volume.
460761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
460861847f8eSopenharmony_ci     * @since 9
460961847f8eSopenharmony_ci     */
461061847f8eSopenharmony_ci    /**
461161847f8eSopenharmony_ci     * Obtains the minimum volume allowed for a stream. This method uses an asynchronous callback to return the query result.
461261847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
461361847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the minimum volume.
461461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
461561847f8eSopenharmony_ci     * @crossplatform
461661847f8eSopenharmony_ci     * @since 12
461761847f8eSopenharmony_ci     */
461861847f8eSopenharmony_ci    getMinVolume(volumeType: AudioVolumeType, callback: AsyncCallback<number>): void;
461961847f8eSopenharmony_ci    /**
462061847f8eSopenharmony_ci     * Obtains the minimum volume allowed for a stream. This method uses a promise to return the query result.
462161847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
462261847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the minimum volume.
462361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
462461847f8eSopenharmony_ci     * @since 9
462561847f8eSopenharmony_ci     */
462661847f8eSopenharmony_ci    /**
462761847f8eSopenharmony_ci     * Obtains the minimum volume allowed for a stream. This method uses a promise to return the query result.
462861847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
462961847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the minimum volume.
463061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
463161847f8eSopenharmony_ci     * @crossplatform
463261847f8eSopenharmony_ci     * @since 12
463361847f8eSopenharmony_ci     */
463461847f8eSopenharmony_ci    getMinVolume(volumeType: AudioVolumeType): Promise<number>;
463561847f8eSopenharmony_ci    /**
463661847f8eSopenharmony_ci     * Obtains the minimum volume allowed for a stream.
463761847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
463861847f8eSopenharmony_ci     * @returns { number } Min volume level.
463961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
464061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
464161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
464261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
464361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
464461847f8eSopenharmony_ci     * @since 10
464561847f8eSopenharmony_ci     */
464661847f8eSopenharmony_ci    /**
464761847f8eSopenharmony_ci     * Obtains the minimum volume allowed for a stream.
464861847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
464961847f8eSopenharmony_ci     * @returns { number } Min volume level.
465061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
465161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
465261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
465361847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
465461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
465561847f8eSopenharmony_ci     * @crossplatform
465661847f8eSopenharmony_ci     * @since 12
465761847f8eSopenharmony_ci     */
465861847f8eSopenharmony_ci    getMinVolumeSync(volumeType: AudioVolumeType): number;
465961847f8eSopenharmony_ci
466061847f8eSopenharmony_ci    /**
466161847f8eSopenharmony_ci     * Obtains the maximum volume allowed for a stream. This method uses an asynchronous callback to return the query result.
466261847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
466361847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the maximum volume.
466461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
466561847f8eSopenharmony_ci     * @since 9
466661847f8eSopenharmony_ci     */
466761847f8eSopenharmony_ci    /**
466861847f8eSopenharmony_ci     * Obtains the maximum volume allowed for a stream. This method uses an asynchronous callback to return the query result.
466961847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
467061847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the maximum volume.
467161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
467261847f8eSopenharmony_ci     * @crossplatform
467361847f8eSopenharmony_ci     * @since 12
467461847f8eSopenharmony_ci     */
467561847f8eSopenharmony_ci    getMaxVolume(volumeType: AudioVolumeType, callback: AsyncCallback<number>): void;
467661847f8eSopenharmony_ci    /**
467761847f8eSopenharmony_ci     * Obtains the maximum volume allowed for a stream. This method uses a promise to return the query result.
467861847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
467961847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the maximum volume.
468061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
468161847f8eSopenharmony_ci     * @since 9
468261847f8eSopenharmony_ci     */
468361847f8eSopenharmony_ci    /**
468461847f8eSopenharmony_ci     * Obtains the maximum volume allowed for a stream. This method uses a promise to return the query result.
468561847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
468661847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the maximum volume.
468761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
468861847f8eSopenharmony_ci     * @crossplatform
468961847f8eSopenharmony_ci     * @since 12
469061847f8eSopenharmony_ci     */
469161847f8eSopenharmony_ci    getMaxVolume(volumeType: AudioVolumeType): Promise<number>;
469261847f8eSopenharmony_ci    /**
469361847f8eSopenharmony_ci     * Obtains the maximum volume allowed for a stream.
469461847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
469561847f8eSopenharmony_ci     * @returns { number } Max volume level.
469661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
469761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
469861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
469961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
470061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
470161847f8eSopenharmony_ci     * @since 10
470261847f8eSopenharmony_ci     */
470361847f8eSopenharmony_ci    /**
470461847f8eSopenharmony_ci     * Obtains the maximum volume allowed for a stream.
470561847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
470661847f8eSopenharmony_ci     * @returns { number } Max volume level.
470761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
470861847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
470961847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
471061847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
471161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
471261847f8eSopenharmony_ci     * @crossplatform
471361847f8eSopenharmony_ci     * @since 12
471461847f8eSopenharmony_ci     */
471561847f8eSopenharmony_ci    getMaxVolumeSync(volumeType: AudioVolumeType): number;
471661847f8eSopenharmony_ci
471761847f8eSopenharmony_ci    /**
471861847f8eSopenharmony_ci     * Mutes a stream. This method uses an asynchronous callback to return the result.
471961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
472061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
472161847f8eSopenharmony_ci     * @param { boolean } mute - Mute status to set. The value true means to mute the stream, and false means the opposite.
472261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
472361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
472461847f8eSopenharmony_ci     * @systemapi
472561847f8eSopenharmony_ci     * @since 9
472661847f8eSopenharmony_ci     */
472761847f8eSopenharmony_ci    mute(volumeType: AudioVolumeType, mute: boolean, callback: AsyncCallback<void>): void;
472861847f8eSopenharmony_ci    /**
472961847f8eSopenharmony_ci     * Mutes a stream. This method uses a promise to return the result.
473061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
473161847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
473261847f8eSopenharmony_ci     * @param { boolean } mute - Mute status to set. The value true means to mute the stream, and false means the opposite.
473361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
473461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
473561847f8eSopenharmony_ci     * @systemapi
473661847f8eSopenharmony_ci     * @since 9
473761847f8eSopenharmony_ci     */
473861847f8eSopenharmony_ci    mute(volumeType: AudioVolumeType, mute: boolean): Promise<void>;
473961847f8eSopenharmony_ci
474061847f8eSopenharmony_ci    /**
474161847f8eSopenharmony_ci     * Checks whether a stream is muted. This method uses an asynchronous callback to return the query result.
474261847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
474361847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Callback used to return the mute status of the stream. The
474461847f8eSopenharmony_ci     * value true means that the stream is muted, and false means the opposite.
474561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
474661847f8eSopenharmony_ci     * @since 9
474761847f8eSopenharmony_ci     */
474861847f8eSopenharmony_ci    /**
474961847f8eSopenharmony_ci     * Checks whether a stream is muted. This method uses an asynchronous callback to return the query result.
475061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
475161847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - Callback used to return the mute status of the stream. The
475261847f8eSopenharmony_ci     * value true means that the stream is muted, and false means the opposite.
475361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
475461847f8eSopenharmony_ci     * @crossplatform
475561847f8eSopenharmony_ci     * @since 12
475661847f8eSopenharmony_ci     */
475761847f8eSopenharmony_ci    isMute(volumeType: AudioVolumeType, callback: AsyncCallback<boolean>): void;
475861847f8eSopenharmony_ci    /**
475961847f8eSopenharmony_ci     * Checks whether a stream is muted. This method uses a promise to return the result.
476061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
476161847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the mute status of the stream. The value true
476261847f8eSopenharmony_ci     * means that the stream is muted, and false means the opposite.
476361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
476461847f8eSopenharmony_ci     * @since 9
476561847f8eSopenharmony_ci     */
476661847f8eSopenharmony_ci    /**
476761847f8eSopenharmony_ci     * Checks whether a stream is muted. This method uses a promise to return the result.
476861847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
476961847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the mute status of the stream. The value true
477061847f8eSopenharmony_ci     * means that the stream is muted, and false means the opposite.
477161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
477261847f8eSopenharmony_ci     * @crossplatform
477361847f8eSopenharmony_ci     * @since 12
477461847f8eSopenharmony_ci     */
477561847f8eSopenharmony_ci    isMute(volumeType: AudioVolumeType): Promise<boolean>;
477661847f8eSopenharmony_ci    /**
477761847f8eSopenharmony_ci     * Checks whether a stream is muted.
477861847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
477961847f8eSopenharmony_ci     * @returns { boolean } The mute status of the stream. The value true
478061847f8eSopenharmony_ci     * means that the stream is muted, and false means the opposite.
478161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
478261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
478361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
478461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
478561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
478661847f8eSopenharmony_ci     * @since 10
478761847f8eSopenharmony_ci     */
478861847f8eSopenharmony_ci    /**
478961847f8eSopenharmony_ci     * Checks whether a stream is muted.
479061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio stream type.
479161847f8eSopenharmony_ci     * @returns { boolean } The mute status of the stream. The value true
479261847f8eSopenharmony_ci     * means that the stream is muted, and false means the opposite.
479361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
479461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
479561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
479661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
479761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
479861847f8eSopenharmony_ci     * @crossplatform
479961847f8eSopenharmony_ci     * @since 12
480061847f8eSopenharmony_ci     */
480161847f8eSopenharmony_ci    isMuteSync(volumeType: AudioVolumeType): boolean;
480261847f8eSopenharmony_ci
480361847f8eSopenharmony_ci    /**
480461847f8eSopenharmony_ci     * Sets the ringer mode. This method uses an asynchronous callback to return the result.
480561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
480661847f8eSopenharmony_ci     * @param { AudioRingMode } mode - Ringer mode.
480761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
480861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
480961847f8eSopenharmony_ci     * @systemapi
481061847f8eSopenharmony_ci     * @since 9
481161847f8eSopenharmony_ci     */
481261847f8eSopenharmony_ci    setRingerMode(mode: AudioRingMode, callback: AsyncCallback<void>): void;
481361847f8eSopenharmony_ci    /**
481461847f8eSopenharmony_ci     * Sets the ringer mode. This method uses a promise to return the result.
481561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
481661847f8eSopenharmony_ci     * @param { AudioRingMode } mode - Ringer mode.
481761847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
481861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
481961847f8eSopenharmony_ci     * @systemapi
482061847f8eSopenharmony_ci     * @since 9
482161847f8eSopenharmony_ci     */
482261847f8eSopenharmony_ci    setRingerMode(mode: AudioRingMode): Promise<void>;
482361847f8eSopenharmony_ci
482461847f8eSopenharmony_ci    /**
482561847f8eSopenharmony_ci     * Obtains the ringer mode. This method uses an asynchronous callback to return the query result.
482661847f8eSopenharmony_ci     * @param { AsyncCallback<AudioRingMode> } callback - Callback used to return the ringer mode.
482761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
482861847f8eSopenharmony_ci     * @since 9
482961847f8eSopenharmony_ci     */
483061847f8eSopenharmony_ci    /**
483161847f8eSopenharmony_ci     * Obtains the ringer mode. This method uses an asynchronous callback to return the query result.
483261847f8eSopenharmony_ci     * @param { AsyncCallback<AudioRingMode> } callback - Callback used to return the ringer mode.
483361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
483461847f8eSopenharmony_ci     * @crossplatform
483561847f8eSopenharmony_ci     * @since 12
483661847f8eSopenharmony_ci     */
483761847f8eSopenharmony_ci    getRingerMode(callback: AsyncCallback<AudioRingMode>): void;
483861847f8eSopenharmony_ci    /**
483961847f8eSopenharmony_ci     * Obtains the ringer mode. This method uses a promise to return the query result.
484061847f8eSopenharmony_ci     * @returns { Promise<AudioRingMode> } Promise used to return the ringer mode.
484161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
484261847f8eSopenharmony_ci     * @since 9
484361847f8eSopenharmony_ci     */
484461847f8eSopenharmony_ci    /**
484561847f8eSopenharmony_ci     * Obtains the ringer mode. This method uses a promise to return the query result.
484661847f8eSopenharmony_ci     * @returns { Promise<AudioRingMode> } Promise used to return the ringer mode.
484761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
484861847f8eSopenharmony_ci     * @crossplatform
484961847f8eSopenharmony_ci     * @since 12
485061847f8eSopenharmony_ci     */
485161847f8eSopenharmony_ci    getRingerMode(): Promise<AudioRingMode>;
485261847f8eSopenharmony_ci    /**
485361847f8eSopenharmony_ci     * Obtains the ringer mode.
485461847f8eSopenharmony_ci     * @returns { AudioRingMode } Current ringer mode.
485561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
485661847f8eSopenharmony_ci     * @since 10
485761847f8eSopenharmony_ci     */
485861847f8eSopenharmony_ci    /**
485961847f8eSopenharmony_ci     * Obtains the ringer mode.
486061847f8eSopenharmony_ci     * @returns { AudioRingMode } Current ringer mode.
486161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
486261847f8eSopenharmony_ci     * @crossplatform
486361847f8eSopenharmony_ci     * @since 12
486461847f8eSopenharmony_ci     */
486561847f8eSopenharmony_ci    getRingerModeSync(): AudioRingMode;
486661847f8eSopenharmony_ci
486761847f8eSopenharmony_ci    /**
486861847f8eSopenharmony_ci     * Listens for ringer mode change events. This method uses a callback to get ringer mode changes.
486961847f8eSopenharmony_ci     * @param { 'ringerModeChange' } type - Type of the event to listen for. Only the ringerModeChange event is supported.
487061847f8eSopenharmony_ci     * @param { Callback<AudioRingMode> } callback - Callback used to get the updated ringer mode.
487161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
487261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
487361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
487461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
487561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
487661847f8eSopenharmony_ci     * @since 9
487761847f8eSopenharmony_ci     */
487861847f8eSopenharmony_ci    on(type: 'ringerModeChange', callback: Callback<AudioRingMode>): void;
487961847f8eSopenharmony_ci
488061847f8eSopenharmony_ci    /**
488161847f8eSopenharmony_ci     * Mutes or unmutes the microphone. This method uses an asynchronous callback to return the result.
488261847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_AUDIO_CONFIG
488361847f8eSopenharmony_ci     * @param { boolean } mute - Mute status to set. The value true means to mute the microphone, and false means the opposite.
488461847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
488561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
488661847f8eSopenharmony_ci     * @since 9
488761847f8eSopenharmony_ci     * @deprecated since 11
488861847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#setMicMute
488961847f8eSopenharmony_ci     */
489061847f8eSopenharmony_ci    setMicrophoneMute(mute: boolean, callback: AsyncCallback<void>): void;
489161847f8eSopenharmony_ci    /**
489261847f8eSopenharmony_ci     * Mutes or unmutes the microphone. This method uses a promise to return the result.
489361847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_AUDIO_CONFIG
489461847f8eSopenharmony_ci     * @param { boolean } mute - Mute status to set. The value true means to mute the microphone, and false means the opposite.
489561847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
489661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
489761847f8eSopenharmony_ci     * @since 9
489861847f8eSopenharmony_ci     * @deprecated since 11
489961847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioVolumeGroupManager#setMicMute
490061847f8eSopenharmony_ci     */
490161847f8eSopenharmony_ci    setMicrophoneMute(mute: boolean): Promise<void>;
490261847f8eSopenharmony_ci
490361847f8eSopenharmony_ci    /**
490461847f8eSopenharmony_ci     * Mutes or unmutes the microphone. This method uses a promise to return the result.
490561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_AUDIO_CONFIG
490661847f8eSopenharmony_ci     * @param { boolean } mute - Mute status to set. The value true means to mute the microphone, and false means the opposite.
490761847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
490861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
490961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
491061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
491161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
491261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
491361847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
491461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
491561847f8eSopenharmony_ci     * @systemapi
491661847f8eSopenharmony_ci     * @since 11
491761847f8eSopenharmony_ci     */
491861847f8eSopenharmony_ci    setMicMute(mute: boolean): Promise<void>;
491961847f8eSopenharmony_ci
492061847f8eSopenharmony_ci    /**
492161847f8eSopenharmony_ci     * Mutes or unmutes the microphone. This method uses a promise to return the result.
492261847f8eSopenharmony_ci     * @permission ohos.permission.MICROPHONE_CONTROL
492361847f8eSopenharmony_ci     * @param { boolean } mute - Mute status to set. The value true means to mute the microphone, and false means the opposite.
492461847f8eSopenharmony_ci     * @param { PolicyType } type - Mute status to set. This value represents the caller's type such as EDM or privacy.
492561847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
492661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
492761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
492861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
492961847f8eSopenharmony_ci     *                                 1.Mandatory parameters missing.
493061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
493161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
493261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
493361847f8eSopenharmony_ci     * @systemapi
493461847f8eSopenharmony_ci     * @since 12
493561847f8eSopenharmony_ci     */
493661847f8eSopenharmony_ci    setMicMutePersistent(mute: boolean, type: PolicyType): Promise<void>;
493761847f8eSopenharmony_ci
493861847f8eSopenharmony_ci    /**
493961847f8eSopenharmony_ci     * Checks whether the persistent microphone status is muted.
494061847f8eSopenharmony_ci     * @permission ohos.permission.MICROPHONE_CONTROL
494161847f8eSopenharmony_ci     * @returns { boolean } Returns microphone persistent mute status.
494261847f8eSopenharmony_ci     *     true: The persistent mic mute is enabled in the current system.
494361847f8eSopenharmony_ci     *     false: The persistent mic mute is disabled in the current system.
494461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
494561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
494661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
494761847f8eSopenharmony_ci     * @systemapi
494861847f8eSopenharmony_ci     * @since 12
494961847f8eSopenharmony_ci     */
495061847f8eSopenharmony_ci    isPersistentMicMute(): boolean;
495161847f8eSopenharmony_ci
495261847f8eSopenharmony_ci    /**
495361847f8eSopenharmony_ci     * Checks whether the microphone is muted. This method uses an asynchronous callback to return the query result.
495461847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - used to return the mute status of the microphone. The value
495561847f8eSopenharmony_ci     * true means that the microphone is muted, and false means the opposite.
495661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
495761847f8eSopenharmony_ci     * @since 9
495861847f8eSopenharmony_ci     */
495961847f8eSopenharmony_ci    /**
496061847f8eSopenharmony_ci     * Checks whether the microphone is muted. This method uses an asynchronous callback to return the query result.
496161847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - used to return the mute status of the microphone. The value
496261847f8eSopenharmony_ci     * true means that the microphone is muted, and false means the opposite.
496361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
496461847f8eSopenharmony_ci     * @crossplatform
496561847f8eSopenharmony_ci     * @since 12
496661847f8eSopenharmony_ci     */
496761847f8eSopenharmony_ci    isMicrophoneMute(callback: AsyncCallback<boolean>): void;
496861847f8eSopenharmony_ci    /**
496961847f8eSopenharmony_ci     * Checks whether the microphone is muted. This method uses a promise to return the query result.
497061847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the mute status of the microphone. The value true
497161847f8eSopenharmony_ci     * means that the microphone is muted, and false means the opposite.
497261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
497361847f8eSopenharmony_ci     * @since 9
497461847f8eSopenharmony_ci     */
497561847f8eSopenharmony_ci    /**
497661847f8eSopenharmony_ci     * Checks whether the microphone is muted. This method uses a promise to return the query result.
497761847f8eSopenharmony_ci     * @returns { Promise<boolean> } Promise used to return the mute status of the microphone. The value true
497861847f8eSopenharmony_ci     * means that the microphone is muted, and false means the opposite.
497961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
498061847f8eSopenharmony_ci     * @crossplatform
498161847f8eSopenharmony_ci     * @since 12
498261847f8eSopenharmony_ci     */
498361847f8eSopenharmony_ci    isMicrophoneMute(): Promise<boolean>;
498461847f8eSopenharmony_ci    /**
498561847f8eSopenharmony_ci     * Checks whether the microphone is muted.
498661847f8eSopenharmony_ci     * @returns { boolean } The mute status of the microphone. The value true
498761847f8eSopenharmony_ci     * means that the microphone is muted, and false means the opposite.
498861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
498961847f8eSopenharmony_ci     * @since 10
499061847f8eSopenharmony_ci     */
499161847f8eSopenharmony_ci    /**
499261847f8eSopenharmony_ci     * Checks whether the microphone is muted.
499361847f8eSopenharmony_ci     * @returns { boolean } The mute status of the microphone. The value true
499461847f8eSopenharmony_ci     * means that the microphone is muted, and false means the opposite.
499561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
499661847f8eSopenharmony_ci     * @crossplatform
499761847f8eSopenharmony_ci     * @since 12
499861847f8eSopenharmony_ci     */
499961847f8eSopenharmony_ci    isMicrophoneMuteSync(): boolean;
500061847f8eSopenharmony_ci
500161847f8eSopenharmony_ci    /**
500261847f8eSopenharmony_ci     * Listens for system microphone state change events. This method uses a callback to get microphone change events.
500361847f8eSopenharmony_ci     * @param { 'micStateChange' } type - Type of the event to listen for. Only the micStateChange event is supported.
500461847f8eSopenharmony_ci     * @param { Callback<MicStateChangeEvent> } callback - Callback used to get the system microphone state change event.
500561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
500661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
500761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
500861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
500961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
501061847f8eSopenharmony_ci     * @since 9
501161847f8eSopenharmony_ci     */
501261847f8eSopenharmony_ci    on(type: 'micStateChange', callback: Callback<MicStateChangeEvent>): void;
501361847f8eSopenharmony_ci
501461847f8eSopenharmony_ci    /**
501561847f8eSopenharmony_ci     * Unsubscribes to the microphone state change events.
501661847f8eSopenharmony_ci     * @param { 'micStateChange' } type - Type of the event to listen for.
501761847f8eSopenharmony_ci     * @param { Callback<MicStateChangeEvent> } callback - Callback used to get the system microphone state change event.
501861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
501961847f8eSopenharmony_ci     *                                 1.Mandatory parameters missing;
502061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
502161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
502261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
502361847f8eSopenharmony_ci     * @since 12
502461847f8eSopenharmony_ci     */
502561847f8eSopenharmony_ci    off(type: 'micStateChange', callback?: Callback<MicStateChangeEvent>): void;
502661847f8eSopenharmony_ci
502761847f8eSopenharmony_ci    /**
502861847f8eSopenharmony_ci     * Gets if this volume group is volume unadjustable.
502961847f8eSopenharmony_ci     * @returns { boolean } Whether it is volume unadjustable.
503061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
503161847f8eSopenharmony_ci     * @since 10
503261847f8eSopenharmony_ci     */
503361847f8eSopenharmony_ci    /**
503461847f8eSopenharmony_ci     * Gets if this volume group is volume unadjustable.
503561847f8eSopenharmony_ci     * @returns { boolean } Whether it is volume unadjustable.
503661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
503761847f8eSopenharmony_ci     * @crossplatform
503861847f8eSopenharmony_ci     * @since 12
503961847f8eSopenharmony_ci     */
504061847f8eSopenharmony_ci    isVolumeUnadjustable(): boolean;
504161847f8eSopenharmony_ci
504261847f8eSopenharmony_ci    /**
504361847f8eSopenharmony_ci     * Adjusts system volume by step, volume type is decided by system.
504461847f8eSopenharmony_ci     * This method uses an asynchronous callback to return the result.
504561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
504661847f8eSopenharmony_ci     * @param { VolumeAdjustType } adjustType - Volume adjustment type.
504761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
504861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
504961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
505061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
505161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
505261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback.
505361847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by callback.
505461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
505561847f8eSopenharmony_ci     * @systemapi
505661847f8eSopenharmony_ci     * @since 10
505761847f8eSopenharmony_ci     */
505861847f8eSopenharmony_ci    adjustVolumeByStep(adjustType: VolumeAdjustType, callback: AsyncCallback<void>): void;
505961847f8eSopenharmony_ci    /**
506061847f8eSopenharmony_ci     * Adjusts system volume by step, volume type is decided by system.
506161847f8eSopenharmony_ci     * This method uses a promise to return the result.
506261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
506361847f8eSopenharmony_ci     * @param { VolumeAdjustType } adjustType - Volume adjustment type.
506461847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
506561847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
506661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
506761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
506861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
506961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
507061847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by promise.
507161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
507261847f8eSopenharmony_ci     * @systemapi
507361847f8eSopenharmony_ci     * @since 10
507461847f8eSopenharmony_ci     */
507561847f8eSopenharmony_ci    adjustVolumeByStep(adjustType: VolumeAdjustType): Promise<void>;
507661847f8eSopenharmony_ci
507761847f8eSopenharmony_ci    /**
507861847f8eSopenharmony_ci     * Adjusts system volume by step for target volume type.
507961847f8eSopenharmony_ci     * This method uses an asynchronous callback to return the result.
508061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
508161847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio volume type.
508261847f8eSopenharmony_ci     * @param { VolumeAdjustType } adjustType - Volume adjustment type.
508361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
508461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
508561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
508661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
508761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
508861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback.
508961847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by callback.
509061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
509161847f8eSopenharmony_ci     * @systemapi
509261847f8eSopenharmony_ci     * @since 10
509361847f8eSopenharmony_ci     */
509461847f8eSopenharmony_ci    adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustType, callback: AsyncCallback<void>): void;
509561847f8eSopenharmony_ci    /**
509661847f8eSopenharmony_ci     * Adjusts system volume by step for target volume type.
509761847f8eSopenharmony_ci     * This method uses a promise to return the result.
509861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY
509961847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio volume type.
510061847f8eSopenharmony_ci     * @param { VolumeAdjustType } adjustType - Volume adjustment type.
510161847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
510261847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
510361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
510461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
510561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
510661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
510761847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by promise.
510861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
510961847f8eSopenharmony_ci     * @systemapi
511061847f8eSopenharmony_ci     * @since 10
511161847f8eSopenharmony_ci     */
511261847f8eSopenharmony_ci    adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustType): Promise<void>;
511361847f8eSopenharmony_ci
511461847f8eSopenharmony_ci    /**
511561847f8eSopenharmony_ci     * Gets the volume db value that system calculate by volume type, volume level and device type.
511661847f8eSopenharmony_ci     * This method uses an asynchronous callback to return the result.
511761847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio volume type.
511861847f8eSopenharmony_ci     * @param { number } volumeLevel - Volume level to set.
511961847f8eSopenharmony_ci     * @param { DeviceType } device - Output device type.
512061847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the result.
512161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
512261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
512361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
512461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback.
512561847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by callback.
512661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
512761847f8eSopenharmony_ci     * @since 10
512861847f8eSopenharmony_ci     */
512961847f8eSopenharmony_ci    /**
513061847f8eSopenharmony_ci     * Gets the volume db value that system calculate by volume type, volume level and device type.
513161847f8eSopenharmony_ci     * This method uses an asynchronous callback to return the result.
513261847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio volume type.
513361847f8eSopenharmony_ci     * @param { number } volumeLevel - Volume level to set.
513461847f8eSopenharmony_ci     * @param { DeviceType } device - Output device type.
513561847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the result.
513661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
513761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
513861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
513961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback.
514061847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by callback.
514161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
514261847f8eSopenharmony_ci     * @crossplatform
514361847f8eSopenharmony_ci     * @since 12
514461847f8eSopenharmony_ci     */
514561847f8eSopenharmony_ci    getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType, callback: AsyncCallback<number>): void;
514661847f8eSopenharmony_ci    /**
514761847f8eSopenharmony_ci     * Gets the volume db value that system calculate by volume type, volume level and device type.
514861847f8eSopenharmony_ci     * This method uses a promise to return the result.
514961847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio volume type.
515061847f8eSopenharmony_ci     * @param { number } volumeLevel - Volume level to set.
515161847f8eSopenharmony_ci     * @param { DeviceType } device - Output device type.
515261847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the result.
515361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
515461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
515561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
515661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
515761847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by promise.
515861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
515961847f8eSopenharmony_ci     * @since 10
516061847f8eSopenharmony_ci     */
516161847f8eSopenharmony_ci    /**
516261847f8eSopenharmony_ci     * Gets the volume db value that system calculate by volume type, volume level and device type.
516361847f8eSopenharmony_ci     * This method uses a promise to return the result.
516461847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio volume type.
516561847f8eSopenharmony_ci     * @param { number } volumeLevel - Volume level to set.
516661847f8eSopenharmony_ci     * @param { DeviceType } device - Output device type.
516761847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the result.
516861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
516961847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
517061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
517161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
517261847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by promise.
517361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
517461847f8eSopenharmony_ci     * @crossplatform
517561847f8eSopenharmony_ci     * @since 12
517661847f8eSopenharmony_ci     */
517761847f8eSopenharmony_ci    getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType): Promise<number>;
517861847f8eSopenharmony_ci    /**
517961847f8eSopenharmony_ci     * Gets the volume db value that system calculate by volume type, volume level and device type.
518061847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio volume type.
518161847f8eSopenharmony_ci     * @param { number } volumeLevel - Volume level to set.
518261847f8eSopenharmony_ci     * @param { DeviceType } device - Output device type.
518361847f8eSopenharmony_ci     * @returns { number } The system volume in dB.
518461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
518561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
518661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
518761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
518861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
518961847f8eSopenharmony_ci     * @since 10
519061847f8eSopenharmony_ci     */
519161847f8eSopenharmony_ci    /**
519261847f8eSopenharmony_ci     * Gets the volume db value that system calculate by volume type, volume level and device type.
519361847f8eSopenharmony_ci     * @param { AudioVolumeType } volumeType - Audio volume type.
519461847f8eSopenharmony_ci     * @param { number } volumeLevel - Volume level to set.
519561847f8eSopenharmony_ci     * @param { DeviceType } device - Output device type.
519661847f8eSopenharmony_ci     * @returns { number } The system volume in dB.
519761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
519861847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
519961847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
520061847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
520161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
520261847f8eSopenharmony_ci     * @crossplatform
520361847f8eSopenharmony_ci     * @since 12
520461847f8eSopenharmony_ci     */
520561847f8eSopenharmony_ci    getSystemVolumeInDbSync(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType): number;
520661847f8eSopenharmony_ci
520761847f8eSopenharmony_ci    /**
520861847f8eSopenharmony_ci     * Gets the max amplitude value for a specific input device.
520961847f8eSopenharmony_ci     * This method uses a promise to return the result.
521061847f8eSopenharmony_ci     * @param { AudioDeviceDescriptor } inputDevice - the target device.
521161847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the max amplitude value.
521261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
521361847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
521461847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
521561847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
521661847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by promise.
521761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
521861847f8eSopenharmony_ci     * @since 12
521961847f8eSopenharmony_ci     */
522061847f8eSopenharmony_ci    getMaxAmplitudeForInputDevice(inputDevice: AudioDeviceDescriptor): Promise<number>;
522161847f8eSopenharmony_ci    /**
522261847f8eSopenharmony_ci     * Gets the max amplitude value for a specific output device.
522361847f8eSopenharmony_ci     * This method uses a promise to return the result.
522461847f8eSopenharmony_ci     * @param { AudioDeviceDescriptor } outputDevice - the target device.
522561847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the max amplitude value.
522661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
522761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
522861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
522961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
523061847f8eSopenharmony_ci     * @throws { BusinessError } 6800301 - System error. Return by promise.
523161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
523261847f8eSopenharmony_ci     * @since 12
523361847f8eSopenharmony_ci     */
523461847f8eSopenharmony_ci    getMaxAmplitudeForOutputDevice(outputDevice: AudioDeviceDescriptor): Promise<number>;
523561847f8eSopenharmony_ci  }
523661847f8eSopenharmony_ci
523761847f8eSopenharmony_ci  /**
523861847f8eSopenharmony_ci   * This interface is used to notify the listener of any device Spatialization or Head Tracking enable state change.
523961847f8eSopenharmony_ci   * @interface AudioSpatialEnabledStateForDevice
524061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Spatialization
524161847f8eSopenharmony_ci   * @systemapi
524261847f8eSopenharmony_ci   * @since 12
524361847f8eSopenharmony_ci   */
524461847f8eSopenharmony_ci  interface AudioSpatialEnabledStateForDevice {
524561847f8eSopenharmony_ci    /**
524661847f8eSopenharmony_ci     * Audio device description.
524761847f8eSopenharmony_ci     * @type { AudioDeviceDescriptor }
524861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
524961847f8eSopenharmony_ci     * @systemapi
525061847f8eSopenharmony_ci     * @since 12
525161847f8eSopenharmony_ci     */
525261847f8eSopenharmony_ci    deviceDescriptor: AudioDeviceDescriptor;
525361847f8eSopenharmony_ci    /**
525461847f8eSopenharmony_ci     * Spatialization or Head Tracking enable state.
525561847f8eSopenharmony_ci     * @type { boolean }
525661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
525761847f8eSopenharmony_ci     * @systemapi
525861847f8eSopenharmony_ci     * @since 12
525961847f8eSopenharmony_ci     */
526061847f8eSopenharmony_ci    enabled: boolean;
526161847f8eSopenharmony_ci  }
526261847f8eSopenharmony_ci
526361847f8eSopenharmony_ci  /**
526461847f8eSopenharmony_ci   * Implements audio spatialization management.
526561847f8eSopenharmony_ci   * @typedef AudioSpatializationManager
526661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Spatialization
526761847f8eSopenharmony_ci   * @systemapi
526861847f8eSopenharmony_ci   * @since 11
526961847f8eSopenharmony_ci   */
527061847f8eSopenharmony_ci  interface AudioSpatializationManager {
527161847f8eSopenharmony_ci    /**
527261847f8eSopenharmony_ci     * Checks whether spatialization is supported by system.
527361847f8eSopenharmony_ci     * @returns { boolean } Whether spatialization is supported by system.
527461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
527561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
527661847f8eSopenharmony_ci     * @systemapi
527761847f8eSopenharmony_ci     * @since 11
527861847f8eSopenharmony_ci     */
527961847f8eSopenharmony_ci    isSpatializationSupported(): boolean;
528061847f8eSopenharmony_ci
528161847f8eSopenharmony_ci    /**
528261847f8eSopenharmony_ci     * Checks whether spatialization is supported by the specified device.
528361847f8eSopenharmony_ci     * @param { AudioDeviceDescriptor } deviceDescriptor - Audio device description.
528461847f8eSopenharmony_ci     * @returns { boolean } Whether spatialization is supported by the specified device.
528561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
528661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
528761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
528861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
528961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
529061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
529161847f8eSopenharmony_ci     * @systemapi
529261847f8eSopenharmony_ci     * @since 11
529361847f8eSopenharmony_ci     */
529461847f8eSopenharmony_ci    isSpatializationSupportedForDevice(deviceDescriptor: AudioDeviceDescriptor): boolean;
529561847f8eSopenharmony_ci
529661847f8eSopenharmony_ci    /**
529761847f8eSopenharmony_ci     * Checks whether head tracking is supported by system.
529861847f8eSopenharmony_ci     * @returns { boolean } Whether head tracking is supported by system.
529961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
530061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
530161847f8eSopenharmony_ci     * @systemapi
530261847f8eSopenharmony_ci     * @since 11
530361847f8eSopenharmony_ci     */
530461847f8eSopenharmony_ci    isHeadTrackingSupported(): boolean;
530561847f8eSopenharmony_ci
530661847f8eSopenharmony_ci    /**
530761847f8eSopenharmony_ci     * Checks whether head tracking is supported by the specified device.
530861847f8eSopenharmony_ci     * @param { AudioDeviceDescriptor } deviceDescriptor - Audio device description.
530961847f8eSopenharmony_ci     * @returns { boolean } Whether head tracking is supported by the specified device.
531061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
531161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
531261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
531361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
531461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
531561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
531661847f8eSopenharmony_ci     * @systemapi
531761847f8eSopenharmony_ci     * @since 11
531861847f8eSopenharmony_ci     */
531961847f8eSopenharmony_ci    isHeadTrackingSupportedForDevice(deviceDescriptor: AudioDeviceDescriptor): boolean;
532061847f8eSopenharmony_ci
532161847f8eSopenharmony_ci    /**
532261847f8eSopenharmony_ci     * Sets the spatialization enabled or disabled. This method uses an asynchronous callback to return the result.
532361847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_SYSTEM_AUDIO_EFFECTS
532461847f8eSopenharmony_ci     * @param { boolean } enable - Spatialization enable state.
532561847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
532661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied. Return by callback.
532761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
532861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
532961847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
533061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
533161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
533261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
533361847f8eSopenharmony_ci     * @systemapi
533461847f8eSopenharmony_ci     * @since 11
533561847f8eSopenharmony_ci     * @deprecated since 12
533661847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioSpatializationManager#setSpatializationEnabled
533761847f8eSopenharmony_ci     */
533861847f8eSopenharmony_ci    setSpatializationEnabled(enable: boolean, callback: AsyncCallback<void>): void;
533961847f8eSopenharmony_ci    /**
534061847f8eSopenharmony_ci     * Sets the spatialization enabled or disabled. This method uses a promise to return the result.
534161847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_SYSTEM_AUDIO_EFFECTS
534261847f8eSopenharmony_ci     * @param { boolean } enable - Spatialization enable state.
534361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
534461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied. Return by promise.
534561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
534661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
534761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
534861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
534961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
535061847f8eSopenharmony_ci     * @systemapi
535161847f8eSopenharmony_ci     * @since 11
535261847f8eSopenharmony_ci     * @deprecated since 12
535361847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioSpatializationManager#setSpatializationEnabled
535461847f8eSopenharmony_ci     */
535561847f8eSopenharmony_ci    setSpatializationEnabled(enable: boolean): Promise<void>;
535661847f8eSopenharmony_ci    /**
535761847f8eSopenharmony_ci     * Sets the spatialization enabled or disabled by the specified device.
535861847f8eSopenharmony_ci     * This method uses a promise to return the result.
535961847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_SYSTEM_AUDIO_EFFECTS
536061847f8eSopenharmony_ci     * @param { AudioDeviceDescriptor } deviceDescriptor - Audio device description.
536161847f8eSopenharmony_ci     * @param { boolean } enabled - Spatialization enable state.
536261847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
536361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied. Return by promise.
536461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
536561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
536661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
536761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
536861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
536961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
537061847f8eSopenharmony_ci     * @systemapi
537161847f8eSopenharmony_ci     * @since 12
537261847f8eSopenharmony_ci     */
537361847f8eSopenharmony_ci    setSpatializationEnabled(deviceDescriptor: AudioDeviceDescriptor, enabled: boolean): Promise<void>;
537461847f8eSopenharmony_ci
537561847f8eSopenharmony_ci    /**
537661847f8eSopenharmony_ci     * Checks whether the spatialization is enabled.
537761847f8eSopenharmony_ci     * @returns { boolean } Whether the spatialization is enabled.
537861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
537961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
538061847f8eSopenharmony_ci     * @systemapi
538161847f8eSopenharmony_ci     * @since 11
538261847f8eSopenharmony_ci     * @deprecated since 12
538361847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioSpatializationManager#isSpatializationEnabled
538461847f8eSopenharmony_ci     */
538561847f8eSopenharmony_ci    isSpatializationEnabled(): boolean;
538661847f8eSopenharmony_ci    /**
538761847f8eSopenharmony_ci     * Checks whether the spatialization is enabled by the specified device.
538861847f8eSopenharmony_ci     * @param { AudioDeviceDescriptor } deviceDescriptor - Audio device description.
538961847f8eSopenharmony_ci     * @returns { boolean } Whether the spatialization is enabled by the specified device.
539061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
539161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
539261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
539361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
539461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
539561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
539661847f8eSopenharmony_ci     * @systemapi
539761847f8eSopenharmony_ci     * @since 12
539861847f8eSopenharmony_ci     */
539961847f8eSopenharmony_ci    isSpatializationEnabled(deviceDescriptor: AudioDeviceDescriptor): boolean;
540061847f8eSopenharmony_ci
540161847f8eSopenharmony_ci    /**
540261847f8eSopenharmony_ci     * Subscribes to the spatialization enable state change events. When the spatialization enable state changes,
540361847f8eSopenharmony_ci     * registered clients will receive the callback.
540461847f8eSopenharmony_ci     * @param { 'spatializationEnabledChange' } type - Type of the event to listen for.
540561847f8eSopenharmony_ci     * @param { Callback<boolean> } callback - Callback used to get the spatialization enable state.
540661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
540761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
540861847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
540961847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
541061847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
541161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
541261847f8eSopenharmony_ci     * @systemapi
541361847f8eSopenharmony_ci     * @since 11
541461847f8eSopenharmony_ci     * @deprecated since 12
541561847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioSpatializationManager#on
541661847f8eSopenharmony_ci     */
541761847f8eSopenharmony_ci    on(type: 'spatializationEnabledChange', callback: Callback<boolean>): void;
541861847f8eSopenharmony_ci    /**
541961847f8eSopenharmony_ci     * Subscribes to the spatialization enable state change events by the specified device.
542061847f8eSopenharmony_ci     * When the spatialization enable state changes, registered clients will receive the callback.
542161847f8eSopenharmony_ci     * @param { 'spatializationEnabledChangeForAnyDevice' } type - Type of the event to listen for.
542261847f8eSopenharmony_ci     * @param { Callback<AudioSpatialEnabledStateForDevice> } callback - Callback used to get the spatialization enable state by the specified device.
542361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
542461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
542561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
542661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
542761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
542861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
542961847f8eSopenharmony_ci     * @systemapi
543061847f8eSopenharmony_ci     * @since 12
543161847f8eSopenharmony_ci     */
543261847f8eSopenharmony_ci    on(type: 'spatializationEnabledChangeForAnyDevice', callback: Callback<AudioSpatialEnabledStateForDevice>): void;
543361847f8eSopenharmony_ci
543461847f8eSopenharmony_ci    /**
543561847f8eSopenharmony_ci     * Unsubscribes to the spatialization enable state change events.
543661847f8eSopenharmony_ci     * @param { 'spatializationEnabledChange' } type - Type of the event to listen for.
543761847f8eSopenharmony_ci     * @param { Callback<boolean> } callback - Callback used to get the spatialization enable state.
543861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
543961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
544061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
544161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
544261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
544361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
544461847f8eSopenharmony_ci     * @systemapi
544561847f8eSopenharmony_ci     * @since 11
544661847f8eSopenharmony_ci     * @deprecated since 12
544761847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioSpatializationManager#off
544861847f8eSopenharmony_ci     */
544961847f8eSopenharmony_ci    off(type: 'spatializationEnabledChange', callback?: Callback<boolean>): void;
545061847f8eSopenharmony_ci    /**
545161847f8eSopenharmony_ci     * Unsubscribes to the spatialization enable state change events by the specified device.
545261847f8eSopenharmony_ci     * @param { 'spatializationEnabledChangeForAnyDevice' } type - Type of the event to listen for.
545361847f8eSopenharmony_ci     * @param { Callback<AudioSpatialEnabledStateForDevice> } callback - Callback used to get the spatialization enable state by the specified device.
545461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
545561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
545661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
545761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
545861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
545961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
546061847f8eSopenharmony_ci     * @systemapi
546161847f8eSopenharmony_ci     * @since 12
546261847f8eSopenharmony_ci     */
546361847f8eSopenharmony_ci    off(type: 'spatializationEnabledChangeForAnyDevice', callback?: Callback<AudioSpatialEnabledStateForDevice>): void;
546461847f8eSopenharmony_ci
546561847f8eSopenharmony_ci    /**
546661847f8eSopenharmony_ci     * Sets the head tracking enabled or disabled. This method uses an asynchronous callback to return the result.
546761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_SYSTEM_AUDIO_EFFECTS
546861847f8eSopenharmony_ci     * @param { boolean } enable - Head tracking enable state.
546961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
547061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied. Return by callback.
547161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
547261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
547361847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
547461847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
547561847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
547661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
547761847f8eSopenharmony_ci     * @systemapi
547861847f8eSopenharmony_ci     * @since 11
547961847f8eSopenharmony_ci     * @deprecated since 12
548061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioSpatializationManager#setHeadTrackingEnabled
548161847f8eSopenharmony_ci     */
548261847f8eSopenharmony_ci    setHeadTrackingEnabled(enable: boolean, callback: AsyncCallback<void>): void;
548361847f8eSopenharmony_ci    /**
548461847f8eSopenharmony_ci     * Sets the head tracking enabled or disabled. This method uses a promise to return the result.
548561847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_SYSTEM_AUDIO_EFFECTS
548661847f8eSopenharmony_ci     * @param { boolean } enable - Head tracking enable state.
548761847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
548861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied. Return by promise.
548961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
549061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
549161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
549261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
549361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
549461847f8eSopenharmony_ci     * @systemapi
549561847f8eSopenharmony_ci     * @since 11
549661847f8eSopenharmony_ci     * @deprecated since 12
549761847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioSpatializationManager#setHeadTrackingEnabled
549861847f8eSopenharmony_ci     */
549961847f8eSopenharmony_ci    setHeadTrackingEnabled(enable: boolean): Promise<void>;
550061847f8eSopenharmony_ci    /**
550161847f8eSopenharmony_ci     * Sets the head tracking enabled or disabled by the specified device.
550261847f8eSopenharmony_ci     * This method uses a promise to return the result.
550361847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_SYSTEM_AUDIO_EFFECTS
550461847f8eSopenharmony_ci     * @param { AudioDeviceDescriptor } deviceDescriptor - Audio device description.
550561847f8eSopenharmony_ci     * @param { boolean } enabled - Head tracking enable state.
550661847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
550761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied. Return by promise.
550861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
550961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
551061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
551161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
551261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
551361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
551461847f8eSopenharmony_ci     * @systemapi
551561847f8eSopenharmony_ci     * @since 12
551661847f8eSopenharmony_ci     */
551761847f8eSopenharmony_ci    setHeadTrackingEnabled(deviceDescriptor: AudioDeviceDescriptor, enabled: boolean): Promise<void>;
551861847f8eSopenharmony_ci
551961847f8eSopenharmony_ci    /**
552061847f8eSopenharmony_ci     * Checks whether the head tracking is enabled.
552161847f8eSopenharmony_ci     * @returns { boolean } Whether the head tracking is enabled.
552261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
552361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
552461847f8eSopenharmony_ci     * @systemapi
552561847f8eSopenharmony_ci     * @since 11
552661847f8eSopenharmony_ci     * @deprecated since 12
552761847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioSpatializationManager#isHeadTrackingEnabled
552861847f8eSopenharmony_ci     */
552961847f8eSopenharmony_ci    isHeadTrackingEnabled(): boolean;
553061847f8eSopenharmony_ci    /**
553161847f8eSopenharmony_ci     * Checks whether the head tracking is enabled by the specified device.
553261847f8eSopenharmony_ci     * @param { AudioDeviceDescriptor } deviceDescriptor - Audio device description.
553361847f8eSopenharmony_ci     * @returns { boolean } Whether the head tracking is enabled by the specified device.
553461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
553561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
553661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
553761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
553861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
553961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
554061847f8eSopenharmony_ci     * @systemapi
554161847f8eSopenharmony_ci     * @since 12
554261847f8eSopenharmony_ci     */
554361847f8eSopenharmony_ci    isHeadTrackingEnabled(deviceDescriptor: AudioDeviceDescriptor): boolean;
554461847f8eSopenharmony_ci
554561847f8eSopenharmony_ci    /**
554661847f8eSopenharmony_ci     * Subscribes to the head tracking enable state change events. When the head tracking enable state changes,
554761847f8eSopenharmony_ci     * registered clients will receive the callback.
554861847f8eSopenharmony_ci     * @param { 'headTrackingEnabledChange' } type - Type of the event to listen for.
554961847f8eSopenharmony_ci     * @param { Callback<boolean> } callback - Callback used to get the head tracking enable state.
555061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
555161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
555261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
555361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
555461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
555561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
555661847f8eSopenharmony_ci     * @systemapi
555761847f8eSopenharmony_ci     * @since 11
555861847f8eSopenharmony_ci     * @deprecated since 12
555961847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioSpatializationManager#on
556061847f8eSopenharmony_ci     */
556161847f8eSopenharmony_ci    on(type: 'headTrackingEnabledChange', callback: Callback<boolean>): void;
556261847f8eSopenharmony_ci    /**
556361847f8eSopenharmony_ci     * Subscribes to the head tracking enable state change events by the specified device.
556461847f8eSopenharmony_ci     * When the head tracking enable state changes, registered clients will receive the callback.
556561847f8eSopenharmony_ci     * @param { 'headTrackingEnabledChangeForAnyDevice' } type - Type of the event to listen for.
556661847f8eSopenharmony_ci     * @param { Callback<AudioSpatialEnabledStateForDevice> } callback - Callback used to get the head tracking enable state by the specified device.
556761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
556861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
556961847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
557061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
557161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
557261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
557361847f8eSopenharmony_ci     * @systemapi
557461847f8eSopenharmony_ci     * @since 12
557561847f8eSopenharmony_ci     */
557661847f8eSopenharmony_ci    on(type: 'headTrackingEnabledChangeForAnyDevice', callback: Callback<AudioSpatialEnabledStateForDevice>): void;
557761847f8eSopenharmony_ci
557861847f8eSopenharmony_ci    /**
557961847f8eSopenharmony_ci     * Unsubscribes to the head tracking enable state change events.
558061847f8eSopenharmony_ci     * @param { 'headTrackingEnabledChange' } type - Type of the event to listen for.
558161847f8eSopenharmony_ci     * @param { Callback<boolean> } callback - Callback used to get the head tracking enable state.
558261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
558361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
558461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
558561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
558661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
558761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
558861847f8eSopenharmony_ci     * @systemapi
558961847f8eSopenharmony_ci     * @since 11
559061847f8eSopenharmony_ci     * @deprecated since 12
559161847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioSpatializationManager#off
559261847f8eSopenharmony_ci     */
559361847f8eSopenharmony_ci    off(type: 'headTrackingEnabledChange', callback?: Callback<boolean>): void;
559461847f8eSopenharmony_ci    /**
559561847f8eSopenharmony_ci     * Unsubscribes to the head tracking enable state change events by the specified device.
559661847f8eSopenharmony_ci     * @param { 'headTrackingEnabledChangeForAnyDevice' } type - Type of the event to listen for.
559761847f8eSopenharmony_ci     * @param { Callback<AudioSpatialEnabledStateForDevice> } callback - Callback used to get the head tracking enable state by the specified device.
559861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
559961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
560061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
560161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
560261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
560361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
560461847f8eSopenharmony_ci     * @systemapi
560561847f8eSopenharmony_ci     * @since 12
560661847f8eSopenharmony_ci     */
560761847f8eSopenharmony_ci    off(type: 'headTrackingEnabledChangeForAnyDevice', callback?: Callback<AudioSpatialEnabledStateForDevice>): void;
560861847f8eSopenharmony_ci
560961847f8eSopenharmony_ci    /**
561061847f8eSopenharmony_ci     * Updates the spatial device state.
561161847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_SYSTEM_AUDIO_EFFECTS
561261847f8eSopenharmony_ci     * @param { AudioSpatialDeviceState } spatialDeviceState - Spatial device state.
561361847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
561461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
561561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
561661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
561761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
561861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
561961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
562061847f8eSopenharmony_ci     * @systemapi
562161847f8eSopenharmony_ci     * @since 11
562261847f8eSopenharmony_ci     */
562361847f8eSopenharmony_ci    updateSpatialDeviceState(spatialDeviceState: AudioSpatialDeviceState): void;
562461847f8eSopenharmony_ci
562561847f8eSopenharmony_ci    /**
562661847f8eSopenharmony_ci     * Set spatialization rendering scene type.
562761847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_SYSTEM_AUDIO_EFFECTS
562861847f8eSopenharmony_ci     * @param { AudioSpatializationSceneType } spatializationSceneType - Spatialization scene type.
562961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission denied.
563061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
563161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
563261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
563361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
563461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
563561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
563661847f8eSopenharmony_ci     * @systemapi
563761847f8eSopenharmony_ci     * @since 12
563861847f8eSopenharmony_ci     */
563961847f8eSopenharmony_ci    setSpatializationSceneType(spatializationSceneType: AudioSpatializationSceneType): void;
564061847f8eSopenharmony_ci
564161847f8eSopenharmony_ci    /**
564261847f8eSopenharmony_ci     * Get spatialization rendering scene type.
564361847f8eSopenharmony_ci     * @returns { AudioSpatializationSceneType } Current spatialization rendering scene type.
564461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not system App.
564561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
564661847f8eSopenharmony_ci     * @systemapi
564761847f8eSopenharmony_ci     * @since 12
564861847f8eSopenharmony_ci     */
564961847f8eSopenharmony_ci    getSpatializationSceneType(): AudioSpatializationSceneType;
565061847f8eSopenharmony_ci  }
565161847f8eSopenharmony_ci
565261847f8eSopenharmony_ci  /**
565361847f8eSopenharmony_ci   * Connect type for device.
565461847f8eSopenharmony_ci   * @enum { number }
565561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
565661847f8eSopenharmony_ci   * @systemapi
565761847f8eSopenharmony_ci   * @since 9
565861847f8eSopenharmony_ci   */
565961847f8eSopenharmony_ci  enum ConnectType {
566061847f8eSopenharmony_ci    /**
566161847f8eSopenharmony_ci     * Connect type for local device.
566261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
566361847f8eSopenharmony_ci     * @systemapi
566461847f8eSopenharmony_ci     * @since 9
566561847f8eSopenharmony_ci     */
566661847f8eSopenharmony_ci    CONNECT_TYPE_LOCAL = 1,
566761847f8eSopenharmony_ci
566861847f8eSopenharmony_ci    /**
566961847f8eSopenharmony_ci     * Connect type for distributed device.
567061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
567161847f8eSopenharmony_ci     * @systemapi
567261847f8eSopenharmony_ci     * @since 9
567361847f8eSopenharmony_ci     */
567461847f8eSopenharmony_ci    CONNECT_TYPE_DISTRIBUTED = 2
567561847f8eSopenharmony_ci  }
567661847f8eSopenharmony_ci
567761847f8eSopenharmony_ci  /**
567861847f8eSopenharmony_ci   * Describes an audio volume group.
567961847f8eSopenharmony_ci   * @typedef VolumeGroupInfo
568061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
568161847f8eSopenharmony_ci   * @systemapi
568261847f8eSopenharmony_ci   * @since 9
568361847f8eSopenharmony_ci   */
568461847f8eSopenharmony_ci  interface VolumeGroupInfo {
568561847f8eSopenharmony_ci    /**
568661847f8eSopenharmony_ci     * Device network id.
568761847f8eSopenharmony_ci     * @type { string }
568861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
568961847f8eSopenharmony_ci     * @systemapi
569061847f8eSopenharmony_ci     * @since 9
569161847f8eSopenharmony_ci     */
569261847f8eSopenharmony_ci    readonly networkId: string;
569361847f8eSopenharmony_ci
569461847f8eSopenharmony_ci    /**
569561847f8eSopenharmony_ci     * Volume group id.
569661847f8eSopenharmony_ci     * @type { number }
569761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
569861847f8eSopenharmony_ci     * @systemapi
569961847f8eSopenharmony_ci     * @since 9
570061847f8eSopenharmony_ci     */
570161847f8eSopenharmony_ci    readonly groupId: number;
570261847f8eSopenharmony_ci
570361847f8eSopenharmony_ci    /**
570461847f8eSopenharmony_ci     * Volume mapping group id.
570561847f8eSopenharmony_ci     * @type { number }
570661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
570761847f8eSopenharmony_ci     * @systemapi
570861847f8eSopenharmony_ci     * @since 9
570961847f8eSopenharmony_ci     */
571061847f8eSopenharmony_ci    readonly mappingId: number;
571161847f8eSopenharmony_ci
571261847f8eSopenharmony_ci    /**
571361847f8eSopenharmony_ci     * Volume group name.
571461847f8eSopenharmony_ci     * @type { string }
571561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
571661847f8eSopenharmony_ci     * @systemapi
571761847f8eSopenharmony_ci     * @since 9
571861847f8eSopenharmony_ci     */
571961847f8eSopenharmony_ci    readonly groupName: string;
572061847f8eSopenharmony_ci
572161847f8eSopenharmony_ci    /**
572261847f8eSopenharmony_ci     * Connect type of device for this group.
572361847f8eSopenharmony_ci     * @type { ConnectType }
572461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
572561847f8eSopenharmony_ci     * @systemapi
572661847f8eSopenharmony_ci     * @since 9
572761847f8eSopenharmony_ci     */
572861847f8eSopenharmony_ci    readonly type: ConnectType;
572961847f8eSopenharmony_ci  }
573061847f8eSopenharmony_ci
573161847f8eSopenharmony_ci  /**
573261847f8eSopenharmony_ci   * Array of VolumeGroupInfos, which is read-only.
573361847f8eSopenharmony_ci   * @typedef { Array<Readonly<VolumeGroupInfo>> } VolumeGroupInfos
573461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
573561847f8eSopenharmony_ci   * @systemapi
573661847f8eSopenharmony_ci   * @since 9
573761847f8eSopenharmony_ci   */
573861847f8eSopenharmony_ci  type VolumeGroupInfos = Array<Readonly<VolumeGroupInfo>>;
573961847f8eSopenharmony_ci
574061847f8eSopenharmony_ci  /**
574161847f8eSopenharmony_ci   * Array of AudioRendererChangeInfo, which is read-only.
574261847f8eSopenharmony_ci   * @typedef { Array<Readonly<AudioRendererChangeInfo>> } AudioRendererChangeInfoArray
574361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
574461847f8eSopenharmony_ci   * @since 9
574561847f8eSopenharmony_ci   */
574661847f8eSopenharmony_ci  /**
574761847f8eSopenharmony_ci   * Array of AudioRendererChangeInfo, which is read-only.
574861847f8eSopenharmony_ci   * @typedef { Array<Readonly<AudioRendererChangeInfo>> } AudioRendererChangeInfoArray
574961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
575061847f8eSopenharmony_ci   * @crossplatform
575161847f8eSopenharmony_ci   * @since 12
575261847f8eSopenharmony_ci   */
575361847f8eSopenharmony_ci  type AudioRendererChangeInfoArray = Array<Readonly<AudioRendererChangeInfo>>;
575461847f8eSopenharmony_ci
575561847f8eSopenharmony_ci  /**
575661847f8eSopenharmony_ci   * Describes audio renderer change information.
575761847f8eSopenharmony_ci   * @typedef AudioRendererChangeInfo
575861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
575961847f8eSopenharmony_ci   * @since 9
576061847f8eSopenharmony_ci   */
576161847f8eSopenharmony_ci  /**
576261847f8eSopenharmony_ci   * Describes audio renderer change information.
576361847f8eSopenharmony_ci   * @typedef AudioRendererChangeInfo
576461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
576561847f8eSopenharmony_ci   * @crossplatform
576661847f8eSopenharmony_ci   * @since 12
576761847f8eSopenharmony_ci   */
576861847f8eSopenharmony_ci  interface AudioRendererChangeInfo {
576961847f8eSopenharmony_ci    /**
577061847f8eSopenharmony_ci     * Audio stream unique id.
577161847f8eSopenharmony_ci     * @type { number }
577261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
577361847f8eSopenharmony_ci     * @since 9
577461847f8eSopenharmony_ci     */
577561847f8eSopenharmony_ci    /**
577661847f8eSopenharmony_ci     * Audio stream unique id.
577761847f8eSopenharmony_ci     * @type { number }
577861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
577961847f8eSopenharmony_ci     * @crossplatform
578061847f8eSopenharmony_ci     * @since 12
578161847f8eSopenharmony_ci     */
578261847f8eSopenharmony_ci    readonly streamId: number;
578361847f8eSopenharmony_ci
578461847f8eSopenharmony_ci    /**
578561847f8eSopenharmony_ci     * Uid for audio renderer client application.
578661847f8eSopenharmony_ci     * @type { number }
578761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
578861847f8eSopenharmony_ci     * @systemapi
578961847f8eSopenharmony_ci     * @since 9
579061847f8eSopenharmony_ci     */
579161847f8eSopenharmony_ci    readonly clientUid: number;
579261847f8eSopenharmony_ci
579361847f8eSopenharmony_ci    /**
579461847f8eSopenharmony_ci     * Audio renderer information.
579561847f8eSopenharmony_ci     * @type { AudioRendererInfo }
579661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
579761847f8eSopenharmony_ci     * @since 9
579861847f8eSopenharmony_ci     */
579961847f8eSopenharmony_ci    /**
580061847f8eSopenharmony_ci     * Audio renderer information.
580161847f8eSopenharmony_ci     * @type { AudioRendererInfo }
580261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
580361847f8eSopenharmony_ci     * @crossplatform
580461847f8eSopenharmony_ci     * @since 12
580561847f8eSopenharmony_ci     */
580661847f8eSopenharmony_ci    readonly rendererInfo: AudioRendererInfo;
580761847f8eSopenharmony_ci
580861847f8eSopenharmony_ci    /**
580961847f8eSopenharmony_ci     * Audio state.
581061847f8eSopenharmony_ci     * @type { AudioState }
581161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
581261847f8eSopenharmony_ci     * @systemapi
581361847f8eSopenharmony_ci     * @since 9
581461847f8eSopenharmony_ci     */
581561847f8eSopenharmony_ci    readonly rendererState: AudioState;
581661847f8eSopenharmony_ci
581761847f8eSopenharmony_ci    /**
581861847f8eSopenharmony_ci     * Audio output devices.
581961847f8eSopenharmony_ci     * @type { AudioDeviceDescriptors }
582061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
582161847f8eSopenharmony_ci     * @since 9
582261847f8eSopenharmony_ci     */
582361847f8eSopenharmony_ci    /**
582461847f8eSopenharmony_ci     * Audio output devices.
582561847f8eSopenharmony_ci     * @type { AudioDeviceDescriptors }
582661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
582761847f8eSopenharmony_ci     * @crossplatform
582861847f8eSopenharmony_ci     * @since 12
582961847f8eSopenharmony_ci     */
583061847f8eSopenharmony_ci    readonly deviceDescriptors: AudioDeviceDescriptors;
583161847f8eSopenharmony_ci  }
583261847f8eSopenharmony_ci
583361847f8eSopenharmony_ci  /**
583461847f8eSopenharmony_ci   * Array of AudioCapturerChangeInfo, which is read-only.
583561847f8eSopenharmony_ci   * @typedef { Array<Readonly<AudioCapturerChangeInfo>> } AudioCapturerChangeInfoArray
583661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
583761847f8eSopenharmony_ci   * @since 9
583861847f8eSopenharmony_ci   */
583961847f8eSopenharmony_ci  /**
584061847f8eSopenharmony_ci   * Array of AudioCapturerChangeInfo, which is read-only.
584161847f8eSopenharmony_ci   * @typedef { Array<Readonly<AudioCapturerChangeInfo>> } AudioCapturerChangeInfoArray
584261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
584361847f8eSopenharmony_ci   * @crossplatform
584461847f8eSopenharmony_ci   * @since 12
584561847f8eSopenharmony_ci   */
584661847f8eSopenharmony_ci  type AudioCapturerChangeInfoArray = Array<Readonly<AudioCapturerChangeInfo>>;
584761847f8eSopenharmony_ci
584861847f8eSopenharmony_ci  /**
584961847f8eSopenharmony_ci   * Describes audio capturer change information.
585061847f8eSopenharmony_ci   * @typedef AudioCapturerChangeInfo
585161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
585261847f8eSopenharmony_ci   * @since 9
585361847f8eSopenharmony_ci   */
585461847f8eSopenharmony_ci  /**
585561847f8eSopenharmony_ci   * Describes audio capturer change information.
585661847f8eSopenharmony_ci   * @typedef AudioCapturerChangeInfo
585761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
585861847f8eSopenharmony_ci   * @crossplatform
585961847f8eSopenharmony_ci   * @since 12
586061847f8eSopenharmony_ci   */
586161847f8eSopenharmony_ci  interface AudioCapturerChangeInfo {
586261847f8eSopenharmony_ci    /**
586361847f8eSopenharmony_ci     * Audio stream unique id.
586461847f8eSopenharmony_ci     * @type { number }
586561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
586661847f8eSopenharmony_ci     * @since 9
586761847f8eSopenharmony_ci     */
586861847f8eSopenharmony_ci    /**
586961847f8eSopenharmony_ci     * Audio stream unique id.
587061847f8eSopenharmony_ci     * @type { number }
587161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
587261847f8eSopenharmony_ci     * @crossplatform
587361847f8eSopenharmony_ci     * @since 12
587461847f8eSopenharmony_ci     */
587561847f8eSopenharmony_ci    readonly streamId: number;
587661847f8eSopenharmony_ci
587761847f8eSopenharmony_ci    /**
587861847f8eSopenharmony_ci     * Uid for audio capturer client application.
587961847f8eSopenharmony_ci     * @type { number }
588061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
588161847f8eSopenharmony_ci     * @systemapi
588261847f8eSopenharmony_ci     * @since 9
588361847f8eSopenharmony_ci     */
588461847f8eSopenharmony_ci    readonly clientUid: number;
588561847f8eSopenharmony_ci
588661847f8eSopenharmony_ci    /**
588761847f8eSopenharmony_ci     * Audio capturer information.
588861847f8eSopenharmony_ci     * @type { AudioCapturerInfo }
588961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
589061847f8eSopenharmony_ci     * @since 9
589161847f8eSopenharmony_ci     */
589261847f8eSopenharmony_ci    /**
589361847f8eSopenharmony_ci     * Audio capturer information.
589461847f8eSopenharmony_ci     * @type { AudioCapturerInfo }
589561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
589661847f8eSopenharmony_ci     * @crossplatform
589761847f8eSopenharmony_ci     * @since 12
589861847f8eSopenharmony_ci     */
589961847f8eSopenharmony_ci    readonly capturerInfo: AudioCapturerInfo;
590061847f8eSopenharmony_ci
590161847f8eSopenharmony_ci    /**
590261847f8eSopenharmony_ci     * Audio state.
590361847f8eSopenharmony_ci     * @type { AudioState }
590461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
590561847f8eSopenharmony_ci     * @systemapi
590661847f8eSopenharmony_ci     * @since 9
590761847f8eSopenharmony_ci     */
590861847f8eSopenharmony_ci    readonly capturerState: AudioState;
590961847f8eSopenharmony_ci
591061847f8eSopenharmony_ci    /**
591161847f8eSopenharmony_ci     * Audio input devices.
591261847f8eSopenharmony_ci     * @type { AudioDeviceDescriptors }
591361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
591461847f8eSopenharmony_ci     * @since 9
591561847f8eSopenharmony_ci     */
591661847f8eSopenharmony_ci    /**
591761847f8eSopenharmony_ci     * Audio input devices.
591861847f8eSopenharmony_ci     * @type { AudioDeviceDescriptors }
591961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
592061847f8eSopenharmony_ci     * @crossplatform
592161847f8eSopenharmony_ci     * @since 12
592261847f8eSopenharmony_ci     */
592361847f8eSopenharmony_ci    readonly deviceDescriptors: AudioDeviceDescriptors;
592461847f8eSopenharmony_ci
592561847f8eSopenharmony_ci    /**
592661847f8eSopenharmony_ci     * Audio capturer muted status.
592761847f8eSopenharmony_ci     * @type { ?boolean }
592861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
592961847f8eSopenharmony_ci     * @since 11
593061847f8eSopenharmony_ci     */
593161847f8eSopenharmony_ci    /**
593261847f8eSopenharmony_ci     * Audio capturer muted status.
593361847f8eSopenharmony_ci     * @type { ?boolean }
593461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
593561847f8eSopenharmony_ci     * @crossplatform
593661847f8eSopenharmony_ci     * @since 12
593761847f8eSopenharmony_ci     */
593861847f8eSopenharmony_ci    readonly muted?: boolean;
593961847f8eSopenharmony_ci  }
594061847f8eSopenharmony_ci
594161847f8eSopenharmony_ci  /**
594261847f8eSopenharmony_ci   * Describes an audio device.
594361847f8eSopenharmony_ci   * @typedef AudioDeviceDescriptor
594461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
594561847f8eSopenharmony_ci   * @since 7
594661847f8eSopenharmony_ci   */
594761847f8eSopenharmony_ci  /**
594861847f8eSopenharmony_ci   * Describes an audio device.
594961847f8eSopenharmony_ci   * @typedef AudioDeviceDescriptor
595061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
595161847f8eSopenharmony_ci   * @crossplatform
595261847f8eSopenharmony_ci   * @atomicservice
595361847f8eSopenharmony_ci   * @since 12
595461847f8eSopenharmony_ci   */
595561847f8eSopenharmony_ci  interface AudioDeviceDescriptor {
595661847f8eSopenharmony_ci    /**
595761847f8eSopenharmony_ci     * Audio device role.
595861847f8eSopenharmony_ci     * @type { DeviceRole }
595961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
596061847f8eSopenharmony_ci     * @since 7
596161847f8eSopenharmony_ci     */
596261847f8eSopenharmony_ci    /**
596361847f8eSopenharmony_ci     * Audio device role.
596461847f8eSopenharmony_ci     * @type { DeviceRole }
596561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
596661847f8eSopenharmony_ci     * @crossplatform
596761847f8eSopenharmony_ci     * @atomicservice
596861847f8eSopenharmony_ci     * @since 12
596961847f8eSopenharmony_ci     */
597061847f8eSopenharmony_ci    readonly deviceRole: DeviceRole;
597161847f8eSopenharmony_ci
597261847f8eSopenharmony_ci    /**
597361847f8eSopenharmony_ci     * Audio device type.
597461847f8eSopenharmony_ci     * @type { DeviceType }
597561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
597661847f8eSopenharmony_ci     * @since 7
597761847f8eSopenharmony_ci     */
597861847f8eSopenharmony_ci    /**
597961847f8eSopenharmony_ci     * Audio device type.
598061847f8eSopenharmony_ci     * @type { DeviceType }
598161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
598261847f8eSopenharmony_ci     * @crossplatform
598361847f8eSopenharmony_ci     * @atomicservice
598461847f8eSopenharmony_ci     * @since 12
598561847f8eSopenharmony_ci     */
598661847f8eSopenharmony_ci    readonly deviceType: DeviceType;
598761847f8eSopenharmony_ci
598861847f8eSopenharmony_ci    /**
598961847f8eSopenharmony_ci     * Audio device id.
599061847f8eSopenharmony_ci     * @type { number }
599161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
599261847f8eSopenharmony_ci     * @since 9
599361847f8eSopenharmony_ci     */
599461847f8eSopenharmony_ci    /**
599561847f8eSopenharmony_ci     * Audio device id.
599661847f8eSopenharmony_ci     * @type { number }
599761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
599861847f8eSopenharmony_ci     * @crossplatform
599961847f8eSopenharmony_ci     * @atomicservice
600061847f8eSopenharmony_ci     * @since 12
600161847f8eSopenharmony_ci     */
600261847f8eSopenharmony_ci    readonly id: number;
600361847f8eSopenharmony_ci
600461847f8eSopenharmony_ci    /**
600561847f8eSopenharmony_ci     * Audio device name.
600661847f8eSopenharmony_ci     * @type { string }
600761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
600861847f8eSopenharmony_ci     * @since 9
600961847f8eSopenharmony_ci     */
601061847f8eSopenharmony_ci    /**
601161847f8eSopenharmony_ci     * Audio device name.
601261847f8eSopenharmony_ci     * @type { string }
601361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
601461847f8eSopenharmony_ci     * @crossplatform
601561847f8eSopenharmony_ci     * @atomicservice
601661847f8eSopenharmony_ci     * @since 12
601761847f8eSopenharmony_ci     */
601861847f8eSopenharmony_ci    readonly name: string;
601961847f8eSopenharmony_ci
602061847f8eSopenharmony_ci    /**
602161847f8eSopenharmony_ci     * Audio device address.
602261847f8eSopenharmony_ci     * @type { string }
602361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
602461847f8eSopenharmony_ci     * @since 9
602561847f8eSopenharmony_ci     */
602661847f8eSopenharmony_ci    /**
602761847f8eSopenharmony_ci     * Audio device address.
602861847f8eSopenharmony_ci     * @type { string }
602961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
603061847f8eSopenharmony_ci     * @crossplatform
603161847f8eSopenharmony_ci     * @atomicservice
603261847f8eSopenharmony_ci     * @since 12
603361847f8eSopenharmony_ci     */
603461847f8eSopenharmony_ci    readonly address: string;
603561847f8eSopenharmony_ci
603661847f8eSopenharmony_ci    /**
603761847f8eSopenharmony_ci     * Supported sampling rates.
603861847f8eSopenharmony_ci     * @type { Array<number> }
603961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
604061847f8eSopenharmony_ci     * @since 9
604161847f8eSopenharmony_ci     */
604261847f8eSopenharmony_ci    /**
604361847f8eSopenharmony_ci     * Supported sampling rates.
604461847f8eSopenharmony_ci     * @type { Array<number> }
604561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
604661847f8eSopenharmony_ci     * @crossplatform
604761847f8eSopenharmony_ci     * @atomicservice
604861847f8eSopenharmony_ci     * @since 12
604961847f8eSopenharmony_ci     */
605061847f8eSopenharmony_ci    readonly sampleRates: Array<number>;
605161847f8eSopenharmony_ci
605261847f8eSopenharmony_ci    /**
605361847f8eSopenharmony_ci     * Supported channel counts.
605461847f8eSopenharmony_ci     * @type { Array<number> }
605561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
605661847f8eSopenharmony_ci     * @since 9
605761847f8eSopenharmony_ci     */
605861847f8eSopenharmony_ci    /**
605961847f8eSopenharmony_ci     * Supported channel counts.
606061847f8eSopenharmony_ci     * @type { Array<number> }
606161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
606261847f8eSopenharmony_ci     * @crossplatform
606361847f8eSopenharmony_ci     * @atomicservice
606461847f8eSopenharmony_ci     * @since 12
606561847f8eSopenharmony_ci     */
606661847f8eSopenharmony_ci    readonly channelCounts: Array<number>;
606761847f8eSopenharmony_ci
606861847f8eSopenharmony_ci    /**
606961847f8eSopenharmony_ci     * Supported channel masks.
607061847f8eSopenharmony_ci     * @type { Array<number> }
607161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
607261847f8eSopenharmony_ci     * @since 9
607361847f8eSopenharmony_ci     */
607461847f8eSopenharmony_ci    /**
607561847f8eSopenharmony_ci     * Supported channel masks.
607661847f8eSopenharmony_ci     * @type { Array<number> }
607761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
607861847f8eSopenharmony_ci     * @crossplatform
607961847f8eSopenharmony_ci     * @atomicservice
608061847f8eSopenharmony_ci     * @since 12
608161847f8eSopenharmony_ci     */
608261847f8eSopenharmony_ci    readonly channelMasks: Array<number>;
608361847f8eSopenharmony_ci    /**
608461847f8eSopenharmony_ci     * Device network id
608561847f8eSopenharmony_ci     * @type { string }
608661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
608761847f8eSopenharmony_ci     * @systemapi
608861847f8eSopenharmony_ci     * @since 9
608961847f8eSopenharmony_ci     */
609061847f8eSopenharmony_ci    readonly networkId: string;
609161847f8eSopenharmony_ci    /**
609261847f8eSopenharmony_ci     * Interrupt group id
609361847f8eSopenharmony_ci     * @type { number }
609461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
609561847f8eSopenharmony_ci     * @systemapi
609661847f8eSopenharmony_ci     * @since 9
609761847f8eSopenharmony_ci     */
609861847f8eSopenharmony_ci    readonly interruptGroupId: number;
609961847f8eSopenharmony_ci    /**
610061847f8eSopenharmony_ci     * Volume group id
610161847f8eSopenharmony_ci     * @type { number }
610261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
610361847f8eSopenharmony_ci     * @systemapi
610461847f8eSopenharmony_ci     * @since 9
610561847f8eSopenharmony_ci     */
610661847f8eSopenharmony_ci    readonly volumeGroupId: number;
610761847f8eSopenharmony_ci    /**
610861847f8eSopenharmony_ci     * Name used to display, considering distributed device situation.
610961847f8eSopenharmony_ci     * @type { string }
611061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
611161847f8eSopenharmony_ci     * @since 10
611261847f8eSopenharmony_ci     */
611361847f8eSopenharmony_ci    /**
611461847f8eSopenharmony_ci     * Name used to display, considering distributed device situation.
611561847f8eSopenharmony_ci     * @type { string }
611661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
611761847f8eSopenharmony_ci     * @crossplatform
611861847f8eSopenharmony_ci     * @atomicservice
611961847f8eSopenharmony_ci     * @since 12
612061847f8eSopenharmony_ci     */
612161847f8eSopenharmony_ci    readonly displayName: string;
612261847f8eSopenharmony_ci
612361847f8eSopenharmony_ci    /**
612461847f8eSopenharmony_ci     * Supported encoding types.
612561847f8eSopenharmony_ci     * @type { ?Array<AudioEncodingType> }
612661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
612761847f8eSopenharmony_ci     * @since 11
612861847f8eSopenharmony_ci     */
612961847f8eSopenharmony_ci    /**
613061847f8eSopenharmony_ci     * Supported encoding types.
613161847f8eSopenharmony_ci     * @type { ?Array<AudioEncodingType> }
613261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
613361847f8eSopenharmony_ci     * @crossplatform
613461847f8eSopenharmony_ci     * @atomicservice
613561847f8eSopenharmony_ci     * @since 12
613661847f8eSopenharmony_ci     */
613761847f8eSopenharmony_ci    readonly encodingTypes?: Array<AudioEncodingType>;
613861847f8eSopenharmony_ci  }
613961847f8eSopenharmony_ci
614061847f8eSopenharmony_ci  /**
614161847f8eSopenharmony_ci   * Array of AudioDeviceDescriptors, which is read-only.
614261847f8eSopenharmony_ci   * @typedef { Array<Readonly<AudioDeviceDescriptor>> } AudioDeviceDescriptors
614361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
614461847f8eSopenharmony_ci   * @since 7
614561847f8eSopenharmony_ci   */
614661847f8eSopenharmony_ci  /**
614761847f8eSopenharmony_ci   * Array of AudioDeviceDescriptors, which is read-only.
614861847f8eSopenharmony_ci   * @typedef { Array<Readonly<AudioDeviceDescriptor>> } AudioDeviceDescriptors
614961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
615061847f8eSopenharmony_ci   * @crossplatform
615161847f8eSopenharmony_ci   * @atomicservice
615261847f8eSopenharmony_ci   * @since 12
615361847f8eSopenharmony_ci   */
615461847f8eSopenharmony_ci  type AudioDeviceDescriptors = Array<Readonly<AudioDeviceDescriptor>>;
615561847f8eSopenharmony_ci
615661847f8eSopenharmony_ci  /**
615761847f8eSopenharmony_ci   * Describes the volume event received by the app when the volume is changed.
615861847f8eSopenharmony_ci   * @typedef VolumeEvent
615961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
616061847f8eSopenharmony_ci   * @since 9
616161847f8eSopenharmony_ci   */
616261847f8eSopenharmony_ci  /**
616361847f8eSopenharmony_ci   * Describes the volume event received by the app when the volume is changed.
616461847f8eSopenharmony_ci   * @typedef VolumeEvent
616561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Volume
616661847f8eSopenharmony_ci   * @crossplatform
616761847f8eSopenharmony_ci   * @since 12
616861847f8eSopenharmony_ci   */
616961847f8eSopenharmony_ci  interface VolumeEvent {
617061847f8eSopenharmony_ci    /**
617161847f8eSopenharmony_ci     * Volume type of the current stream.
617261847f8eSopenharmony_ci     * @type { AudioVolumeType }
617361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
617461847f8eSopenharmony_ci     * @since 9
617561847f8eSopenharmony_ci     */
617661847f8eSopenharmony_ci    volumeType: AudioVolumeType;
617761847f8eSopenharmony_ci    /**
617861847f8eSopenharmony_ci     * Volume level.
617961847f8eSopenharmony_ci     * @type { number }
618061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
618161847f8eSopenharmony_ci     * @since 9
618261847f8eSopenharmony_ci     */
618361847f8eSopenharmony_ci    /**
618461847f8eSopenharmony_ci     * Volume level.
618561847f8eSopenharmony_ci     * @type { number }
618661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
618761847f8eSopenharmony_ci     * @crossplatform
618861847f8eSopenharmony_ci     * @since 12
618961847f8eSopenharmony_ci     */
619061847f8eSopenharmony_ci    volume: number;
619161847f8eSopenharmony_ci    /**
619261847f8eSopenharmony_ci     * Whether to show the volume change in UI.
619361847f8eSopenharmony_ci     * @type { boolean }
619461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
619561847f8eSopenharmony_ci     * @since 9
619661847f8eSopenharmony_ci     */
619761847f8eSopenharmony_ci    updateUi: boolean;
619861847f8eSopenharmony_ci    /**
619961847f8eSopenharmony_ci     * volumeGroup id
620061847f8eSopenharmony_ci     * @type { number }
620161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
620261847f8eSopenharmony_ci     * @systemapi
620361847f8eSopenharmony_ci     * @since 9
620461847f8eSopenharmony_ci     */
620561847f8eSopenharmony_ci    volumeGroupId: number;
620661847f8eSopenharmony_ci    /**
620761847f8eSopenharmony_ci     * Device network id
620861847f8eSopenharmony_ci     * @type { string }
620961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Volume
621061847f8eSopenharmony_ci     * @systemapi
621161847f8eSopenharmony_ci     * @since 9
621261847f8eSopenharmony_ci     */
621361847f8eSopenharmony_ci    networkId: string;
621461847f8eSopenharmony_ci  }
621561847f8eSopenharmony_ci
621661847f8eSopenharmony_ci  /**
621761847f8eSopenharmony_ci   * Describes the callback invoked for audio interruption or focus gain events.When the audio of an application
621861847f8eSopenharmony_ci   * is interrupted by another application, the callback is invoked to notify the former application.
621961847f8eSopenharmony_ci   * @typedef InterruptAction
622061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
622161847f8eSopenharmony_ci   * @since 7
622261847f8eSopenharmony_ci   * @deprecated since 9
622361847f8eSopenharmony_ci   * @useinstead ohos.multimedia.audio.InterruptEvent
622461847f8eSopenharmony_ci   */
622561847f8eSopenharmony_ci  interface InterruptAction {
622661847f8eSopenharmony_ci
622761847f8eSopenharmony_ci    /**
622861847f8eSopenharmony_ci     * Event type.
622961847f8eSopenharmony_ci     * The value TYPE_ACTIVATED means the focus gain event, and TYPE_INTERRUPT means the audio interruption event.
623061847f8eSopenharmony_ci     * @type { InterruptActionType }
623161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
623261847f8eSopenharmony_ci     * @since 7
623361847f8eSopenharmony_ci     * @deprecated since 9
623461847f8eSopenharmony_ci     */
623561847f8eSopenharmony_ci    actionType: InterruptActionType;
623661847f8eSopenharmony_ci
623761847f8eSopenharmony_ci    /**
623861847f8eSopenharmony_ci     * Type of the audio interruption event.
623961847f8eSopenharmony_ci     * @type { ?InterruptType }
624061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
624161847f8eSopenharmony_ci     * @since 7
624261847f8eSopenharmony_ci     * @deprecated since 9
624361847f8eSopenharmony_ci     */
624461847f8eSopenharmony_ci    type?: InterruptType;
624561847f8eSopenharmony_ci
624661847f8eSopenharmony_ci    /**
624761847f8eSopenharmony_ci     * Hint for the audio interruption event.
624861847f8eSopenharmony_ci     * @type { ?InterruptHint }
624961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
625061847f8eSopenharmony_ci     * @since 7
625161847f8eSopenharmony_ci     * @deprecated since 9
625261847f8eSopenharmony_ci     */
625361847f8eSopenharmony_ci    hint?: InterruptHint;
625461847f8eSopenharmony_ci
625561847f8eSopenharmony_ci    /**
625661847f8eSopenharmony_ci     * Whether the focus is gained or released. The value true means that the focus is gained or released,
625761847f8eSopenharmony_ci     * and false means that the focus fails to be gained or released.
625861847f8eSopenharmony_ci     * @type { ?boolean }
625961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
626061847f8eSopenharmony_ci     * @since 7
626161847f8eSopenharmony_ci     * @deprecated since 9
626261847f8eSopenharmony_ci     */
626361847f8eSopenharmony_ci    activated?: boolean;
626461847f8eSopenharmony_ci  }
626561847f8eSopenharmony_ci
626661847f8eSopenharmony_ci  /**
626761847f8eSopenharmony_ci   * Describes input parameters of audio listening events.
626861847f8eSopenharmony_ci   * @typedef AudioInterrupt
626961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
627061847f8eSopenharmony_ci   * @since 7
627161847f8eSopenharmony_ci   * @deprecated since 9
627261847f8eSopenharmony_ci   */
627361847f8eSopenharmony_ci  interface AudioInterrupt {
627461847f8eSopenharmony_ci
627561847f8eSopenharmony_ci    /**
627661847f8eSopenharmony_ci     * Audio stream usage type.
627761847f8eSopenharmony_ci     * @type { StreamUsage }
627861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
627961847f8eSopenharmony_ci     * @since 7
628061847f8eSopenharmony_ci     * @deprecated since 9
628161847f8eSopenharmony_ci     */
628261847f8eSopenharmony_ci    streamUsage: StreamUsage;
628361847f8eSopenharmony_ci
628461847f8eSopenharmony_ci    /**
628561847f8eSopenharmony_ci     * Type of the media interrupted.
628661847f8eSopenharmony_ci     * @type { ContentType }
628761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
628861847f8eSopenharmony_ci     * @since 7
628961847f8eSopenharmony_ci     * @deprecated since 9
629061847f8eSopenharmony_ci     */
629161847f8eSopenharmony_ci    contentType: ContentType;
629261847f8eSopenharmony_ci
629361847f8eSopenharmony_ci    /**
629461847f8eSopenharmony_ci     * Whether audio playback can be paused when it is interrupted.
629561847f8eSopenharmony_ci     * The value true means that audio playback can be paused when it is interrupted, and false means the opposite.
629661847f8eSopenharmony_ci     * @type { boolean }
629761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
629861847f8eSopenharmony_ci     * @since 7
629961847f8eSopenharmony_ci     * @deprecated since 9
630061847f8eSopenharmony_ci     */
630161847f8eSopenharmony_ci    pauseWhenDucked: boolean;
630261847f8eSopenharmony_ci  }
630361847f8eSopenharmony_ci
630461847f8eSopenharmony_ci  /**
630561847f8eSopenharmony_ci   * Describes the microphone state change event received by the app when the microphone state is changed.
630661847f8eSopenharmony_ci   * @typedef MicStateChangeEvent
630761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
630861847f8eSopenharmony_ci   * @since 9
630961847f8eSopenharmony_ci   */
631061847f8eSopenharmony_ci  interface MicStateChangeEvent {
631161847f8eSopenharmony_ci    /**
631261847f8eSopenharmony_ci     * Mic mute state.
631361847f8eSopenharmony_ci     * @type { boolean }
631461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
631561847f8eSopenharmony_ci     * @since 9
631661847f8eSopenharmony_ci     */
631761847f8eSopenharmony_ci    mute: boolean;
631861847f8eSopenharmony_ci  }
631961847f8eSopenharmony_ci  /**
632061847f8eSopenharmony_ci   * Describes the device change type and device information.
632161847f8eSopenharmony_ci   * @typedef DeviceChangeAction
632261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
632361847f8eSopenharmony_ci   * @since 7
632461847f8eSopenharmony_ci   */
632561847f8eSopenharmony_ci  /**
632661847f8eSopenharmony_ci   * Describes the device change type and device information.
632761847f8eSopenharmony_ci   * @typedef DeviceChangeAction
632861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
632961847f8eSopenharmony_ci   * @crossplatform
633061847f8eSopenharmony_ci   * @since 12
633161847f8eSopenharmony_ci   */
633261847f8eSopenharmony_ci  interface DeviceChangeAction {
633361847f8eSopenharmony_ci    /**
633461847f8eSopenharmony_ci     * Device change type.
633561847f8eSopenharmony_ci     * @type { DeviceChangeType }
633661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
633761847f8eSopenharmony_ci     * @since 7
633861847f8eSopenharmony_ci     */
633961847f8eSopenharmony_ci    /**
634061847f8eSopenharmony_ci     * Device change type.
634161847f8eSopenharmony_ci     * @type { DeviceChangeType }
634261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
634361847f8eSopenharmony_ci     * @crossplatform
634461847f8eSopenharmony_ci     * @since 12
634561847f8eSopenharmony_ci     */
634661847f8eSopenharmony_ci    type: DeviceChangeType;
634761847f8eSopenharmony_ci
634861847f8eSopenharmony_ci    /**
634961847f8eSopenharmony_ci     * Device information.
635061847f8eSopenharmony_ci     * @type { AudioDeviceDescriptors }
635161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
635261847f8eSopenharmony_ci     * @since 7
635361847f8eSopenharmony_ci     */
635461847f8eSopenharmony_ci    /**
635561847f8eSopenharmony_ci     * Device information.
635661847f8eSopenharmony_ci     * @type { AudioDeviceDescriptors }
635761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
635861847f8eSopenharmony_ci     * @crossplatform
635961847f8eSopenharmony_ci     * @since 12
636061847f8eSopenharmony_ci     */
636161847f8eSopenharmony_ci    deviceDescriptors: AudioDeviceDescriptors;
636261847f8eSopenharmony_ci  }
636361847f8eSopenharmony_ci
636461847f8eSopenharmony_ci  /**
636561847f8eSopenharmony_ci   * Enumerates channel blend mode.
636661847f8eSopenharmony_ci   * @enum { number }
636761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
636861847f8eSopenharmony_ci   * @since 11
636961847f8eSopenharmony_ci   */
637061847f8eSopenharmony_ci  /**
637161847f8eSopenharmony_ci   * Enumerates channel blend mode.
637261847f8eSopenharmony_ci   * @enum { number }
637361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
637461847f8eSopenharmony_ci   * @crossplatform
637561847f8eSopenharmony_ci   * @since 12
637661847f8eSopenharmony_ci   */
637761847f8eSopenharmony_ci  enum ChannelBlendMode {
637861847f8eSopenharmony_ci    /**
637961847f8eSopenharmony_ci     * No channel process.
638061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
638161847f8eSopenharmony_ci     * @since 11
638261847f8eSopenharmony_ci     */
638361847f8eSopenharmony_ci    /**
638461847f8eSopenharmony_ci     * No channel process.
638561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
638661847f8eSopenharmony_ci     * @crossplatform
638761847f8eSopenharmony_ci     * @since 12
638861847f8eSopenharmony_ci     */
638961847f8eSopenharmony_ci    MODE_DEFAULT = 0,
639061847f8eSopenharmony_ci    /**
639161847f8eSopenharmony_ci     * Blend left and right channel.
639261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
639361847f8eSopenharmony_ci     * @since 11
639461847f8eSopenharmony_ci     */
639561847f8eSopenharmony_ci    /**
639661847f8eSopenharmony_ci     * Blend left and right channel.
639761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
639861847f8eSopenharmony_ci     * @crossplatform
639961847f8eSopenharmony_ci     * @since 12
640061847f8eSopenharmony_ci     */
640161847f8eSopenharmony_ci    MODE_BLEND_LR = 1,
640261847f8eSopenharmony_ci    /**
640361847f8eSopenharmony_ci     * Replicate left to right channel.
640461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
640561847f8eSopenharmony_ci     * @since 11
640661847f8eSopenharmony_ci     */
640761847f8eSopenharmony_ci    /**
640861847f8eSopenharmony_ci     * Replicate left to right channel.
640961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
641061847f8eSopenharmony_ci     * @crossplatform
641161847f8eSopenharmony_ci     * @since 12
641261847f8eSopenharmony_ci     */
641361847f8eSopenharmony_ci    MODE_ALL_LEFT = 2,
641461847f8eSopenharmony_ci    /**
641561847f8eSopenharmony_ci     * Replicate right to left channel.
641661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
641761847f8eSopenharmony_ci     * @since 11
641861847f8eSopenharmony_ci     */
641961847f8eSopenharmony_ci    /**
642061847f8eSopenharmony_ci     * Replicate right to left channel.
642161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
642261847f8eSopenharmony_ci     * @crossplatform
642361847f8eSopenharmony_ci     * @since 12
642461847f8eSopenharmony_ci     */
642561847f8eSopenharmony_ci    MODE_ALL_RIGHT = 3,
642661847f8eSopenharmony_ci  }
642761847f8eSopenharmony_ci
642861847f8eSopenharmony_ci  /**
642961847f8eSopenharmony_ci   * Enumerates audio stream device change reason.
643061847f8eSopenharmony_ci   * @enum { number }
643161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
643261847f8eSopenharmony_ci   * @since 11
643361847f8eSopenharmony_ci   */
643461847f8eSopenharmony_ci  /**
643561847f8eSopenharmony_ci   * Enumerates audio stream device change reason.
643661847f8eSopenharmony_ci   * @enum { number }
643761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
643861847f8eSopenharmony_ci   * @crossplatform
643961847f8eSopenharmony_ci   * @atomicservice
644061847f8eSopenharmony_ci   * @since 12
644161847f8eSopenharmony_ci   */
644261847f8eSopenharmony_ci  enum AudioStreamDeviceChangeReason {
644361847f8eSopenharmony_ci    /**
644461847f8eSopenharmony_ci     * Unknown.
644561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
644661847f8eSopenharmony_ci     * @since 11
644761847f8eSopenharmony_ci     */
644861847f8eSopenharmony_ci    /**
644961847f8eSopenharmony_ci     * Unknown.
645061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
645161847f8eSopenharmony_ci     * @crossplatform
645261847f8eSopenharmony_ci     * @atomicservice
645361847f8eSopenharmony_ci     * @since 12
645461847f8eSopenharmony_ci     */
645561847f8eSopenharmony_ci    REASON_UNKNOWN = 0,
645661847f8eSopenharmony_ci    /**
645761847f8eSopenharmony_ci     * New device available.
645861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
645961847f8eSopenharmony_ci     * @since 11
646061847f8eSopenharmony_ci     */
646161847f8eSopenharmony_ci    /**
646261847f8eSopenharmony_ci     * New device available.
646361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
646461847f8eSopenharmony_ci     * @crossplatform
646561847f8eSopenharmony_ci     * @atomicservice
646661847f8eSopenharmony_ci     * @since 12
646761847f8eSopenharmony_ci     */
646861847f8eSopenharmony_ci    REASON_NEW_DEVICE_AVAILABLE = 1,
646961847f8eSopenharmony_ci    /**
647061847f8eSopenharmony_ci     * Old device unavailable. Applications should consider to pause the audio playback when this reason is
647161847f8eSopenharmony_ci     * reported.
647261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
647361847f8eSopenharmony_ci     * @since 11
647461847f8eSopenharmony_ci     */
647561847f8eSopenharmony_ci    /**
647661847f8eSopenharmony_ci     * Old device unavailable. Applications should consider to pause the audio playback when this reason is
647761847f8eSopenharmony_ci     * reported.
647861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
647961847f8eSopenharmony_ci     * @crossplatform
648061847f8eSopenharmony_ci     * @atomicservice
648161847f8eSopenharmony_ci     * @since 12
648261847f8eSopenharmony_ci     */
648361847f8eSopenharmony_ci    REASON_OLD_DEVICE_UNAVAILABLE = 2,
648461847f8eSopenharmony_ci    /**
648561847f8eSopenharmony_ci     * Overrode by user or system.
648661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
648761847f8eSopenharmony_ci     * @since 11
648861847f8eSopenharmony_ci     */
648961847f8eSopenharmony_ci    /**
649061847f8eSopenharmony_ci     * Overrode by user or system.
649161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
649261847f8eSopenharmony_ci     * @crossplatform
649361847f8eSopenharmony_ci     * @atomicservice
649461847f8eSopenharmony_ci     * @since 12
649561847f8eSopenharmony_ci     */
649661847f8eSopenharmony_ci    REASON_OVERRODE = 3,
649761847f8eSopenharmony_ci  }
649861847f8eSopenharmony_ci  /**
649961847f8eSopenharmony_ci   * Audio stream device change info.
650061847f8eSopenharmony_ci   * @typedef AudioStreamDeviceChangeInfo
650161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
650261847f8eSopenharmony_ci   * @since 11
650361847f8eSopenharmony_ci   */
650461847f8eSopenharmony_ci  /**
650561847f8eSopenharmony_ci   * Audio stream device change info.
650661847f8eSopenharmony_ci   * @typedef AudioStreamDeviceChangeInfo
650761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Device
650861847f8eSopenharmony_ci   * @crossplatform
650961847f8eSopenharmony_ci   * @atomicservice
651061847f8eSopenharmony_ci   * @since 12
651161847f8eSopenharmony_ci   */
651261847f8eSopenharmony_ci  interface AudioStreamDeviceChangeInfo {
651361847f8eSopenharmony_ci    /**
651461847f8eSopenharmony_ci     * Audio device descriptors after change.
651561847f8eSopenharmony_ci     * @type { AudioDeviceDescriptors }
651661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
651761847f8eSopenharmony_ci     * @since 11
651861847f8eSopenharmony_ci     */
651961847f8eSopenharmony_ci    /**
652061847f8eSopenharmony_ci     * Audio device descriptors after change.
652161847f8eSopenharmony_ci     * @type { AudioDeviceDescriptors }
652261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
652361847f8eSopenharmony_ci     * @crossplatform
652461847f8eSopenharmony_ci     * @atomicservice
652561847f8eSopenharmony_ci     * @since 12
652661847f8eSopenharmony_ci     */
652761847f8eSopenharmony_ci    devices: AudioDeviceDescriptors;
652861847f8eSopenharmony_ci    /**
652961847f8eSopenharmony_ci     * Audio stream device change reason.
653061847f8eSopenharmony_ci     * @type { AudioStreamDeviceChangeReason }
653161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
653261847f8eSopenharmony_ci     * @since 11
653361847f8eSopenharmony_ci     */
653461847f8eSopenharmony_ci    /**
653561847f8eSopenharmony_ci     * Audio stream device change reason.
653661847f8eSopenharmony_ci     * @type { AudioStreamDeviceChangeReason }
653761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
653861847f8eSopenharmony_ci     * @crossplatform
653961847f8eSopenharmony_ci     * @atomicservice
654061847f8eSopenharmony_ci     * @since 12
654161847f8eSopenharmony_ci     */
654261847f8eSopenharmony_ci    changeReason: AudioStreamDeviceChangeReason;
654361847f8eSopenharmony_ci  }
654461847f8eSopenharmony_ci
654561847f8eSopenharmony_ci  /**
654661847f8eSopenharmony_ci   * Enumerates callback result.
654761847f8eSopenharmony_ci   * @enum { number }
654861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
654961847f8eSopenharmony_ci   * @crossplatform
655061847f8eSopenharmony_ci   * @since 12
655161847f8eSopenharmony_ci   */
655261847f8eSopenharmony_ci  enum AudioDataCallbackResult {
655361847f8eSopenharmony_ci    /**
655461847f8eSopenharmony_ci     * Indicates data of this callback is invalid.
655561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
655661847f8eSopenharmony_ci     * @crossplatform
655761847f8eSopenharmony_ci     * @since 12
655861847f8eSopenharmony_ci     */
655961847f8eSopenharmony_ci    INVALID = -1,
656061847f8eSopenharmony_ci
656161847f8eSopenharmony_ci    /**
656261847f8eSopenharmony_ci     * Indicates data of this callback is valid.
656361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
656461847f8eSopenharmony_ci     * @crossplatform
656561847f8eSopenharmony_ci     * @since 12
656661847f8eSopenharmony_ci     */
656761847f8eSopenharmony_ci    VALID = 0,
656861847f8eSopenharmony_ci  }
656961847f8eSopenharmony_ci
657061847f8eSopenharmony_ci  /**
657161847f8eSopenharmony_ci   * Type definition of callback function for audio renderer write data.
657261847f8eSopenharmony_ci   *
657361847f8eSopenharmony_ci   * @typedef { function } AudioRendererWriteDataCallback
657461847f8eSopenharmony_ci   * @param { ArrayBuffer } data - audio data array buffer.
657561847f8eSopenharmony_ci   * @returns { AudioDataCallbackResult | void } result of callback or void. If void or AudioDataCallbackResult.VALID is
657661847f8eSopenharmony_ci   * returned, it indicates the data is valid and will be played. If AudioDataCallbackResult.INVALID is returned, it
657761847f8eSopenharmony_ci   * indicates the data is will not be played.
657861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
657961847f8eSopenharmony_ci   * @crossplatform
658061847f8eSopenharmony_ci   * @since 12
658161847f8eSopenharmony_ci   */
658261847f8eSopenharmony_ci  type AudioRendererWriteDataCallback = (data: ArrayBuffer) => AudioDataCallbackResult | void;
658361847f8eSopenharmony_ci
658461847f8eSopenharmony_ci  /**
658561847f8eSopenharmony_ci   * Provides audio playback APIs.
658661847f8eSopenharmony_ci   * @typedef AudioRenderer
658761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
658861847f8eSopenharmony_ci   * @since 8
658961847f8eSopenharmony_ci   */
659061847f8eSopenharmony_ci  /**
659161847f8eSopenharmony_ci   * Provides audio playback APIs.
659261847f8eSopenharmony_ci   * @typedef AudioRenderer
659361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
659461847f8eSopenharmony_ci   * @crossplatform
659561847f8eSopenharmony_ci   * @since 12
659661847f8eSopenharmony_ci   */
659761847f8eSopenharmony_ci  interface AudioRenderer {
659861847f8eSopenharmony_ci    /**
659961847f8eSopenharmony_ci     * Defines the current render state.
660061847f8eSopenharmony_ci     * @type { AudioState }
660161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
660261847f8eSopenharmony_ci     * @since 8
660361847f8eSopenharmony_ci     */
660461847f8eSopenharmony_ci    /**
660561847f8eSopenharmony_ci     * Defines the current render state.
660661847f8eSopenharmony_ci     * @type { AudioState }
660761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
660861847f8eSopenharmony_ci     * @crossplatform
660961847f8eSopenharmony_ci     * @since 12
661061847f8eSopenharmony_ci     */
661161847f8eSopenharmony_ci    readonly state: AudioState;
661261847f8eSopenharmony_ci
661361847f8eSopenharmony_ci    /**
661461847f8eSopenharmony_ci     * Obtains the renderer information provided while creating a renderer instance. This method uses an asynchronous
661561847f8eSopenharmony_ci     * callback to return the result.
661661847f8eSopenharmony_ci     * @param { AsyncCallback<AudioRendererInfo> } callback - Callback used to return the renderer information.
661761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
661861847f8eSopenharmony_ci     * @since 8
661961847f8eSopenharmony_ci     */
662061847f8eSopenharmony_ci    /**
662161847f8eSopenharmony_ci     * Obtains the renderer information provided while creating a renderer instance. This method uses an asynchronous
662261847f8eSopenharmony_ci     * callback to return the result.
662361847f8eSopenharmony_ci     * @param { AsyncCallback<AudioRendererInfo> } callback - Callback used to return the renderer information.
662461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
662561847f8eSopenharmony_ci     * @crossplatform
662661847f8eSopenharmony_ci     * @since 12
662761847f8eSopenharmony_ci     */
662861847f8eSopenharmony_ci    getRendererInfo(callback: AsyncCallback<AudioRendererInfo>): void;
662961847f8eSopenharmony_ci    /**
663061847f8eSopenharmony_ci     * Obtains the renderer information provided while creating a renderer instance. This method uses a promise to
663161847f8eSopenharmony_ci     * return the result.
663261847f8eSopenharmony_ci     * @returns { Promise<AudioRendererInfo> } Promise used to return the renderer information.
663361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
663461847f8eSopenharmony_ci     * @since 8
663561847f8eSopenharmony_ci     */
663661847f8eSopenharmony_ci    /**
663761847f8eSopenharmony_ci     * Obtains the renderer information provided while creating a renderer instance. This method uses a promise to
663861847f8eSopenharmony_ci     * return the result.
663961847f8eSopenharmony_ci     * @returns { Promise<AudioRendererInfo> } Promise used to return the renderer information.
664061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
664161847f8eSopenharmony_ci     * @crossplatform
664261847f8eSopenharmony_ci     * @since 12
664361847f8eSopenharmony_ci     */
664461847f8eSopenharmony_ci    getRendererInfo(): Promise<AudioRendererInfo>;
664561847f8eSopenharmony_ci    /**
664661847f8eSopenharmony_ci     * Obtains the renderer information provided while creating a renderer instance.
664761847f8eSopenharmony_ci     * @returns { AudioRendererInfo } The renderer information.
664861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
664961847f8eSopenharmony_ci     * @since 10
665061847f8eSopenharmony_ci     */
665161847f8eSopenharmony_ci    /**
665261847f8eSopenharmony_ci     * Obtains the renderer information provided while creating a renderer instance.
665361847f8eSopenharmony_ci     * @returns { AudioRendererInfo } The renderer information.
665461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
665561847f8eSopenharmony_ci     * @crossplatform
665661847f8eSopenharmony_ci     * @since 12
665761847f8eSopenharmony_ci     */
665861847f8eSopenharmony_ci    getRendererInfoSync(): AudioRendererInfo;
665961847f8eSopenharmony_ci
666061847f8eSopenharmony_ci    /**
666161847f8eSopenharmony_ci     * Obtains the renderer stream information. This method uses an asynchronous callback to return the result.
666261847f8eSopenharmony_ci     * @param { AsyncCallback<AudioStreamInfo> } callback - Callback used to return the stream information.
666361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
666461847f8eSopenharmony_ci     * @since 8
666561847f8eSopenharmony_ci     */
666661847f8eSopenharmony_ci    /**
666761847f8eSopenharmony_ci     * Obtains the renderer stream information. This method uses an asynchronous callback to return the result.
666861847f8eSopenharmony_ci     * @param { AsyncCallback<AudioStreamInfo> } callback - Callback used to return the stream information.
666961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
667061847f8eSopenharmony_ci     * @crossplatform
667161847f8eSopenharmony_ci     * @since 12
667261847f8eSopenharmony_ci     */
667361847f8eSopenharmony_ci    getStreamInfo(callback: AsyncCallback<AudioStreamInfo>): void;
667461847f8eSopenharmony_ci    /**
667561847f8eSopenharmony_ci     * Obtains the renderer stream information. This method uses a promise to return the result.
667661847f8eSopenharmony_ci     * @returns { Promise<AudioStreamInfo> } Promise used to return the stream information.
667761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
667861847f8eSopenharmony_ci     * @since 8
667961847f8eSopenharmony_ci     */
668061847f8eSopenharmony_ci    /**
668161847f8eSopenharmony_ci     * Obtains the renderer stream information. This method uses a promise to return the result.
668261847f8eSopenharmony_ci     * @returns { Promise<AudioStreamInfo> } Promise used to return the stream information.
668361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
668461847f8eSopenharmony_ci     * @crossplatform
668561847f8eSopenharmony_ci     * @since 12
668661847f8eSopenharmony_ci     */
668761847f8eSopenharmony_ci    getStreamInfo(): Promise<AudioStreamInfo>;
668861847f8eSopenharmony_ci    /**
668961847f8eSopenharmony_ci     * Obtains the renderer stream information.
669061847f8eSopenharmony_ci     * @returns { AudioStreamInfo } The stream information.
669161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
669261847f8eSopenharmony_ci     * @since 10
669361847f8eSopenharmony_ci     */
669461847f8eSopenharmony_ci    /**
669561847f8eSopenharmony_ci     * Obtains the renderer stream information.
669661847f8eSopenharmony_ci     * @returns { AudioStreamInfo } The stream information.
669761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
669861847f8eSopenharmony_ci     * @crossplatform
669961847f8eSopenharmony_ci     * @since 12
670061847f8eSopenharmony_ci     */
670161847f8eSopenharmony_ci    getStreamInfoSync(): AudioStreamInfo;
670261847f8eSopenharmony_ci
670361847f8eSopenharmony_ci    /**
670461847f8eSopenharmony_ci     * Obtains the renderer stream id. This method uses an asynchronous callback to return the result.
670561847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the stream id.
670661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
670761847f8eSopenharmony_ci     * @since 9
670861847f8eSopenharmony_ci     */
670961847f8eSopenharmony_ci    /**
671061847f8eSopenharmony_ci     * Obtains the renderer stream id. This method uses an asynchronous callback to return the result.
671161847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the stream id.
671261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
671361847f8eSopenharmony_ci     * @crossplatform
671461847f8eSopenharmony_ci     * @since 12
671561847f8eSopenharmony_ci     */
671661847f8eSopenharmony_ci    getAudioStreamId(callback: AsyncCallback<number>): void;
671761847f8eSopenharmony_ci    /**
671861847f8eSopenharmony_ci     * Obtains the renderer stream id. This method uses a promise to return the result.
671961847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the stream id.
672061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
672161847f8eSopenharmony_ci     * @since 9
672261847f8eSopenharmony_ci     */
672361847f8eSopenharmony_ci    /**
672461847f8eSopenharmony_ci     * Obtains the renderer stream id. This method uses a promise to return the result.
672561847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the stream id.
672661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
672761847f8eSopenharmony_ci     * @crossplatform
672861847f8eSopenharmony_ci     * @since 12
672961847f8eSopenharmony_ci     */
673061847f8eSopenharmony_ci    getAudioStreamId(): Promise<number>;
673161847f8eSopenharmony_ci    /**
673261847f8eSopenharmony_ci     * Obtains the renderer stream id.
673361847f8eSopenharmony_ci     * @returns { number } The stream id.
673461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
673561847f8eSopenharmony_ci     * @since 10
673661847f8eSopenharmony_ci     */
673761847f8eSopenharmony_ci    /**
673861847f8eSopenharmony_ci     * Obtains the renderer stream id.
673961847f8eSopenharmony_ci     * @returns { number } The stream id.
674061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
674161847f8eSopenharmony_ci     * @crossplatform
674261847f8eSopenharmony_ci     * @since 12
674361847f8eSopenharmony_ci     */
674461847f8eSopenharmony_ci    getAudioStreamIdSync(): number;
674561847f8eSopenharmony_ci
674661847f8eSopenharmony_ci    /**
674761847f8eSopenharmony_ci     * Obtains the current audio effect mode. This method uses an asynchronous callback to return the query result.
674861847f8eSopenharmony_ci     * @param { AsyncCallback<AudioEffectMode> } callback - Callback used to return the current audio effect mode.
674961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
675061847f8eSopenharmony_ci     * @since 10
675161847f8eSopenharmony_ci     */
675261847f8eSopenharmony_ci    getAudioEffectMode(callback: AsyncCallback<AudioEffectMode>): void;
675361847f8eSopenharmony_ci    /**
675461847f8eSopenharmony_ci     * Obtains the current audio effect mode. This method uses a promise to return the query result.
675561847f8eSopenharmony_ci     * @returns { Promise<AudioEffectMode> } Promise used to return the current audio effect mode.
675661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
675761847f8eSopenharmony_ci     * @since 10
675861847f8eSopenharmony_ci     */
675961847f8eSopenharmony_ci    getAudioEffectMode(): Promise<AudioEffectMode>;
676061847f8eSopenharmony_ci
676161847f8eSopenharmony_ci    /**
676261847f8eSopenharmony_ci     * Sets the current audio effect mode. This method uses an asynchronous callback to return the result.
676361847f8eSopenharmony_ci     * @param { AudioEffectMode } mode - Audio effect mode.
676461847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
676561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
676661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
676761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
676861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback.
676961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
677061847f8eSopenharmony_ci     * @since 10
677161847f8eSopenharmony_ci     */
677261847f8eSopenharmony_ci    setAudioEffectMode(mode: AudioEffectMode, callback: AsyncCallback<void>): void;
677361847f8eSopenharmony_ci    /**
677461847f8eSopenharmony_ci     * Sets the current audio effect mode. This method uses a promise to return the result.
677561847f8eSopenharmony_ci     * @param { AudioEffectMode } mode - Audio effect mode.
677661847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
677761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
677861847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
677961847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
678061847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise.
678161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
678261847f8eSopenharmony_ci     * @since 10
678361847f8eSopenharmony_ci     */
678461847f8eSopenharmony_ci    setAudioEffectMode(mode: AudioEffectMode): Promise<void>;
678561847f8eSopenharmony_ci
678661847f8eSopenharmony_ci    /**
678761847f8eSopenharmony_ci     * Starts the renderer.
678861847f8eSopenharmony_ci     * Success: This method uses an asynchronous callback to return the result.
678961847f8eSopenharmony_ci     * Failure: This method uses an asynchronous callback to return the error instance. Possible causes:
679061847f8eSopenharmony_ci     *          6800301: Unsupported state, Audio focus request failed, System error.
679161847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
679261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
679361847f8eSopenharmony_ci     * @since 8
679461847f8eSopenharmony_ci     */
679561847f8eSopenharmony_ci    /**
679661847f8eSopenharmony_ci     * Starts the renderer. This method uses an asynchronous callback to return the result.
679761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
679861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
679961847f8eSopenharmony_ci     * @crossplatform
680061847f8eSopenharmony_ci     * @since 12
680161847f8eSopenharmony_ci     */
680261847f8eSopenharmony_ci    start(callback: AsyncCallback<void>): void;
680361847f8eSopenharmony_ci    /**
680461847f8eSopenharmony_ci     * Starts the renderer.
680561847f8eSopenharmony_ci     * Success: This method uses a promise to return the result.
680661847f8eSopenharmony_ci     * Failure: This method uses a promise to return the error instance. Possible causes:
680761847f8eSopenharmony_ci     *          6800301: Unsupported state, Audio focus request failed, System error.
680861847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
680961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
681061847f8eSopenharmony_ci     * @since 8
681161847f8eSopenharmony_ci     */
681261847f8eSopenharmony_ci    /**
681361847f8eSopenharmony_ci     * Starts the renderer. This method uses a promise to return the result.
681461847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
681561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
681661847f8eSopenharmony_ci     * @crossplatform
681761847f8eSopenharmony_ci     * @since 12
681861847f8eSopenharmony_ci     */
681961847f8eSopenharmony_ci    start(): Promise<void>;
682061847f8eSopenharmony_ci
682161847f8eSopenharmony_ci    /**
682261847f8eSopenharmony_ci     * Writes the buffer. This method uses an asynchronous callback to return the result.
682361847f8eSopenharmony_ci     * @param { ArrayBuffer } buffer - Buffer to be written.
682461847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Returns the number of bytes written if the operation is successful.
682561847f8eSopenharmony_ci     *        Returns an error code otherwise.
682661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
682761847f8eSopenharmony_ci     * @since 8
682861847f8eSopenharmony_ci     * @deprecated since 11
682961847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRenderer#event:writeData
683061847f8eSopenharmony_ci     */
683161847f8eSopenharmony_ci    write(buffer: ArrayBuffer, callback: AsyncCallback<number>): void;
683261847f8eSopenharmony_ci    /**
683361847f8eSopenharmony_ci     * Writes the buffer. This method uses a promise to return the result.
683461847f8eSopenharmony_ci     * @param { ArrayBuffer } buffer - Buffer to be written.
683561847f8eSopenharmony_ci     * @returns { Promise<number> } Returns the number of bytes written if the operation is successful.
683661847f8eSopenharmony_ci     *          Returns an error code otherwise.
683761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
683861847f8eSopenharmony_ci     * @since 8
683961847f8eSopenharmony_ci     * @deprecated since 11
684061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRenderer#event:writeData
684161847f8eSopenharmony_ci     */
684261847f8eSopenharmony_ci    write(buffer: ArrayBuffer): Promise<number>;
684361847f8eSopenharmony_ci
684461847f8eSopenharmony_ci    /**
684561847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses an
684661847f8eSopenharmony_ci     * asynchronous callback to return the result.
684761847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the timestamp.
684861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
684961847f8eSopenharmony_ci     * @since 8
685061847f8eSopenharmony_ci     */
685161847f8eSopenharmony_ci    /**
685261847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses an
685361847f8eSopenharmony_ci     * asynchronous callback to return the result.
685461847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the timestamp.
685561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
685661847f8eSopenharmony_ci     * @crossplatform
685761847f8eSopenharmony_ci     * @since 12
685861847f8eSopenharmony_ci     */
685961847f8eSopenharmony_ci    getAudioTime(callback: AsyncCallback<number>): void;
686061847f8eSopenharmony_ci    /**
686161847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses a
686261847f8eSopenharmony_ci     * promise to return the result.
686361847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the timestamp.
686461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
686561847f8eSopenharmony_ci     * @since 8
686661847f8eSopenharmony_ci     */
686761847f8eSopenharmony_ci    /**
686861847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses a
686961847f8eSopenharmony_ci     * promise to return the result.
687061847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the timestamp.
687161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
687261847f8eSopenharmony_ci     * @crossplatform
687361847f8eSopenharmony_ci     * @since 12
687461847f8eSopenharmony_ci     */
687561847f8eSopenharmony_ci    getAudioTime(): Promise<number>;
687661847f8eSopenharmony_ci    /**
687761847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds.
687861847f8eSopenharmony_ci     * @returns { number } The audio timestamp.
687961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
688061847f8eSopenharmony_ci     * @since 10
688161847f8eSopenharmony_ci     */
688261847f8eSopenharmony_ci    /**
688361847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds.
688461847f8eSopenharmony_ci     * @returns { number } The audio timestamp.
688561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
688661847f8eSopenharmony_ci     * @crossplatform
688761847f8eSopenharmony_ci     * @since 12
688861847f8eSopenharmony_ci     */
688961847f8eSopenharmony_ci    getAudioTimeSync(): number;
689061847f8eSopenharmony_ci
689161847f8eSopenharmony_ci    /**
689261847f8eSopenharmony_ci     * Drains the playback buffer. This method uses an asynchronous callback to return the result.
689361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
689461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
689561847f8eSopenharmony_ci     * @since 8
689661847f8eSopenharmony_ci     */
689761847f8eSopenharmony_ci    /**
689861847f8eSopenharmony_ci     * Drains the playback buffer. This method uses an asynchronous callback to return the result.
689961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
690061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
690161847f8eSopenharmony_ci     * @crossplatform
690261847f8eSopenharmony_ci     * @since 12
690361847f8eSopenharmony_ci     */
690461847f8eSopenharmony_ci    drain(callback: AsyncCallback<void>): void;
690561847f8eSopenharmony_ci    /**
690661847f8eSopenharmony_ci     * Drains the playback buffer. This method uses a promise to return the result.
690761847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
690861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
690961847f8eSopenharmony_ci     * @since 8
691061847f8eSopenharmony_ci     */
691161847f8eSopenharmony_ci    /**
691261847f8eSopenharmony_ci     * Drains the playback buffer. This method uses a promise to return the result.
691361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
691461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
691561847f8eSopenharmony_ci     * @crossplatform
691661847f8eSopenharmony_ci     * @since 12
691761847f8eSopenharmony_ci     */
691861847f8eSopenharmony_ci    drain(): Promise<void>;
691961847f8eSopenharmony_ci
692061847f8eSopenharmony_ci    /**
692161847f8eSopenharmony_ci     * Flushes the playback buffer. This method uses a promise to return the result.
692261847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
692361847f8eSopenharmony_ci     * @throws { BusinessError } 6800103 - Operation not permit at current state. Return by promise.
692461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
692561847f8eSopenharmony_ci     * @since 11
692661847f8eSopenharmony_ci     */
692761847f8eSopenharmony_ci    /**
692861847f8eSopenharmony_ci     * Flushes the playback buffer. This method uses a promise to return the result.
692961847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
693061847f8eSopenharmony_ci     * @throws { BusinessError } 6800103 - Operation not permit at current state. Return by promise.
693161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
693261847f8eSopenharmony_ci     * @crossplatform
693361847f8eSopenharmony_ci     * @since 12
693461847f8eSopenharmony_ci     */
693561847f8eSopenharmony_ci    flush(): Promise<void>;
693661847f8eSopenharmony_ci
693761847f8eSopenharmony_ci    /**
693861847f8eSopenharmony_ci     * Pauses rendering. This method uses an asynchronous callback to return the result.
693961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
694061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
694161847f8eSopenharmony_ci     * @since 8
694261847f8eSopenharmony_ci     */
694361847f8eSopenharmony_ci    /**
694461847f8eSopenharmony_ci     * Pauses rendering. This method uses an asynchronous callback to return the result.
694561847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
694661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
694761847f8eSopenharmony_ci     * @crossplatform
694861847f8eSopenharmony_ci     * @since 12
694961847f8eSopenharmony_ci     */
695061847f8eSopenharmony_ci    pause(callback: AsyncCallback<void>): void;
695161847f8eSopenharmony_ci    /**
695261847f8eSopenharmony_ci     * Pauses rendering. This method uses a promise to return the result.
695361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
695461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
695561847f8eSopenharmony_ci     * @since 8
695661847f8eSopenharmony_ci     */
695761847f8eSopenharmony_ci    /**
695861847f8eSopenharmony_ci     * Pauses rendering. This method uses a promise to return the result.
695961847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
696061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
696161847f8eSopenharmony_ci     * @crossplatform
696261847f8eSopenharmony_ci     * @since 12
696361847f8eSopenharmony_ci     */
696461847f8eSopenharmony_ci    pause(): Promise<void>;
696561847f8eSopenharmony_ci
696661847f8eSopenharmony_ci    /**
696761847f8eSopenharmony_ci     * Stops rendering. This method uses an asynchronous callback to return the result.
696861847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
696961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
697061847f8eSopenharmony_ci     * @since 8
697161847f8eSopenharmony_ci     */
697261847f8eSopenharmony_ci    /**
697361847f8eSopenharmony_ci     * Stops rendering. This method uses an asynchronous callback to return the result.
697461847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
697561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
697661847f8eSopenharmony_ci     * @crossplatform
697761847f8eSopenharmony_ci     * @since 12
697861847f8eSopenharmony_ci     */
697961847f8eSopenharmony_ci    stop(callback: AsyncCallback<void>): void;
698061847f8eSopenharmony_ci    /**
698161847f8eSopenharmony_ci     * Stops rendering. This method uses a promise to return the result.
698261847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
698361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
698461847f8eSopenharmony_ci     * @since 8
698561847f8eSopenharmony_ci     */
698661847f8eSopenharmony_ci    /**
698761847f8eSopenharmony_ci     * Stops rendering. This method uses a promise to return the result.
698861847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
698961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
699061847f8eSopenharmony_ci     * @crossplatform
699161847f8eSopenharmony_ci     * @since 12
699261847f8eSopenharmony_ci     */
699361847f8eSopenharmony_ci    stop(): Promise<void>;
699461847f8eSopenharmony_ci
699561847f8eSopenharmony_ci    /**
699661847f8eSopenharmony_ci     * Releases the renderer. This method uses an asynchronous callback to return the result.
699761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
699861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
699961847f8eSopenharmony_ci     * @since 8
700061847f8eSopenharmony_ci     */
700161847f8eSopenharmony_ci    /**
700261847f8eSopenharmony_ci     * Releases the renderer. This method uses an asynchronous callback to return the result.
700361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
700461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
700561847f8eSopenharmony_ci     * @crossplatform
700661847f8eSopenharmony_ci     * @since 12
700761847f8eSopenharmony_ci     */
700861847f8eSopenharmony_ci    release(callback: AsyncCallback<void>): void;
700961847f8eSopenharmony_ci    /**
701061847f8eSopenharmony_ci     * Releases the renderer. This method uses a promise to return the result.
701161847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
701261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
701361847f8eSopenharmony_ci     * @since 8
701461847f8eSopenharmony_ci     */
701561847f8eSopenharmony_ci    /**
701661847f8eSopenharmony_ci     * Releases the renderer. This method uses a promise to return the result.
701761847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
701861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
701961847f8eSopenharmony_ci     * @crossplatform
702061847f8eSopenharmony_ci     * @since 12
702161847f8eSopenharmony_ci     */
702261847f8eSopenharmony_ci    release(): Promise<void>;
702361847f8eSopenharmony_ci
702461847f8eSopenharmony_ci    /**
702561847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses an asynchronous callback to
702661847f8eSopenharmony_ci     * return the result.
702761847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the buffer size.
702861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
702961847f8eSopenharmony_ci     * @since 8
703061847f8eSopenharmony_ci     */
703161847f8eSopenharmony_ci    /**
703261847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses an asynchronous callback to
703361847f8eSopenharmony_ci     * return the result.
703461847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the buffer size.
703561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
703661847f8eSopenharmony_ci     * @crossplatform
703761847f8eSopenharmony_ci     * @since 12
703861847f8eSopenharmony_ci     */
703961847f8eSopenharmony_ci    getBufferSize(callback: AsyncCallback<number>): void;
704061847f8eSopenharmony_ci    /**
704161847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses a promise to return the result.
704261847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the buffer size.
704361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
704461847f8eSopenharmony_ci     * @since 8
704561847f8eSopenharmony_ci     */
704661847f8eSopenharmony_ci    /**
704761847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses a promise to return the result.
704861847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the buffer size.
704961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
705061847f8eSopenharmony_ci     * @crossplatform
705161847f8eSopenharmony_ci     * @since 12
705261847f8eSopenharmony_ci     */
705361847f8eSopenharmony_ci    getBufferSize(): Promise<number>;
705461847f8eSopenharmony_ci    /**
705561847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for rendering.
705661847f8eSopenharmony_ci     * @returns { number } The audio buffer size.
705761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
705861847f8eSopenharmony_ci     * @since 10
705961847f8eSopenharmony_ci     */
706061847f8eSopenharmony_ci    /**
706161847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for rendering.
706261847f8eSopenharmony_ci     * @returns { number } The audio buffer size.
706361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
706461847f8eSopenharmony_ci     * @crossplatform
706561847f8eSopenharmony_ci     * @since 12
706661847f8eSopenharmony_ci     */
706761847f8eSopenharmony_ci    getBufferSizeSync(): number;
706861847f8eSopenharmony_ci
706961847f8eSopenharmony_ci    /**
707061847f8eSopenharmony_ci     * Sets the render rate. This method uses an asynchronous callback to return the result.
707161847f8eSopenharmony_ci     * @param { AudioRendererRate } rate - Audio render rate.
707261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
707361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
707461847f8eSopenharmony_ci     * @since 8
707561847f8eSopenharmony_ci     * @deprecated since 11
707661847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRenderer#setSpeed
707761847f8eSopenharmony_ci     */
707861847f8eSopenharmony_ci    setRenderRate(rate: AudioRendererRate, callback: AsyncCallback<void>): void;
707961847f8eSopenharmony_ci
708061847f8eSopenharmony_ci    /**
708161847f8eSopenharmony_ci     * Sets the render rate. This method uses a promise to return the result.
708261847f8eSopenharmony_ci     * @param { AudioRendererRate } rate - Audio render rate.
708361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
708461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
708561847f8eSopenharmony_ci     * @since 8
708661847f8eSopenharmony_ci     * @deprecated since 11
708761847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRenderer#setSpeed
708861847f8eSopenharmony_ci     */
708961847f8eSopenharmony_ci    setRenderRate(rate: AudioRendererRate): Promise<void>;
709061847f8eSopenharmony_ci
709161847f8eSopenharmony_ci    /**
709261847f8eSopenharmony_ci     * Sets the playback speed.
709361847f8eSopenharmony_ci     * @param { number } speed -  Audio playback speed. The value type is float, form 0.25 to 4.0.
709461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
709561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
709661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
709761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
709861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
709961847f8eSopenharmony_ci     * @since 11
710061847f8eSopenharmony_ci     */
710161847f8eSopenharmony_ci    /**
710261847f8eSopenharmony_ci     * Sets the playback speed.
710361847f8eSopenharmony_ci     * @param { number } speed -  Audio playback speed. The value type is float, form 0.25 to 4.0.
710461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
710561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
710661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
710761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
710861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
710961847f8eSopenharmony_ci     * @crossplatform
711061847f8eSopenharmony_ci     * @since 12
711161847f8eSopenharmony_ci     */
711261847f8eSopenharmony_ci    setSpeed(speed: number): void;
711361847f8eSopenharmony_ci
711461847f8eSopenharmony_ci    /**
711561847f8eSopenharmony_ci     * Obtains the current render rate. This method uses an asynchronous callback to return the result.
711661847f8eSopenharmony_ci     * @param { AsyncCallback<AudioRendererRate> } callback - Callback used to return the audio render rate.
711761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
711861847f8eSopenharmony_ci     * @since 8
711961847f8eSopenharmony_ci     * @deprecated since 11
712061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRenderer#getSpeed
712161847f8eSopenharmony_ci     */
712261847f8eSopenharmony_ci    getRenderRate(callback: AsyncCallback<AudioRendererRate>): void;
712361847f8eSopenharmony_ci
712461847f8eSopenharmony_ci    /**
712561847f8eSopenharmony_ci     * Obtains the current render rate. This method uses a promise to return the result.
712661847f8eSopenharmony_ci     * @returns { Promise<AudioRendererRate> } Promise used to return the audio render rate.
712761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
712861847f8eSopenharmony_ci     * @since 8
712961847f8eSopenharmony_ci     * @deprecated since 11
713061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRenderer#getSpeed
713161847f8eSopenharmony_ci     */
713261847f8eSopenharmony_ci    getRenderRate(): Promise<AudioRendererRate>;
713361847f8eSopenharmony_ci
713461847f8eSopenharmony_ci    /**
713561847f8eSopenharmony_ci     * Obtains the current render rate.
713661847f8eSopenharmony_ci     * @returns { AudioRendererRate } The audio render rate.
713761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
713861847f8eSopenharmony_ci     * @since 10
713961847f8eSopenharmony_ci     * @deprecated since 11
714061847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioRenderer#getSpeed
714161847f8eSopenharmony_ci     */
714261847f8eSopenharmony_ci    getRenderRateSync(): AudioRendererRate;
714361847f8eSopenharmony_ci
714461847f8eSopenharmony_ci    /**
714561847f8eSopenharmony_ci     * Obtains the current playback speed.
714661847f8eSopenharmony_ci     * @returns { number } The playback speed.
714761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
714861847f8eSopenharmony_ci     * @since 11
714961847f8eSopenharmony_ci     */
715061847f8eSopenharmony_ci    /**
715161847f8eSopenharmony_ci     * Obtains the current playback speed.
715261847f8eSopenharmony_ci     * @returns { number } The playback speed.
715361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
715461847f8eSopenharmony_ci     * @crossplatform
715561847f8eSopenharmony_ci     * @since 12
715661847f8eSopenharmony_ci     */
715761847f8eSopenharmony_ci    getSpeed(): number;
715861847f8eSopenharmony_ci
715961847f8eSopenharmony_ci    /**
716061847f8eSopenharmony_ci     * Set interrupt mode.
716161847f8eSopenharmony_ci     * @param { InterruptMode } mode - The interrupt mode.
716261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
716361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
716461847f8eSopenharmony_ci     * @since 9
716561847f8eSopenharmony_ci     */
716661847f8eSopenharmony_ci    /**
716761847f8eSopenharmony_ci     * Set interrupt mode.
716861847f8eSopenharmony_ci     * @param { InterruptMode } mode - The interrupt mode.
716961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
717061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
717161847f8eSopenharmony_ci     * @crossplatform
717261847f8eSopenharmony_ci     * @since 12
717361847f8eSopenharmony_ci     */
717461847f8eSopenharmony_ci    setInterruptMode(mode: InterruptMode, callback: AsyncCallback<void>): void;
717561847f8eSopenharmony_ci    /**
717661847f8eSopenharmony_ci     * Set interrupt mode.
717761847f8eSopenharmony_ci     * @param { InterruptMode } mode - The interrupt mode.
717861847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
717961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
718061847f8eSopenharmony_ci     * @since 9
718161847f8eSopenharmony_ci     */
718261847f8eSopenharmony_ci    /**
718361847f8eSopenharmony_ci     * Set interrupt mode.
718461847f8eSopenharmony_ci     * @param { InterruptMode } mode - The interrupt mode.
718561847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
718661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
718761847f8eSopenharmony_ci     * @crossplatform
718861847f8eSopenharmony_ci     * @since 12
718961847f8eSopenharmony_ci     */
719061847f8eSopenharmony_ci    setInterruptMode(mode: InterruptMode): Promise<void>;
719161847f8eSopenharmony_ci    /**
719261847f8eSopenharmony_ci     * Set interrupt mode.
719361847f8eSopenharmony_ci     * @param { InterruptMode } mode - The interrupt mode.
719461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
719561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
719661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
719761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
719861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
719961847f8eSopenharmony_ci     * @since 10
720061847f8eSopenharmony_ci     */
720161847f8eSopenharmony_ci    /**
720261847f8eSopenharmony_ci     * Set interrupt mode.
720361847f8eSopenharmony_ci     * @param { InterruptMode } mode - The interrupt mode.
720461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
720561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
720661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
720761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
720861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
720961847f8eSopenharmony_ci     * @crossplatform
721061847f8eSopenharmony_ci     * @since 12
721161847f8eSopenharmony_ci     */
721261847f8eSopenharmony_ci    setInterruptModeSync(mode: InterruptMode): void;
721361847f8eSopenharmony_ci
721461847f8eSopenharmony_ci    /**
721561847f8eSopenharmony_ci     * Sets the volume for this stream. This method uses an asynchronous callback to return the result.
721661847f8eSopenharmony_ci     * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0.
721761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
721861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
721961847f8eSopenharmony_ci     * @since 9
722061847f8eSopenharmony_ci     */
722161847f8eSopenharmony_ci    /**
722261847f8eSopenharmony_ci     * Sets the volume for this stream. This method uses an asynchronous callback to return the result.
722361847f8eSopenharmony_ci     * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0.
722461847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
722561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
722661847f8eSopenharmony_ci     * @crossplatform
722761847f8eSopenharmony_ci     * @since 12
722861847f8eSopenharmony_ci     */
722961847f8eSopenharmony_ci    setVolume(volume: number, callback: AsyncCallback<void>): void;
723061847f8eSopenharmony_ci    /**
723161847f8eSopenharmony_ci     * Sets the volume for a stream. This method uses a promise to return the result.
723261847f8eSopenharmony_ci     * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0.
723361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
723461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
723561847f8eSopenharmony_ci     * @since 9
723661847f8eSopenharmony_ci     */
723761847f8eSopenharmony_ci    /**
723861847f8eSopenharmony_ci     * Sets the volume for a stream. This method uses a promise to return the result.
723961847f8eSopenharmony_ci     * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0.
724061847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
724161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
724261847f8eSopenharmony_ci     * @crossplatform
724361847f8eSopenharmony_ci     * @since 12
724461847f8eSopenharmony_ci     */
724561847f8eSopenharmony_ci    setVolume(volume: number): Promise<void>;
724661847f8eSopenharmony_ci
724761847f8eSopenharmony_ci    /**
724861847f8eSopenharmony_ci     * Gets volume of this stream.
724961847f8eSopenharmony_ci     * @returns { number } Returns one float value.
725061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
725161847f8eSopenharmony_ci     * @since 12
725261847f8eSopenharmony_ci     */
725361847f8eSopenharmony_ci    getVolume(): number;
725461847f8eSopenharmony_ci
725561847f8eSopenharmony_ci    /**
725661847f8eSopenharmony_ci     * Changes the volume with ramp for a duration.
725761847f8eSopenharmony_ci     * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0.
725861847f8eSopenharmony_ci     * @param { number } duration -  Duration for volume ramp, in millisecond.
725961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
726061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
726161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
726261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
726361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
726461847f8eSopenharmony_ci     * @since 11
726561847f8eSopenharmony_ci     */
726661847f8eSopenharmony_ci    /**
726761847f8eSopenharmony_ci     * Changes the volume with ramp for a duration.
726861847f8eSopenharmony_ci     * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0.
726961847f8eSopenharmony_ci     * @param { number } duration -  Duration for volume ramp, in millisecond.
727061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
727161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
727261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
727361847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
727461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
727561847f8eSopenharmony_ci     * @crossplatform
727661847f8eSopenharmony_ci     * @since 12
727761847f8eSopenharmony_ci     */
727861847f8eSopenharmony_ci    setVolumeWithRamp(volume: number, duration: number): void;
727961847f8eSopenharmony_ci
728061847f8eSopenharmony_ci    /**
728161847f8eSopenharmony_ci     * Gets the min volume this stream can set. This method uses an asynchronous callback to return the result.
728261847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the result.
728361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
728461847f8eSopenharmony_ci     * @since 10
728561847f8eSopenharmony_ci     */
728661847f8eSopenharmony_ci    /**
728761847f8eSopenharmony_ci     * Gets the min volume this stream can set. This method uses an asynchronous callback to return the result.
728861847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the result.
728961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
729061847f8eSopenharmony_ci     * @crossplatform
729161847f8eSopenharmony_ci     * @since 12
729261847f8eSopenharmony_ci     */
729361847f8eSopenharmony_ci    getMinStreamVolume(callback: AsyncCallback<number>): void;
729461847f8eSopenharmony_ci    /**
729561847f8eSopenharmony_ci     * Gets the min volume this stream can set. This method uses a promise to return the result.
729661847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the result.
729761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
729861847f8eSopenharmony_ci     * @since 10
729961847f8eSopenharmony_ci     */
730061847f8eSopenharmony_ci    /**
730161847f8eSopenharmony_ci     * Gets the min volume this stream can set. This method uses a promise to return the result.
730261847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the result.
730361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
730461847f8eSopenharmony_ci     * @crossplatform
730561847f8eSopenharmony_ci     * @since 12
730661847f8eSopenharmony_ci     */
730761847f8eSopenharmony_ci    getMinStreamVolume(): Promise<number>;
730861847f8eSopenharmony_ci    /**
730961847f8eSopenharmony_ci     * Gets the min volume this stream can set.
731061847f8eSopenharmony_ci     * @returns { number } Min stream volume.
731161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
731261847f8eSopenharmony_ci     * @since 10
731361847f8eSopenharmony_ci     */
731461847f8eSopenharmony_ci    /**
731561847f8eSopenharmony_ci     * Gets the min volume this stream can set.
731661847f8eSopenharmony_ci     * @returns { number } Min stream volume.
731761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
731861847f8eSopenharmony_ci     * @crossplatform
731961847f8eSopenharmony_ci     * @since 12
732061847f8eSopenharmony_ci     */
732161847f8eSopenharmony_ci    getMinStreamVolumeSync(): number;
732261847f8eSopenharmony_ci
732361847f8eSopenharmony_ci    /**
732461847f8eSopenharmony_ci     * Gets the max volume this stream can set. This method uses an asynchronous callback to return the result.
732561847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the result.
732661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
732761847f8eSopenharmony_ci     * @since 10
732861847f8eSopenharmony_ci     */
732961847f8eSopenharmony_ci    /**
733061847f8eSopenharmony_ci     * Gets the max volume this stream can set. This method uses an asynchronous callback to return the result.
733161847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the result.
733261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
733361847f8eSopenharmony_ci     * @crossplatform
733461847f8eSopenharmony_ci     * @since 12
733561847f8eSopenharmony_ci     */
733661847f8eSopenharmony_ci    getMaxStreamVolume(callback: AsyncCallback<number>): void;
733761847f8eSopenharmony_ci    /**
733861847f8eSopenharmony_ci     * Gets the max volume this stream can set. This method uses a promise to return the result.
733961847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the result.
734061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
734161847f8eSopenharmony_ci     * @since 10
734261847f8eSopenharmony_ci     */
734361847f8eSopenharmony_ci    /**
734461847f8eSopenharmony_ci     * Gets the max volume this stream can set. This method uses a promise to return the result.
734561847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the result.
734661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
734761847f8eSopenharmony_ci     * @crossplatform
734861847f8eSopenharmony_ci     * @since 12
734961847f8eSopenharmony_ci     */
735061847f8eSopenharmony_ci    getMaxStreamVolume(): Promise<number>;
735161847f8eSopenharmony_ci    /**
735261847f8eSopenharmony_ci     * Gets the max volume this stream can set.
735361847f8eSopenharmony_ci     * @returns { number } Max stream volume.
735461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
735561847f8eSopenharmony_ci     * @since 10
735661847f8eSopenharmony_ci     */
735761847f8eSopenharmony_ci    /**
735861847f8eSopenharmony_ci     * Gets the max volume this stream can set.
735961847f8eSopenharmony_ci     * @returns { number } Max stream volume.
736061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
736161847f8eSopenharmony_ci     * @crossplatform
736261847f8eSopenharmony_ci     * @since 12
736361847f8eSopenharmony_ci     */
736461847f8eSopenharmony_ci    getMaxStreamVolumeSync(): number;
736561847f8eSopenharmony_ci
736661847f8eSopenharmony_ci    /**
736761847f8eSopenharmony_ci     * Gets buffer underflow count. This method uses an asynchronous callback to return the result.
736861847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the result.
736961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
737061847f8eSopenharmony_ci     * @since 10
737161847f8eSopenharmony_ci     */
737261847f8eSopenharmony_ci    /**
737361847f8eSopenharmony_ci     * Gets buffer underflow count. This method uses an asynchronous callback to return the result.
737461847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the result.
737561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
737661847f8eSopenharmony_ci     * @crossplatform
737761847f8eSopenharmony_ci     * @since 12
737861847f8eSopenharmony_ci     */
737961847f8eSopenharmony_ci    getUnderflowCount(callback: AsyncCallback<number>): void;
738061847f8eSopenharmony_ci    /**
738161847f8eSopenharmony_ci     * Gets buffer underflow count. This method uses a promise to return the result.
738261847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the result.
738361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
738461847f8eSopenharmony_ci     * @since 10
738561847f8eSopenharmony_ci     */
738661847f8eSopenharmony_ci    /**
738761847f8eSopenharmony_ci     * Gets buffer underflow count. This method uses a promise to return the result.
738861847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the result.
738961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
739061847f8eSopenharmony_ci     * @crossplatform
739161847f8eSopenharmony_ci     * @since 12
739261847f8eSopenharmony_ci     */
739361847f8eSopenharmony_ci    getUnderflowCount(): Promise<number>;
739461847f8eSopenharmony_ci    /**
739561847f8eSopenharmony_ci     * Gets buffer underflow count.
739661847f8eSopenharmony_ci     * @returns { number } Underflow count number.
739761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
739861847f8eSopenharmony_ci     * @since 10
739961847f8eSopenharmony_ci     */
740061847f8eSopenharmony_ci    /**
740161847f8eSopenharmony_ci     * Gets buffer underflow count.
740261847f8eSopenharmony_ci     * @returns { number } Underflow count number.
740361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
740461847f8eSopenharmony_ci     * @crossplatform
740561847f8eSopenharmony_ci     * @since 12
740661847f8eSopenharmony_ci     */
740761847f8eSopenharmony_ci    getUnderflowCountSync(): number;
740861847f8eSopenharmony_ci
740961847f8eSopenharmony_ci    /**
741061847f8eSopenharmony_ci     * Gets the output device or devices for this stream.
741161847f8eSopenharmony_ci     * This method uses an asynchronous callback to return the result.
741261847f8eSopenharmony_ci     * @param { AsyncCallback<AudioDeviceDescriptors> } callback - Callback used to return the result.
741361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
741461847f8eSopenharmony_ci     * @since 10
741561847f8eSopenharmony_ci     */
741661847f8eSopenharmony_ci    /**
741761847f8eSopenharmony_ci     * Gets the output device or devices for this stream.
741861847f8eSopenharmony_ci     * This method uses an asynchronous callback to return the result.
741961847f8eSopenharmony_ci     * @param { AsyncCallback<AudioDeviceDescriptors> } callback - Callback used to return the result.
742061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
742161847f8eSopenharmony_ci     * @crossplatform
742261847f8eSopenharmony_ci     * @since 12
742361847f8eSopenharmony_ci     */
742461847f8eSopenharmony_ci    getCurrentOutputDevices(callback: AsyncCallback<AudioDeviceDescriptors>): void;
742561847f8eSopenharmony_ci    /**
742661847f8eSopenharmony_ci     * Gets the output device or devices for this stream.
742761847f8eSopenharmony_ci     * This method uses a promise to return the result.
742861847f8eSopenharmony_ci     * @returns { Promise<AudioDeviceDescriptors> } Promise used to return the result.
742961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
743061847f8eSopenharmony_ci     * @since 10
743161847f8eSopenharmony_ci     */
743261847f8eSopenharmony_ci    /**
743361847f8eSopenharmony_ci     * Gets the output device or devices for this stream.
743461847f8eSopenharmony_ci     * This method uses a promise to return the result.
743561847f8eSopenharmony_ci     * @returns { Promise<AudioDeviceDescriptors> } Promise used to return the result.
743661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
743761847f8eSopenharmony_ci     * @crossplatform
743861847f8eSopenharmony_ci     * @since 12
743961847f8eSopenharmony_ci     */
744061847f8eSopenharmony_ci    getCurrentOutputDevices(): Promise<AudioDeviceDescriptors>;
744161847f8eSopenharmony_ci    /**
744261847f8eSopenharmony_ci     * Gets the output device or devices for this stream.
744361847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } Output device or devices.
744461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
744561847f8eSopenharmony_ci     * @since 10
744661847f8eSopenharmony_ci     */
744761847f8eSopenharmony_ci    /**
744861847f8eSopenharmony_ci     * Gets the output device or devices for this stream.
744961847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } Output device or devices.
745061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
745161847f8eSopenharmony_ci     * @crossplatform
745261847f8eSopenharmony_ci     * @since 12
745361847f8eSopenharmony_ci     */
745461847f8eSopenharmony_ci    getCurrentOutputDevicesSync(): AudioDeviceDescriptors;
745561847f8eSopenharmony_ci
745661847f8eSopenharmony_ci    /**
745761847f8eSopenharmony_ci     * Sets channel blend mode for this stream.
745861847f8eSopenharmony_ci     * @param { ChannelBlendMode } mode - Target channel blend mode.
745961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
746061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
746161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
746261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
746361847f8eSopenharmony_ci     * @throws { BusinessError } 6800103 - Operation not permit at current state.
746461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
746561847f8eSopenharmony_ci     * @since 11
746661847f8eSopenharmony_ci     */
746761847f8eSopenharmony_ci    /**
746861847f8eSopenharmony_ci     * Sets channel blend mode for this stream.
746961847f8eSopenharmony_ci     * @param { ChannelBlendMode } mode - Target channel blend mode.
747061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
747161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
747261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
747361847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
747461847f8eSopenharmony_ci     * @throws { BusinessError } 6800103 - Operation not permit at current state.
747561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
747661847f8eSopenharmony_ci     * @crossplatform
747761847f8eSopenharmony_ci     * @since 12
747861847f8eSopenharmony_ci     */
747961847f8eSopenharmony_ci    setChannelBlendMode(mode: ChannelBlendMode): void;
748061847f8eSopenharmony_ci
748161847f8eSopenharmony_ci    /**
748261847f8eSopenharmony_ci     * Sets silent and mix with other stream for this stream.
748361847f8eSopenharmony_ci     * @param { boolean } on - Whether play silent and mix with other streams.
748461847f8eSopenharmony_ci     *     true: set the silent mode and mix with other streams.
748561847f8eSopenharmony_ci     *     false: unset the silent mode, current stream will trigger the audio focus internally.
748661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
748761847f8eSopenharmony_ci     * @since 12
748861847f8eSopenharmony_ci     */
748961847f8eSopenharmony_ci    setSilentModeAndMixWithOthers(on: boolean): void;
749061847f8eSopenharmony_ci
749161847f8eSopenharmony_ci    /**
749261847f8eSopenharmony_ci     * Gets silent and mix with other stream status for this stream.
749361847f8eSopenharmony_ci     * @returns { boolean } Returns silent and mix with other stream status.
749461847f8eSopenharmony_ci     *     true: current stream is in the silent mode and mix with other streams.
749561847f8eSopenharmony_ci     *     false: current stream in in the normal playback mode
749661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
749761847f8eSopenharmony_ci     * @since 12
749861847f8eSopenharmony_ci     */
749961847f8eSopenharmony_ci    getSilentModeAndMixWithOthers(): boolean;
750061847f8eSopenharmony_ci
750161847f8eSopenharmony_ci    /**
750261847f8eSopenharmony_ci     * Temporarily changes the current audio device
750361847f8eSopenharmony_ci     * This function applys on audiorenderers whose StreamUsage are
750461847f8eSopenharmony_ci     * STREAM_USAGE_VOICE_COMMUNICATIN/STREAM_USAGE_VIDEO_COMMUNICATION/STREAM_USAGE_VOICE_MESSAGE.
750561847f8eSopenharmony_ci     * Setting the device will only takes effect if no other accessory such as headphones are in use
750661847f8eSopenharmony_ci     * @param { DeviceType } deviceType - the available deviceTypes are
750761847f8eSopenharmony_ci     *                                    EARPIECE: Built-in earpiece
750861847f8eSopenharmony_ci     *                                    SPEAKER: Built-in speaker
750961847f8eSopenharmony_ci     *                                    DEFAULT: System default output device
751061847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
751161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
751261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
751361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
751461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
751561847f8eSopenharmony_ci     * @throws { BusinessError } 6800103 - Operation not permit at current state.
751661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
751761847f8eSopenharmony_ci     * @since 12
751861847f8eSopenharmony_ci     */
751961847f8eSopenharmony_ci    setDefaultOutputDevice(deviceType: DeviceType): Promise<void>;
752061847f8eSopenharmony_ci
752161847f8eSopenharmony_ci    /**
752261847f8eSopenharmony_ci     * Listens for audio interrupt events. This method uses a callback to get interrupt events. The interrupt event is
752361847f8eSopenharmony_ci     * triggered when audio playback is interrupted.
752461847f8eSopenharmony_ci     * @param { 'audioInterrupt' } type - Type of the event to listen for. Only the audioInterrupt event is supported.
752561847f8eSopenharmony_ci     * @param { Callback<InterruptEvent> } callback - Callback used to listen for interrupt callback.
752661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
752761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
752861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
752961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
753061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
753161847f8eSopenharmony_ci     * @since 9
753261847f8eSopenharmony_ci     */
753361847f8eSopenharmony_ci    /**
753461847f8eSopenharmony_ci     * Listens for audio interrupt events. This method uses a callback to get interrupt events. The interrupt event is
753561847f8eSopenharmony_ci     * triggered when audio playback is interrupted.
753661847f8eSopenharmony_ci     * @param { 'audioInterrupt' } type - Type of the event to listen for. Only the audioInterrupt event is supported.
753761847f8eSopenharmony_ci     * @param { Callback<InterruptEvent> } callback - Callback used to listen for interrupt callback.
753861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
753961847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
754061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
754161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
754261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
754361847f8eSopenharmony_ci     * @crossplatform
754461847f8eSopenharmony_ci     * @since 12
754561847f8eSopenharmony_ci     */
754661847f8eSopenharmony_ci    on(type: 'audioInterrupt', callback: Callback<InterruptEvent>): void;
754761847f8eSopenharmony_ci
754861847f8eSopenharmony_ci    /**
754961847f8eSopenharmony_ci     * Subscribes to mark reached events. When the number of frames rendered reaches the value of the frame parameter,
755061847f8eSopenharmony_ci     * the callback is invoked.
755161847f8eSopenharmony_ci     * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported.
755261847f8eSopenharmony_ci     * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0.
755361847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback invoked when the event is triggered.
755461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
755561847f8eSopenharmony_ci     * @since 8
755661847f8eSopenharmony_ci     */
755761847f8eSopenharmony_ci    /**
755861847f8eSopenharmony_ci     * Subscribes to mark reached events. When the number of frames rendered reaches the value of the frame parameter,
755961847f8eSopenharmony_ci     * the callback is invoked.
756061847f8eSopenharmony_ci     * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported.
756161847f8eSopenharmony_ci     * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0.
756261847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback invoked when the event is triggered.
756361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
756461847f8eSopenharmony_ci     * @crossplatform
756561847f8eSopenharmony_ci     * @since 12
756661847f8eSopenharmony_ci     */
756761847f8eSopenharmony_ci    on(type: 'markReach', frame: number, callback: Callback<number>): void;
756861847f8eSopenharmony_ci    /**
756961847f8eSopenharmony_ci     * Unsubscribes from mark reached events.
757061847f8eSopenharmony_ci     * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported.
757161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
757261847f8eSopenharmony_ci     * @since 8
757361847f8eSopenharmony_ci     */
757461847f8eSopenharmony_ci    /**
757561847f8eSopenharmony_ci     * Unsubscribes from mark reached events.
757661847f8eSopenharmony_ci     * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported.
757761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
757861847f8eSopenharmony_ci     * @crossplatform
757961847f8eSopenharmony_ci     * @since 12
758061847f8eSopenharmony_ci     */
758161847f8eSopenharmony_ci    off(type: 'markReach'): void;
758261847f8eSopenharmony_ci
758361847f8eSopenharmony_ci    /**
758461847f8eSopenharmony_ci     * Subscribes to period reached events. When the period of frame rendering reaches the value of frame parameter,
758561847f8eSopenharmony_ci     * the callback is invoked.
758661847f8eSopenharmony_ci     * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported.
758761847f8eSopenharmony_ci     * @param { number } frame - Period during which frame rendering is listened. The value must be greater than 0.
758861847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback invoked when the event is triggered.
758961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
759061847f8eSopenharmony_ci     * @since 8
759161847f8eSopenharmony_ci     */
759261847f8eSopenharmony_ci    /**
759361847f8eSopenharmony_ci     * Subscribes to period reached events. When the period of frame rendering reaches the value of frame parameter,
759461847f8eSopenharmony_ci     * the callback is invoked.
759561847f8eSopenharmony_ci     * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported.
759661847f8eSopenharmony_ci     * @param { number } frame - Period during which frame rendering is listened. The value must be greater than 0.
759761847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback invoked when the event is triggered.
759861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
759961847f8eSopenharmony_ci     * @crossplatform
760061847f8eSopenharmony_ci     * @since 12
760161847f8eSopenharmony_ci     */
760261847f8eSopenharmony_ci    on(type: 'periodReach', frame: number, callback: Callback<number>): void;
760361847f8eSopenharmony_ci    /**
760461847f8eSopenharmony_ci     * Unsubscribes from period reached events.
760561847f8eSopenharmony_ci     * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported.
760661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
760761847f8eSopenharmony_ci     * @since 8
760861847f8eSopenharmony_ci     */
760961847f8eSopenharmony_ci    /**
761061847f8eSopenharmony_ci     * Unsubscribes from period reached events.
761161847f8eSopenharmony_ci     * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported.
761261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
761361847f8eSopenharmony_ci     * @crossplatform
761461847f8eSopenharmony_ci     * @since 12
761561847f8eSopenharmony_ci     */
761661847f8eSopenharmony_ci    off(type: 'periodReach'): void;
761761847f8eSopenharmony_ci
761861847f8eSopenharmony_ci    /**
761961847f8eSopenharmony_ci     * Subscribes audio state change event callback.
762061847f8eSopenharmony_ci     * @param { 'stateChange' } type - Type of the event to listen for. Only the stateChange event is supported.
762161847f8eSopenharmony_ci     * @param { Callback<AudioState> } callback - Callback invoked when state change.
762261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
762361847f8eSopenharmony_ci     * @since 8
762461847f8eSopenharmony_ci     */
762561847f8eSopenharmony_ci    /**
762661847f8eSopenharmony_ci     * Subscribes audio state change event callback.
762761847f8eSopenharmony_ci     * @param { 'stateChange' } type - Type of the event to listen for. Only the stateChange event is supported.
762861847f8eSopenharmony_ci     * @param { Callback<AudioState> } callback - Callback invoked when state change.
762961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
763061847f8eSopenharmony_ci     * @crossplatform
763161847f8eSopenharmony_ci     * @since 12
763261847f8eSopenharmony_ci     */
763361847f8eSopenharmony_ci    on(type: 'stateChange', callback: Callback<AudioState>): void;
763461847f8eSopenharmony_ci
763561847f8eSopenharmony_ci    /**
763661847f8eSopenharmony_ci     * Subscribes output device change event callback.
763761847f8eSopenharmony_ci     * The event is triggered when output device change for this stream.
763861847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Type of the event to listen for.
763961847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to listen device change event.
764061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
764161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
764261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
764361847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
764461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
764561847f8eSopenharmony_ci     * @since 10
764661847f8eSopenharmony_ci     */
764761847f8eSopenharmony_ci    /**
764861847f8eSopenharmony_ci     * Subscribes output device change event callback.
764961847f8eSopenharmony_ci     * The event is triggered when output device change for this stream.
765061847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Type of the event to listen for.
765161847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to listen device change event.
765261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
765361847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
765461847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
765561847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
765661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
765761847f8eSopenharmony_ci     * @crossplatform
765861847f8eSopenharmony_ci     * @since 12
765961847f8eSopenharmony_ci     */
766061847f8eSopenharmony_ci    on(type: 'outputDeviceChange', callback: Callback<AudioDeviceDescriptors>): void;
766161847f8eSopenharmony_ci
766261847f8eSopenharmony_ci    /**
766361847f8eSopenharmony_ci     * Subscribes output device change event callback.
766461847f8eSopenharmony_ci     * The event is triggered when output device change for this stream.
766561847f8eSopenharmony_ci     * @param { 'outputDeviceChangeWithInfo' } type - Type of the event to listen for.
766661847f8eSopenharmony_ci     * @param { Callback<AudioStreamDeviceChangeInfo> } callback - Callback used to listen device change event.
766761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
766861847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
766961847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
767061847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
767161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
767261847f8eSopenharmony_ci     * @since 11
767361847f8eSopenharmony_ci     */
767461847f8eSopenharmony_ci    /**
767561847f8eSopenharmony_ci     * Subscribes output device change event callback.
767661847f8eSopenharmony_ci     * The event is triggered when output device change for this stream.
767761847f8eSopenharmony_ci     * @param { 'outputDeviceChangeWithInfo' } type - Type of the event to listen for.
767861847f8eSopenharmony_ci     * @param { Callback<AudioStreamDeviceChangeInfo> } callback - Callback used to listen device change event.
767961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
768061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
768161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
768261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
768361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
768461847f8eSopenharmony_ci     * @crossplatform
768561847f8eSopenharmony_ci     * @since 12
768661847f8eSopenharmony_ci     */
768761847f8eSopenharmony_ci    on(type: 'outputDeviceChangeWithInfo', callback: Callback<AudioStreamDeviceChangeInfo>): void;
768861847f8eSopenharmony_ci
768961847f8eSopenharmony_ci    /**
769061847f8eSopenharmony_ci     * Unsubscribes output device change event callback.
769161847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Type of the event to listen for.
769261847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used in subscribe.
769361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
769461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
769561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
769661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
769761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
769861847f8eSopenharmony_ci     * @since 10
769961847f8eSopenharmony_ci     */
770061847f8eSopenharmony_ci    /**
770161847f8eSopenharmony_ci     * Unsubscribes output device change event callback.
770261847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Type of the event to listen for.
770361847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used in subscribe.
770461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
770561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
770661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
770761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
770861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
770961847f8eSopenharmony_ci     * @crossplatform
771061847f8eSopenharmony_ci     * @since 12
771161847f8eSopenharmony_ci     */
771261847f8eSopenharmony_ci    off(type: 'outputDeviceChange', callback?: Callback<AudioDeviceDescriptors>): void;
771361847f8eSopenharmony_ci
771461847f8eSopenharmony_ci    /**
771561847f8eSopenharmony_ci     * Unsubscribes output device change event callback.
771661847f8eSopenharmony_ci     * @param { 'outputDeviceChangeWithInfo' } type - Type of the event to listen for.
771761847f8eSopenharmony_ci     * @param { Callback<AudioStreamDeviceChangeInfo> } callback - Callback used in subscribe.
771861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
771961847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
772061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
772161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
772261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
772361847f8eSopenharmony_ci     * @since 11
772461847f8eSopenharmony_ci     */
772561847f8eSopenharmony_ci    /**
772661847f8eSopenharmony_ci     * Unsubscribes output device change event callback.
772761847f8eSopenharmony_ci     * @param { 'outputDeviceChangeWithInfo' } type - Type of the event to listen for.
772861847f8eSopenharmony_ci     * @param { Callback<AudioStreamDeviceChangeInfo> } callback - Callback used in subscribe.
772961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
773061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
773161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
773261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
773361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
773461847f8eSopenharmony_ci     * @crossplatform
773561847f8eSopenharmony_ci     * @since 12
773661847f8eSopenharmony_ci     */
773761847f8eSopenharmony_ci    off(type: 'outputDeviceChangeWithInfo', callback?: Callback<AudioStreamDeviceChangeInfo>): void;
773861847f8eSopenharmony_ci
773961847f8eSopenharmony_ci    /**
774061847f8eSopenharmony_ci     * Subscribes audio data callback.
774161847f8eSopenharmony_ci     * The event is triggered when audio buffer is available for writing more data.
774261847f8eSopenharmony_ci     * @param { 'writeData' } type - Type of the event to listen for.
774361847f8eSopenharmony_ci     * @param { Callback<ArrayBuffer> } callback - Callback with buffer to write.
774461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
774561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
774661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
774761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
774861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
774961847f8eSopenharmony_ci     * @since 11
775061847f8eSopenharmony_ci     */
775161847f8eSopenharmony_ci    /**
775261847f8eSopenharmony_ci     * Subscribes audio data callback.
775361847f8eSopenharmony_ci     * The event is triggered when audio buffer is available for writing more data.
775461847f8eSopenharmony_ci     * @param { 'writeData' } type - Type of the event to listen for.
775561847f8eSopenharmony_ci     * @param { AudioRendererWriteDataCallback } callback - Audio renderer write data callback.
775661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
775761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
775861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
775961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
776061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
776161847f8eSopenharmony_ci     * @crossplatform
776261847f8eSopenharmony_ci     * @since 12
776361847f8eSopenharmony_ci     */
776461847f8eSopenharmony_ci    on(type: 'writeData', callback: AudioRendererWriteDataCallback): void;
776561847f8eSopenharmony_ci
776661847f8eSopenharmony_ci    /**
776761847f8eSopenharmony_ci     * Unsubscribes audio data callback.
776861847f8eSopenharmony_ci     * @param { 'writeData' } type - Type of the event to listen for.
776961847f8eSopenharmony_ci     * @param { Callback<ArrayBuffer> } callback - Callback used in subscribe.
777061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
777161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
777261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
777361847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
777461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
777561847f8eSopenharmony_ci     * @since 11
777661847f8eSopenharmony_ci     */
777761847f8eSopenharmony_ci    /**
777861847f8eSopenharmony_ci     * Unsubscribes audio data callback.
777961847f8eSopenharmony_ci     * @param { 'writeData' } type - Type of the event to listen for.
778061847f8eSopenharmony_ci     * @param { AudioRendererWriteDataCallback } callback - Audio renderer write data callback.
778161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
778261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
778361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
778461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
778561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
778661847f8eSopenharmony_ci     * @crossplatform
778761847f8eSopenharmony_ci     * @since 12
778861847f8eSopenharmony_ci     */
778961847f8eSopenharmony_ci    off(type: 'writeData', callback?: AudioRendererWriteDataCallback): void;
779061847f8eSopenharmony_ci  }
779161847f8eSopenharmony_ci
779261847f8eSopenharmony_ci  /**
779361847f8eSopenharmony_ci   * Enumerates source types.
779461847f8eSopenharmony_ci   * @enum { number }
779561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
779661847f8eSopenharmony_ci   * @since 8
779761847f8eSopenharmony_ci   */
779861847f8eSopenharmony_ci  /**
779961847f8eSopenharmony_ci   * Enumerates source types.
780061847f8eSopenharmony_ci   * @enum { number }
780161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
780261847f8eSopenharmony_ci   * @crossplatform
780361847f8eSopenharmony_ci   * @since 12
780461847f8eSopenharmony_ci   */
780561847f8eSopenharmony_ci  enum SourceType {
780661847f8eSopenharmony_ci    /**
780761847f8eSopenharmony_ci     * Invalid source type.
780861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
780961847f8eSopenharmony_ci     * @since 8
781061847f8eSopenharmony_ci     */
781161847f8eSopenharmony_ci    SOURCE_TYPE_INVALID = -1,
781261847f8eSopenharmony_ci    /**
781361847f8eSopenharmony_ci     * Mic source type.
781461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
781561847f8eSopenharmony_ci     * @since 8
781661847f8eSopenharmony_ci     */
781761847f8eSopenharmony_ci    /**
781861847f8eSopenharmony_ci     * Mic source type.
781961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
782061847f8eSopenharmony_ci     * @crossplatform
782161847f8eSopenharmony_ci     * @since 12
782261847f8eSopenharmony_ci     */
782361847f8eSopenharmony_ci    SOURCE_TYPE_MIC = 0,
782461847f8eSopenharmony_ci    /**
782561847f8eSopenharmony_ci     * Voice recognition source type.
782661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
782761847f8eSopenharmony_ci     * @since 9
782861847f8eSopenharmony_ci     */
782961847f8eSopenharmony_ci    /**
783061847f8eSopenharmony_ci     * Voice recognition source type.
783161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
783261847f8eSopenharmony_ci     * @crossplatform
783361847f8eSopenharmony_ci     * @since 12
783461847f8eSopenharmony_ci     */
783561847f8eSopenharmony_ci    SOURCE_TYPE_VOICE_RECOGNITION = 1,
783661847f8eSopenharmony_ci    /**
783761847f8eSopenharmony_ci     * Playback capture source type.
783861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
783961847f8eSopenharmony_ci     * @since 10
784061847f8eSopenharmony_ci     * @deprecated since 12
784161847f8eSopenharmony_ci     * @useinstead OH_AVScreenCapture in native interface.
784261847f8eSopenharmony_ci     */
784361847f8eSopenharmony_ci    SOURCE_TYPE_PLAYBACK_CAPTURE = 2,
784461847f8eSopenharmony_ci    /**
784561847f8eSopenharmony_ci     * Wakeup source type.
784661847f8eSopenharmony_ci     * Permission ohos.permission.MANAGE_INTELLIGENT_VOICE is needed when calling createAudioCapturer with this type.
784761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
784861847f8eSopenharmony_ci     * @systemapi
784961847f8eSopenharmony_ci     * @since 10
785061847f8eSopenharmony_ci     */
785161847f8eSopenharmony_ci    SOURCE_TYPE_WAKEUP = 3,
785261847f8eSopenharmony_ci
785361847f8eSopenharmony_ci    /**
785461847f8eSopenharmony_ci     * Voice call source type.
785561847f8eSopenharmony_ci     * Permission ohos.permission.RECORD_VOICE_CALL is needed when calling createAudioCapturer with this type.
785661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
785761847f8eSopenharmony_ci     * @systemapi
785861847f8eSopenharmony_ci     * @since 11
785961847f8eSopenharmony_ci     */
786061847f8eSopenharmony_ci    SOURCE_TYPE_VOICE_CALL = 4,
786161847f8eSopenharmony_ci
786261847f8eSopenharmony_ci    /**
786361847f8eSopenharmony_ci     * Voice communication source type.
786461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
786561847f8eSopenharmony_ci     * @since 8
786661847f8eSopenharmony_ci     */
786761847f8eSopenharmony_ci    /**
786861847f8eSopenharmony_ci     * Voice communication source type.
786961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
787061847f8eSopenharmony_ci     * @crossplatform
787161847f8eSopenharmony_ci     * @since 12
787261847f8eSopenharmony_ci     */
787361847f8eSopenharmony_ci    SOURCE_TYPE_VOICE_COMMUNICATION = 7,
787461847f8eSopenharmony_ci
787561847f8eSopenharmony_ci    /**
787661847f8eSopenharmony_ci     * Voice message source type.
787761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
787861847f8eSopenharmony_ci     * @since 12
787961847f8eSopenharmony_ci     */
788061847f8eSopenharmony_ci    SOURCE_TYPE_VOICE_MESSAGE = 10,
788161847f8eSopenharmony_ci
788261847f8eSopenharmony_ci    /**
788361847f8eSopenharmony_ci     * Camcorder source type.
788461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
788561847f8eSopenharmony_ci     * @since 13
788661847f8eSopenharmony_ci     */
788761847f8eSopenharmony_ci    SOURCE_TYPE_CAMCORDER = 13,
788861847f8eSopenharmony_ci  }
788961847f8eSopenharmony_ci
789061847f8eSopenharmony_ci  /**
789161847f8eSopenharmony_ci   * Describes audio capturer information.
789261847f8eSopenharmony_ci   * @typedef AudioCapturerInfo
789361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
789461847f8eSopenharmony_ci   * @since 8
789561847f8eSopenharmony_ci   */
789661847f8eSopenharmony_ci  /**
789761847f8eSopenharmony_ci   * Describes audio capturer information.
789861847f8eSopenharmony_ci   * @typedef AudioCapturerInfo
789961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
790061847f8eSopenharmony_ci   * @crossplatform
790161847f8eSopenharmony_ci   * @since 12
790261847f8eSopenharmony_ci   */
790361847f8eSopenharmony_ci  interface AudioCapturerInfo {
790461847f8eSopenharmony_ci    /**
790561847f8eSopenharmony_ci     * Audio source type.
790661847f8eSopenharmony_ci     * @type { SourceType }
790761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
790861847f8eSopenharmony_ci     * @since 8
790961847f8eSopenharmony_ci     */
791061847f8eSopenharmony_ci    /**
791161847f8eSopenharmony_ci     * Audio source type.
791261847f8eSopenharmony_ci     * @type { SourceType }
791361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
791461847f8eSopenharmony_ci     * @crossplatform
791561847f8eSopenharmony_ci     * @since 12
791661847f8eSopenharmony_ci     */
791761847f8eSopenharmony_ci    source: SourceType;
791861847f8eSopenharmony_ci    /**
791961847f8eSopenharmony_ci     * Audio capturer flags.
792061847f8eSopenharmony_ci     * @type { number }
792161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
792261847f8eSopenharmony_ci     * @since 8
792361847f8eSopenharmony_ci     */
792461847f8eSopenharmony_ci    /**
792561847f8eSopenharmony_ci     * Audio capturer flags.
792661847f8eSopenharmony_ci     * @type { number }
792761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
792861847f8eSopenharmony_ci     * @crossplatform
792961847f8eSopenharmony_ci     * @since 12
793061847f8eSopenharmony_ci     */
793161847f8eSopenharmony_ci    capturerFlags: number;
793261847f8eSopenharmony_ci  }
793361847f8eSopenharmony_ci
793461847f8eSopenharmony_ci  /**
793561847f8eSopenharmony_ci   * Describes audio capturer configuration options.
793661847f8eSopenharmony_ci   * @typedef AudioCapturerOptions
793761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
793861847f8eSopenharmony_ci   * @since 8
793961847f8eSopenharmony_ci   */
794061847f8eSopenharmony_ci  /**
794161847f8eSopenharmony_ci   * Describes audio capturer configuration options.
794261847f8eSopenharmony_ci   * @typedef AudioCapturerOptions
794361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
794461847f8eSopenharmony_ci   * @crossplatform
794561847f8eSopenharmony_ci   * @since 12
794661847f8eSopenharmony_ci   */
794761847f8eSopenharmony_ci  interface AudioCapturerOptions {
794861847f8eSopenharmony_ci    /**
794961847f8eSopenharmony_ci     * Stream information.
795061847f8eSopenharmony_ci     * @type { AudioStreamInfo }
795161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
795261847f8eSopenharmony_ci     * @since 8
795361847f8eSopenharmony_ci     */
795461847f8eSopenharmony_ci    /**
795561847f8eSopenharmony_ci     * Stream information.
795661847f8eSopenharmony_ci     * @type { AudioStreamInfo }
795761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
795861847f8eSopenharmony_ci     * @crossplatform
795961847f8eSopenharmony_ci     * @since 12
796061847f8eSopenharmony_ci     */
796161847f8eSopenharmony_ci    streamInfo: AudioStreamInfo;
796261847f8eSopenharmony_ci    /**
796361847f8eSopenharmony_ci     * Capturer information.
796461847f8eSopenharmony_ci     * @type { AudioCapturerInfo }
796561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
796661847f8eSopenharmony_ci     * @since 8
796761847f8eSopenharmony_ci     */
796861847f8eSopenharmony_ci    /**
796961847f8eSopenharmony_ci     * Capturer information.
797061847f8eSopenharmony_ci     * @type { AudioCapturerInfo }
797161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
797261847f8eSopenharmony_ci     * @crossplatform
797361847f8eSopenharmony_ci     * @since 12
797461847f8eSopenharmony_ci     */
797561847f8eSopenharmony_ci    capturerInfo: AudioCapturerInfo;
797661847f8eSopenharmony_ci    /**
797761847f8eSopenharmony_ci     * Playback capture config.
797861847f8eSopenharmony_ci     * @type { ?AudioPlaybackCaptureConfig }
797961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
798061847f8eSopenharmony_ci     * @since 10
798161847f8eSopenharmony_ci     * @deprecated since 12
798261847f8eSopenharmony_ci     * @useinstead OH_AVScreenCapture in native interface.
798361847f8eSopenharmony_ci     */
798461847f8eSopenharmony_ci    playbackCaptureConfig?: AudioPlaybackCaptureConfig;
798561847f8eSopenharmony_ci  }
798661847f8eSopenharmony_ci
798761847f8eSopenharmony_ci  /**
798861847f8eSopenharmony_ci   * Describe playback capture filtering options
798961847f8eSopenharmony_ci   * @typedef CaptureFilterOptions
799061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
799161847f8eSopenharmony_ci   * @since 10
799261847f8eSopenharmony_ci   * @deprecated since 12
799361847f8eSopenharmony_ci   * @useinstead OH_AVScreenCapture in native interface.
799461847f8eSopenharmony_ci   */
799561847f8eSopenharmony_ci  interface CaptureFilterOptions {
799661847f8eSopenharmony_ci    /**
799761847f8eSopenharmony_ci     * Filter by stream usages. If you want to capture voice streams, additional permission is needed.
799861847f8eSopenharmony_ci     * @type { Array<StreamUsage> }
799961847f8eSopenharmony_ci     * @permission ohos.permission.CAPTURE_VOICE_DOWNLINK_AUDIO
800061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
800161847f8eSopenharmony_ci     * @since 10
800261847f8eSopenharmony_ci     */
800361847f8eSopenharmony_ci    /**
800461847f8eSopenharmony_ci     * Filter by stream usages. But not allow to capture voice streams.
800561847f8eSopenharmony_ci     * @type { Array<StreamUsage> }
800661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
800761847f8eSopenharmony_ci     * @since 11
800861847f8eSopenharmony_ci     * @deprecated since 12
800961847f8eSopenharmony_ci     * @useinstead OH_AVScreenCapture in native interface.
801061847f8eSopenharmony_ci     */
801161847f8eSopenharmony_ci    usages: Array<StreamUsage>;
801261847f8eSopenharmony_ci  }
801361847f8eSopenharmony_ci
801461847f8eSopenharmony_ci  /**
801561847f8eSopenharmony_ci   * Describe playback capture config object.
801661847f8eSopenharmony_ci   * @typedef AudioPlaybackCaptureConfig
801761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
801861847f8eSopenharmony_ci   * @since 10
801961847f8eSopenharmony_ci   * @deprecated since 12
802061847f8eSopenharmony_ci   * @useinstead OH_AVScreenCapture in native interface.
802161847f8eSopenharmony_ci   */
802261847f8eSopenharmony_ci  interface AudioPlaybackCaptureConfig {
802361847f8eSopenharmony_ci    /**
802461847f8eSopenharmony_ci     * Add filter options to decide which streams to be captured.
802561847f8eSopenharmony_ci     * @type { CaptureFilterOptions }
802661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture
802761847f8eSopenharmony_ci     * @since 10
802861847f8eSopenharmony_ci     * @deprecated since 12
802961847f8eSopenharmony_ci     * @useinstead OH_AVScreenCapture in native interface.
803061847f8eSopenharmony_ci     */
803161847f8eSopenharmony_ci    filterOptions: CaptureFilterOptions;
803261847f8eSopenharmony_ci  }
803361847f8eSopenharmony_ci
803461847f8eSopenharmony_ci  /**
803561847f8eSopenharmony_ci   * Provides APIs for audio recording.
803661847f8eSopenharmony_ci   * @typedef AudioCapturer
803761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
803861847f8eSopenharmony_ci   * @since 8
803961847f8eSopenharmony_ci   */
804061847f8eSopenharmony_ci  /**
804161847f8eSopenharmony_ci   * Provides APIs for audio recording.
804261847f8eSopenharmony_ci   * @typedef AudioCapturer
804361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
804461847f8eSopenharmony_ci   * @crossplatform
804561847f8eSopenharmony_ci   * @since 12
804661847f8eSopenharmony_ci   */
804761847f8eSopenharmony_ci  interface AudioCapturer {
804861847f8eSopenharmony_ci    /**
804961847f8eSopenharmony_ci     * Defines the current capture state.
805061847f8eSopenharmony_ci     * @type { AudioState }
805161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
805261847f8eSopenharmony_ci     * @since 8
805361847f8eSopenharmony_ci     */
805461847f8eSopenharmony_ci    /**
805561847f8eSopenharmony_ci     * Defines the current capture state.
805661847f8eSopenharmony_ci     * @type { AudioState }
805761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
805861847f8eSopenharmony_ci     * @crossplatform
805961847f8eSopenharmony_ci     * @since 12
806061847f8eSopenharmony_ci     */
806161847f8eSopenharmony_ci    readonly state: AudioState;
806261847f8eSopenharmony_ci
806361847f8eSopenharmony_ci    /**
806461847f8eSopenharmony_ci     * Obtains the capturer information provided while creating a capturer instance. This method uses an asynchronous
806561847f8eSopenharmony_ci     * callback to return the result.
806661847f8eSopenharmony_ci     * @param { AsyncCallback<AudioCapturerInfo> } callback - Callback used to return the capturer information.
806761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
806861847f8eSopenharmony_ci     * @since 8
806961847f8eSopenharmony_ci     */
807061847f8eSopenharmony_ci    /**
807161847f8eSopenharmony_ci     * Obtains the capturer information provided while creating a capturer instance. This method uses an asynchronous
807261847f8eSopenharmony_ci     * callback to return the result.
807361847f8eSopenharmony_ci     * @param { AsyncCallback<AudioCapturerInfo> } callback - Callback used to return the capturer information.
807461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
807561847f8eSopenharmony_ci     * @crossplatform
807661847f8eSopenharmony_ci     * @since 12
807761847f8eSopenharmony_ci     */
807861847f8eSopenharmony_ci    getCapturerInfo(callback: AsyncCallback<AudioCapturerInfo>): void;
807961847f8eSopenharmony_ci    /**
808061847f8eSopenharmony_ci     * Obtains the capturer information provided while creating a capturer instance. This method uses a promise to
808161847f8eSopenharmony_ci     * return the result.
808261847f8eSopenharmony_ci     * @returns { Promise<AudioCapturerInfo> } Promise used to return the capturer information.
808361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
808461847f8eSopenharmony_ci     * @since 8
808561847f8eSopenharmony_ci     */
808661847f8eSopenharmony_ci    /**
808761847f8eSopenharmony_ci     * Obtains the capturer information provided while creating a capturer instance. This method uses a promise to
808861847f8eSopenharmony_ci     * return the result.
808961847f8eSopenharmony_ci     * @returns { Promise<AudioCapturerInfo> } Promise used to return the capturer information.
809061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
809161847f8eSopenharmony_ci     * @crossplatform
809261847f8eSopenharmony_ci     * @since 12
809361847f8eSopenharmony_ci     */
809461847f8eSopenharmony_ci    getCapturerInfo(): Promise<AudioCapturerInfo>;
809561847f8eSopenharmony_ci    /**
809661847f8eSopenharmony_ci     * Obtains the capturer information provided while creating a capturer instance.
809761847f8eSopenharmony_ci     * @returns { AudioCapturerInfo } The capturer information.
809861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
809961847f8eSopenharmony_ci     * @since 10
810061847f8eSopenharmony_ci     */
810161847f8eSopenharmony_ci    /**
810261847f8eSopenharmony_ci     * Obtains the capturer information provided while creating a capturer instance.
810361847f8eSopenharmony_ci     * @returns { AudioCapturerInfo } The capturer information.
810461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
810561847f8eSopenharmony_ci     * @crossplatform
810661847f8eSopenharmony_ci     * @since 12
810761847f8eSopenharmony_ci     */
810861847f8eSopenharmony_ci    getCapturerInfoSync(): AudioCapturerInfo;
810961847f8eSopenharmony_ci
811061847f8eSopenharmony_ci    /**
811161847f8eSopenharmony_ci     * Obtains the capturer stream information. This method uses an asynchronous callback to return the result.
811261847f8eSopenharmony_ci     * @param { AsyncCallback<AudioStreamInfo> } callback - Callback used to return the stream information.
811361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
811461847f8eSopenharmony_ci     * @since 8
811561847f8eSopenharmony_ci     */
811661847f8eSopenharmony_ci    /**
811761847f8eSopenharmony_ci     * Obtains the capturer stream information. This method uses an asynchronous callback to return the result.
811861847f8eSopenharmony_ci     * @param { AsyncCallback<AudioStreamInfo> } callback - Callback used to return the stream information.
811961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
812061847f8eSopenharmony_ci     * @crossplatform
812161847f8eSopenharmony_ci     * @since 12
812261847f8eSopenharmony_ci     */
812361847f8eSopenharmony_ci    getStreamInfo(callback: AsyncCallback<AudioStreamInfo>): void;
812461847f8eSopenharmony_ci    /**
812561847f8eSopenharmony_ci     * Obtains the capturer stream information. This method uses a promise to return the result.
812661847f8eSopenharmony_ci     * @returns { Promise<AudioStreamInfo> } Promise used to return the stream information.
812761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
812861847f8eSopenharmony_ci     * @since 8
812961847f8eSopenharmony_ci     */
813061847f8eSopenharmony_ci    /**
813161847f8eSopenharmony_ci     * Obtains the capturer stream information. This method uses a promise to return the result.
813261847f8eSopenharmony_ci     * @returns { Promise<AudioStreamInfo> } Promise used to return the stream information.
813361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
813461847f8eSopenharmony_ci     * @crossplatform
813561847f8eSopenharmony_ci     * @since 12
813661847f8eSopenharmony_ci     */
813761847f8eSopenharmony_ci    getStreamInfo(): Promise<AudioStreamInfo>;
813861847f8eSopenharmony_ci    /**
813961847f8eSopenharmony_ci     * Obtains the capturer stream information.
814061847f8eSopenharmony_ci     * @returns { AudioStreamInfo } The stream information.
814161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
814261847f8eSopenharmony_ci     * @since 10
814361847f8eSopenharmony_ci     */
814461847f8eSopenharmony_ci    /**
814561847f8eSopenharmony_ci     * Obtains the capturer stream information.
814661847f8eSopenharmony_ci     * @returns { AudioStreamInfo } The stream information.
814761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
814861847f8eSopenharmony_ci     * @crossplatform
814961847f8eSopenharmony_ci     * @since 12
815061847f8eSopenharmony_ci     */
815161847f8eSopenharmony_ci    getStreamInfoSync(): AudioStreamInfo;
815261847f8eSopenharmony_ci
815361847f8eSopenharmony_ci    /**
815461847f8eSopenharmony_ci     * Obtains the capturer stream id. This method uses an asynchronous callback to return the result.
815561847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the stream id.
815661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
815761847f8eSopenharmony_ci     * @since 9
815861847f8eSopenharmony_ci     */
815961847f8eSopenharmony_ci    /**
816061847f8eSopenharmony_ci     * Obtains the capturer stream id. This method uses an asynchronous callback to return the result.
816161847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the stream id.
816261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
816361847f8eSopenharmony_ci     * @crossplatform
816461847f8eSopenharmony_ci     * @since 12
816561847f8eSopenharmony_ci     */
816661847f8eSopenharmony_ci    getAudioStreamId(callback: AsyncCallback<number>): void;
816761847f8eSopenharmony_ci    /**
816861847f8eSopenharmony_ci     * Obtains the capturer stream id. This method uses a promise to return the result.
816961847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the stream id.
817061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
817161847f8eSopenharmony_ci     * @since 9
817261847f8eSopenharmony_ci     */
817361847f8eSopenharmony_ci    /**
817461847f8eSopenharmony_ci     * Obtains the capturer stream id. This method uses a promise to return the result.
817561847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the stream id.
817661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
817761847f8eSopenharmony_ci     * @crossplatform
817861847f8eSopenharmony_ci     * @since 12
817961847f8eSopenharmony_ci     */
818061847f8eSopenharmony_ci    getAudioStreamId(): Promise<number>;
818161847f8eSopenharmony_ci    /**
818261847f8eSopenharmony_ci     * Obtains the capturer stream id.
818361847f8eSopenharmony_ci     * @returns { number } The stream id.
818461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
818561847f8eSopenharmony_ci     * @since 10
818661847f8eSopenharmony_ci     */
818761847f8eSopenharmony_ci    /**
818861847f8eSopenharmony_ci     * Obtains the capturer stream id.
818961847f8eSopenharmony_ci     * @returns { number } The stream id.
819061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
819161847f8eSopenharmony_ci     * @crossplatform
819261847f8eSopenharmony_ci     * @since 12
819361847f8eSopenharmony_ci     */
819461847f8eSopenharmony_ci    getAudioStreamIdSync(): number;
819561847f8eSopenharmony_ci
819661847f8eSopenharmony_ci    /**
819761847f8eSopenharmony_ci     * Starts capturing.
819861847f8eSopenharmony_ci     * Success: This method uses an asynchronous callback to return the result.
819961847f8eSopenharmony_ci     * Failure: This method uses an asynchronous callback to return the error instance. Possible causes:
820061847f8eSopenharmony_ci     *          6800301: Unsupported state, Audio focus request failed, System error.
820161847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
820261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
820361847f8eSopenharmony_ci     * @since 8
820461847f8eSopenharmony_ci     */
820561847f8eSopenharmony_ci    /**
820661847f8eSopenharmony_ci     * Starts capturing. This method uses an asynchronous callback to return the result.
820761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
820861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
820961847f8eSopenharmony_ci     * @crossplatform
821061847f8eSopenharmony_ci     * @since 12
821161847f8eSopenharmony_ci     */
821261847f8eSopenharmony_ci    start(callback: AsyncCallback<void>): void;
821361847f8eSopenharmony_ci    /**
821461847f8eSopenharmony_ci     * Starts capturing.
821561847f8eSopenharmony_ci     * Success: This method uses a promise to return the result.
821661847f8eSopenharmony_ci     * Failure: This method uses a promise to return the error instance. Possible causes:
821761847f8eSopenharmony_ci     *          6800301: Unsupported state, Audio focus request failed, System error.
821861847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
821961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
822061847f8eSopenharmony_ci     * @since 8
822161847f8eSopenharmony_ci     */
822261847f8eSopenharmony_ci    /**
822361847f8eSopenharmony_ci     * Starts capturing. This method uses a promise to return the result.
822461847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
822561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
822661847f8eSopenharmony_ci     * @crossplatform
822761847f8eSopenharmony_ci     * @since 12
822861847f8eSopenharmony_ci     */
822961847f8eSopenharmony_ci    start(): Promise<void>;
823061847f8eSopenharmony_ci
823161847f8eSopenharmony_ci    /**
823261847f8eSopenharmony_ci     * Reads the buffer from the audio capturer. This method uses an asynchronous callback to return the result.
823361847f8eSopenharmony_ci     * @param { number } size - Number of bytes to read.
823461847f8eSopenharmony_ci     * @param { boolean } isBlockingRead - Whether the read operation should be blocked.
823561847f8eSopenharmony_ci     * @param { AsyncCallback<ArrayBuffer> } callback - Callback used to return the buffer.
823661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
823761847f8eSopenharmony_ci     * @since 8
823861847f8eSopenharmony_ci     * @deprecated since 11
823961847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioCapturer#event:readData
824061847f8eSopenharmony_ci     */
824161847f8eSopenharmony_ci    read(size: number, isBlockingRead: boolean, callback: AsyncCallback<ArrayBuffer>): void;
824261847f8eSopenharmony_ci    /**
824361847f8eSopenharmony_ci     * Reads the buffer from the audio capturer. This method uses a promise to return the result.
824461847f8eSopenharmony_ci     * @param { number } size - Number of bytes to read.
824561847f8eSopenharmony_ci     * @param { boolean } isBlockingRead - Whether the read operation should be blocked.
824661847f8eSopenharmony_ci     * @returns { Promise<ArrayBuffer> } Returns the buffer data read if the operation is successful.
824761847f8eSopenharmony_ci     *          Returns an error code otherwise.
824861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
824961847f8eSopenharmony_ci     * @since 8
825061847f8eSopenharmony_ci     * @deprecated since 11
825161847f8eSopenharmony_ci     * @useinstead ohos.multimedia.audio.AudioCapturer#event:readData
825261847f8eSopenharmony_ci     */
825361847f8eSopenharmony_ci    read(size: number, isBlockingRead: boolean): Promise<ArrayBuffer>;
825461847f8eSopenharmony_ci
825561847f8eSopenharmony_ci    /**
825661847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses an
825761847f8eSopenharmony_ci     * asynchronous callback to return the result.
825861847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the timestamp.
825961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
826061847f8eSopenharmony_ci     * @since 8
826161847f8eSopenharmony_ci     */
826261847f8eSopenharmony_ci    /**
826361847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses an
826461847f8eSopenharmony_ci     * asynchronous callback to return the result.
826561847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the timestamp.
826661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
826761847f8eSopenharmony_ci     * @crossplatform
826861847f8eSopenharmony_ci     * @since 12
826961847f8eSopenharmony_ci     */
827061847f8eSopenharmony_ci    getAudioTime(callback: AsyncCallback<number>): void;
827161847f8eSopenharmony_ci    /**
827261847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses a
827361847f8eSopenharmony_ci     * promise to return the result.
827461847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the timestamp.
827561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
827661847f8eSopenharmony_ci     * @since 8
827761847f8eSopenharmony_ci     */
827861847f8eSopenharmony_ci    /**
827961847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses a
828061847f8eSopenharmony_ci     * promise to return the result.
828161847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the timestamp.
828261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
828361847f8eSopenharmony_ci     * @crossplatform
828461847f8eSopenharmony_ci     * @since 12
828561847f8eSopenharmony_ci     */
828661847f8eSopenharmony_ci    getAudioTime(): Promise<number>;
828761847f8eSopenharmony_ci    /**
828861847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds.
828961847f8eSopenharmony_ci     * @returns { number } The audio timestamp.
829061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
829161847f8eSopenharmony_ci     * @since 10
829261847f8eSopenharmony_ci     */
829361847f8eSopenharmony_ci    /**
829461847f8eSopenharmony_ci     * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds.
829561847f8eSopenharmony_ci     * @returns { number } The audio timestamp.
829661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
829761847f8eSopenharmony_ci     * @crossplatform
829861847f8eSopenharmony_ci     * @since 12
829961847f8eSopenharmony_ci     */
830061847f8eSopenharmony_ci    getAudioTimeSync(): number;
830161847f8eSopenharmony_ci
830261847f8eSopenharmony_ci    /**
830361847f8eSopenharmony_ci     * Stops capturing. This method uses an asynchronous callback to return the result.
830461847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
830561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
830661847f8eSopenharmony_ci     * @since 8
830761847f8eSopenharmony_ci     */
830861847f8eSopenharmony_ci    /**
830961847f8eSopenharmony_ci     * Stops capturing. This method uses an asynchronous callback to return the result.
831061847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
831161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
831261847f8eSopenharmony_ci     * @crossplatform
831361847f8eSopenharmony_ci     * @since 12
831461847f8eSopenharmony_ci     */
831561847f8eSopenharmony_ci    stop(callback: AsyncCallback<void>): void;
831661847f8eSopenharmony_ci    /**
831761847f8eSopenharmony_ci     * Stops capturing. This method uses a promise to return the result.
831861847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
831961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
832061847f8eSopenharmony_ci     * @since 8
832161847f8eSopenharmony_ci     */
832261847f8eSopenharmony_ci    /**
832361847f8eSopenharmony_ci     * Stops capturing. This method uses a promise to return the result.
832461847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
832561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
832661847f8eSopenharmony_ci     * @crossplatform
832761847f8eSopenharmony_ci     * @since 12
832861847f8eSopenharmony_ci     */
832961847f8eSopenharmony_ci    stop(): Promise<void>;
833061847f8eSopenharmony_ci
833161847f8eSopenharmony_ci    /**
833261847f8eSopenharmony_ci     * Releases the capturer. This method uses an asynchronous callback to return the result.
833361847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
833461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
833561847f8eSopenharmony_ci     * @since 8
833661847f8eSopenharmony_ci     */
833761847f8eSopenharmony_ci    /**
833861847f8eSopenharmony_ci     * Releases the capturer. This method uses an asynchronous callback to return the result.
833961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
834061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
834161847f8eSopenharmony_ci     * @crossplatform
834261847f8eSopenharmony_ci     * @since 12
834361847f8eSopenharmony_ci     */
834461847f8eSopenharmony_ci    release(callback: AsyncCallback<void>): void;
834561847f8eSopenharmony_ci    /**
834661847f8eSopenharmony_ci     * Releases the capturer. This method uses a promise to return the result.
834761847f8eSopenharmony_ci     * @returns { Promise<void> } - Promise used to return the result.
834861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
834961847f8eSopenharmony_ci     * @since 8
835061847f8eSopenharmony_ci     */
835161847f8eSopenharmony_ci    /**
835261847f8eSopenharmony_ci     * Releases the capturer. This method uses a promise to return the result.
835361847f8eSopenharmony_ci     * @returns { Promise<void> } - Promise used to return the result.
835461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
835561847f8eSopenharmony_ci     * @crossplatform
835661847f8eSopenharmony_ci     * @since 12
835761847f8eSopenharmony_ci     */
835861847f8eSopenharmony_ci    release(): Promise<void>;
835961847f8eSopenharmony_ci
836061847f8eSopenharmony_ci    /**
836161847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses an asynchronous callback to
836261847f8eSopenharmony_ci     * return the result.
836361847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the buffer size.
836461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
836561847f8eSopenharmony_ci     * @since 8
836661847f8eSopenharmony_ci     */
836761847f8eSopenharmony_ci    /**
836861847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses an asynchronous callback to
836961847f8eSopenharmony_ci     * return the result.
837061847f8eSopenharmony_ci     * @param { AsyncCallback<number> } callback - Callback used to return the buffer size.
837161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
837261847f8eSopenharmony_ci     * @crossplatform
837361847f8eSopenharmony_ci     * @since 12
837461847f8eSopenharmony_ci     */
837561847f8eSopenharmony_ci    getBufferSize(callback: AsyncCallback<number>): void;
837661847f8eSopenharmony_ci    /**
837761847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses a promise to return the result.
837861847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the buffer size.
837961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
838061847f8eSopenharmony_ci     * @since 8
838161847f8eSopenharmony_ci     */
838261847f8eSopenharmony_ci    /**
838361847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses a promise to return the result.
838461847f8eSopenharmony_ci     * @returns { Promise<number> } Promise used to return the buffer size.
838561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
838661847f8eSopenharmony_ci     * @crossplatform
838761847f8eSopenharmony_ci     * @since 12
838861847f8eSopenharmony_ci     */
838961847f8eSopenharmony_ci    getBufferSize(): Promise<number>;
839061847f8eSopenharmony_ci    /**
839161847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for capturing.
839261847f8eSopenharmony_ci     * @returns { number } Promise used to return the buffer size.
839361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
839461847f8eSopenharmony_ci     * @since 10
839561847f8eSopenharmony_ci     */
839661847f8eSopenharmony_ci    /**
839761847f8eSopenharmony_ci     * Obtains a reasonable minimum buffer size in bytes for capturing.
839861847f8eSopenharmony_ci     * @returns { number } Promise used to return the buffer size.
839961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
840061847f8eSopenharmony_ci     * @crossplatform
840161847f8eSopenharmony_ci     * @since 12
840261847f8eSopenharmony_ci     */
840361847f8eSopenharmony_ci    getBufferSizeSync(): number;
840461847f8eSopenharmony_ci
840561847f8eSopenharmony_ci    /**
840661847f8eSopenharmony_ci     * Gets the input device or devices for this stream.
840761847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } Descriptors of input devices.
840861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
840961847f8eSopenharmony_ci     * @since 11
841061847f8eSopenharmony_ci     */
841161847f8eSopenharmony_ci    /**
841261847f8eSopenharmony_ci     * Gets the input device or devices for this stream.
841361847f8eSopenharmony_ci     * @returns { AudioDeviceDescriptors } Descriptors of input devices.
841461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
841561847f8eSopenharmony_ci     * @crossplatform
841661847f8eSopenharmony_ci     * @since 12
841761847f8eSopenharmony_ci     */
841861847f8eSopenharmony_ci    getCurrentInputDevices(): AudioDeviceDescriptors;
841961847f8eSopenharmony_ci
842061847f8eSopenharmony_ci    /**
842161847f8eSopenharmony_ci     * Gets full capturer info for this stream.
842261847f8eSopenharmony_ci     * @returns { AudioCapturerChangeInfo } Full capture info.
842361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
842461847f8eSopenharmony_ci     * @since 11
842561847f8eSopenharmony_ci     */
842661847f8eSopenharmony_ci    /**
842761847f8eSopenharmony_ci     * Gets full capturer info for this stream.
842861847f8eSopenharmony_ci     * @returns { AudioCapturerChangeInfo } Full capture info.
842961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
843061847f8eSopenharmony_ci     * @crossplatform
843161847f8eSopenharmony_ci     * @since 12
843261847f8eSopenharmony_ci     */
843361847f8eSopenharmony_ci    getCurrentAudioCapturerChangeInfo(): AudioCapturerChangeInfo;
843461847f8eSopenharmony_ci
843561847f8eSopenharmony_ci    /**
843661847f8eSopenharmony_ci     * Gets overflow count.
843761847f8eSopenharmony_ci     * @returns { Promise<number> } - Promise used to return the result.
843861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
843961847f8eSopenharmony_ci     * @since 12
844061847f8eSopenharmony_ci     */
844161847f8eSopenharmony_ci    getOverflowCount(): Promise<number>
844261847f8eSopenharmony_ci
844361847f8eSopenharmony_ci    /**
844461847f8eSopenharmony_ci     * Gets overflow count.
844561847f8eSopenharmony_ci     * @returns { number } Overflow count number.
844661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
844761847f8eSopenharmony_ci     * @since 12
844861847f8eSopenharmony_ci     */
844961847f8eSopenharmony_ci    getOverflowCountSync(): number;
845061847f8eSopenharmony_ci
845161847f8eSopenharmony_ci    /**
845261847f8eSopenharmony_ci     * Subscribes to mark reached events. When the number of frames captured reaches the value of the frame parameter,
845361847f8eSopenharmony_ci     * the callback is invoked.
845461847f8eSopenharmony_ci     * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported.
845561847f8eSopenharmony_ci     * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0.
845661847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback invoked when the event is triggered.
845761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
845861847f8eSopenharmony_ci     * @since 8
845961847f8eSopenharmony_ci     */
846061847f8eSopenharmony_ci    /**
846161847f8eSopenharmony_ci     * Subscribes to mark reached events. When the number of frames captured reaches the value of the frame parameter,
846261847f8eSopenharmony_ci     * the callback is invoked.
846361847f8eSopenharmony_ci     * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported.
846461847f8eSopenharmony_ci     * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0.
846561847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback invoked when the event is triggered.
846661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
846761847f8eSopenharmony_ci     * @crossplatform
846861847f8eSopenharmony_ci     * @since 12
846961847f8eSopenharmony_ci     */
847061847f8eSopenharmony_ci    on(type: 'markReach', frame: number, callback: Callback<number>): void;
847161847f8eSopenharmony_ci    /**
847261847f8eSopenharmony_ci     * Unsubscribes from the mark reached events.
847361847f8eSopenharmony_ci     * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported.
847461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
847561847f8eSopenharmony_ci     * @since 8
847661847f8eSopenharmony_ci     */
847761847f8eSopenharmony_ci    /**
847861847f8eSopenharmony_ci     * Unsubscribes from the mark reached events.
847961847f8eSopenharmony_ci     * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported.
848061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
848161847f8eSopenharmony_ci     * @crossplatform
848261847f8eSopenharmony_ci     * @since 12
848361847f8eSopenharmony_ci     */
848461847f8eSopenharmony_ci    off(type: 'markReach'): void;
848561847f8eSopenharmony_ci
848661847f8eSopenharmony_ci    /**
848761847f8eSopenharmony_ci     * Subscribes to period reached events. When the period of frame capturing reaches the value of frame parameter,
848861847f8eSopenharmony_ci     * the callback is invoked.
848961847f8eSopenharmony_ci     * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported.
849061847f8eSopenharmony_ci     * @param { number } frame - Period during which frame capturing is listened. The value must be greater than 0.
849161847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback invoked when the event is triggered.
849261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
849361847f8eSopenharmony_ci     * @since 8
849461847f8eSopenharmony_ci     */
849561847f8eSopenharmony_ci    /**
849661847f8eSopenharmony_ci     * Subscribes to period reached events. When the period of frame capturing reaches the value of frame parameter,
849761847f8eSopenharmony_ci     * the callback is invoked.
849861847f8eSopenharmony_ci     * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported.
849961847f8eSopenharmony_ci     * @param { number } frame - Period during which frame capturing is listened. The value must be greater than 0.
850061847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback invoked when the event is triggered.
850161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
850261847f8eSopenharmony_ci     * @crossplatform
850361847f8eSopenharmony_ci     * @since 12
850461847f8eSopenharmony_ci     */
850561847f8eSopenharmony_ci    on(type: 'periodReach', frame: number, callback: Callback<number>): void;
850661847f8eSopenharmony_ci    /**
850761847f8eSopenharmony_ci     * Unsubscribes from period reached events.
850861847f8eSopenharmony_ci     * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported.
850961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
851061847f8eSopenharmony_ci     * @since 8
851161847f8eSopenharmony_ci     */
851261847f8eSopenharmony_ci    /**
851361847f8eSopenharmony_ci     * Unsubscribes from period reached events.
851461847f8eSopenharmony_ci     * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported.
851561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
851661847f8eSopenharmony_ci     * @crossplatform
851761847f8eSopenharmony_ci     * @since 12
851861847f8eSopenharmony_ci     */
851961847f8eSopenharmony_ci    off(type: 'periodReach'): void;
852061847f8eSopenharmony_ci
852161847f8eSopenharmony_ci    /**
852261847f8eSopenharmony_ci     * Subscribes audio state change event callback.
852361847f8eSopenharmony_ci     * @param { 'stateChange' } type - Type of the event to listen for. Only the stateChange event is supported.
852461847f8eSopenharmony_ci     * @param { Callback<AudioState> } callback - Callback used to listen for the audio state change event.
852561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
852661847f8eSopenharmony_ci     * @since 8
852761847f8eSopenharmony_ci     */
852861847f8eSopenharmony_ci    /**
852961847f8eSopenharmony_ci     * Subscribes audio state change event callback.
853061847f8eSopenharmony_ci     * @param { 'stateChange' } type - Type of the event to listen for. Only the stateChange event is supported.
853161847f8eSopenharmony_ci     * @param { Callback<AudioState> } callback - Callback used to listen for the audio state change event.
853261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
853361847f8eSopenharmony_ci     * @crossplatform
853461847f8eSopenharmony_ci     * @since 12
853561847f8eSopenharmony_ci     */
853661847f8eSopenharmony_ci    on(type: 'stateChange', callback: Callback<AudioState>): void;
853761847f8eSopenharmony_ci
853861847f8eSopenharmony_ci    /**
853961847f8eSopenharmony_ci     * Listens for audio interrupt events. This method uses a callback to get interrupt events. The interrupt event is
854061847f8eSopenharmony_ci     * triggered when audio recording is interrupted.
854161847f8eSopenharmony_ci     * @param { 'audioInterrupt' } type - Type of the event to listen for. Only the audioInterrupt event is supported.
854261847f8eSopenharmony_ci     * @param { Callback<InterruptEvent> } callback - Callback used to listen for interrupt callback.
854361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
854461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
854561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
854661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
854761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
854861847f8eSopenharmony_ci     * @since 10
854961847f8eSopenharmony_ci     */
855061847f8eSopenharmony_ci    /**
855161847f8eSopenharmony_ci     * Listens for audio interrupt events. This method uses a callback to get interrupt events. The interrupt event is
855261847f8eSopenharmony_ci     * triggered when audio recording is interrupted.
855361847f8eSopenharmony_ci     * @param { 'audioInterrupt' } type - Type of the event to listen for. Only the audioInterrupt event is supported.
855461847f8eSopenharmony_ci     * @param { Callback<InterruptEvent> } callback - Callback used to listen for interrupt callback.
855561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
855661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
855761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
855861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
855961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
856061847f8eSopenharmony_ci     * @crossplatform
856161847f8eSopenharmony_ci     * @since 12
856261847f8eSopenharmony_ci     */
856361847f8eSopenharmony_ci    on(type: 'audioInterrupt', callback: Callback<InterruptEvent>): void;
856461847f8eSopenharmony_ci
856561847f8eSopenharmony_ci    /**
856661847f8eSopenharmony_ci     * UnSubscribes to audio interrupt events.
856761847f8eSopenharmony_ci     * @param { 'audioInterrupt' } type - Type of the event to listen for. Only the audioInterrupt event is supported.
856861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
856961847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
857061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
857161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
857261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
857361847f8eSopenharmony_ci     * @since 10
857461847f8eSopenharmony_ci     */
857561847f8eSopenharmony_ci    /**
857661847f8eSopenharmony_ci     * UnSubscribes to audio interrupt events.
857761847f8eSopenharmony_ci     * @param { 'audioInterrupt' } type - Type of the event to listen for. Only the audioInterrupt event is supported.
857861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
857961847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
858061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
858161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
858261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Interrupt
858361847f8eSopenharmony_ci     * @crossplatform
858461847f8eSopenharmony_ci     * @since 12
858561847f8eSopenharmony_ci     */
858661847f8eSopenharmony_ci    off(type: 'audioInterrupt'): void;
858761847f8eSopenharmony_ci
858861847f8eSopenharmony_ci    /**
858961847f8eSopenharmony_ci     * Subscribes input device change event callback.
859061847f8eSopenharmony_ci     * The event is triggered when input device change for this stream.
859161847f8eSopenharmony_ci     * @param { 'inputDeviceChange' } type - Type of the event to listen for.
859261847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to listen device change event.
859361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
859461847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
859561847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
859661847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
859761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
859861847f8eSopenharmony_ci     * @since 11
859961847f8eSopenharmony_ci     */
860061847f8eSopenharmony_ci    /**
860161847f8eSopenharmony_ci     * Subscribes input device change event callback.
860261847f8eSopenharmony_ci     * The event is triggered when input device change for this stream.
860361847f8eSopenharmony_ci     * @param { 'inputDeviceChange' } type - Type of the event to listen for.
860461847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used to listen device change event.
860561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
860661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
860761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
860861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
860961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
861061847f8eSopenharmony_ci     * @crossplatform
861161847f8eSopenharmony_ci     * @since 12
861261847f8eSopenharmony_ci     */
861361847f8eSopenharmony_ci    on(type: 'inputDeviceChange', callback: Callback<AudioDeviceDescriptors>): void;
861461847f8eSopenharmony_ci    /**
861561847f8eSopenharmony_ci     * Unsubscribes input device change event callback.
861661847f8eSopenharmony_ci     * @param { 'inputDeviceChange' } type - Type of the event to listen for.
861761847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used in subscribe.
861861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
861961847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
862061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
862161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
862261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
862361847f8eSopenharmony_ci     * @since 11
862461847f8eSopenharmony_ci     */
862561847f8eSopenharmony_ci    /**
862661847f8eSopenharmony_ci     * Unsubscribes input device change event callback.
862761847f8eSopenharmony_ci     * @param { 'inputDeviceChange' } type - Type of the event to listen for.
862861847f8eSopenharmony_ci     * @param { Callback<AudioDeviceDescriptors> } callback - Callback used in subscribe.
862961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
863061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
863161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
863261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
863361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Device
863461847f8eSopenharmony_ci     * @crossplatform
863561847f8eSopenharmony_ci     * @since 12
863661847f8eSopenharmony_ci     */
863761847f8eSopenharmony_ci    off(type: 'inputDeviceChange', callback?: Callback<AudioDeviceDescriptors>): void;
863861847f8eSopenharmony_ci
863961847f8eSopenharmony_ci    /**
864061847f8eSopenharmony_ci     * Subscribes audio capturer info change event callback.
864161847f8eSopenharmony_ci     * The event is triggered when input device change for this stream.
864261847f8eSopenharmony_ci     * @param { 'audioCapturerChange' } type - Type of the event to listen for.
864361847f8eSopenharmony_ci     * @param { Callback<AudioCapturerChangeInfo> } callback - Callback used to listen device change event.
864461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
864561847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
864661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
864761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
864861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
864961847f8eSopenharmony_ci     * @since 11
865061847f8eSopenharmony_ci     */
865161847f8eSopenharmony_ci    /**
865261847f8eSopenharmony_ci     * Subscribes audio capturer info change event callback.
865361847f8eSopenharmony_ci     * The event is triggered when input device change for this stream.
865461847f8eSopenharmony_ci     * @param { 'audioCapturerChange' } type - Type of the event to listen for.
865561847f8eSopenharmony_ci     * @param { Callback<AudioCapturerChangeInfo> } callback - Callback used to listen device change event.
865661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
865761847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
865861847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
865961847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
866061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
866161847f8eSopenharmony_ci     * @crossplatform
866261847f8eSopenharmony_ci     * @since 12
866361847f8eSopenharmony_ci     */
866461847f8eSopenharmony_ci    on(type: 'audioCapturerChange', callback: Callback<AudioCapturerChangeInfo>): void;
866561847f8eSopenharmony_ci    /**
866661847f8eSopenharmony_ci     * Unsubscribes audio capturer info change event callback.
866761847f8eSopenharmony_ci     * @param { 'audioCapturerChange' } type - Type of the event to listen for.
866861847f8eSopenharmony_ci     * @param { Callback<AudioCapturerChangeInfo> } callback - Callback used in subscribe.
866961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
867061847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
867161847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
867261847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
867361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
867461847f8eSopenharmony_ci     * @since 11
867561847f8eSopenharmony_ci     */
867661847f8eSopenharmony_ci    /**
867761847f8eSopenharmony_ci     * Unsubscribes audio capturer info change event callback.
867861847f8eSopenharmony_ci     * @param { 'audioCapturerChange' } type - Type of the event to listen for.
867961847f8eSopenharmony_ci     * @param { Callback<AudioCapturerChangeInfo> } callback - Callback used in subscribe.
868061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
868161847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
868261847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
868361847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
868461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
868561847f8eSopenharmony_ci     * @crossplatform
868661847f8eSopenharmony_ci     * @since 12
868761847f8eSopenharmony_ci     */
868861847f8eSopenharmony_ci    off(type: 'audioCapturerChange', callback?: Callback<AudioCapturerChangeInfo>): void;
868961847f8eSopenharmony_ci
869061847f8eSopenharmony_ci    /**
869161847f8eSopenharmony_ci     * Subscribes audio data callback.
869261847f8eSopenharmony_ci     * The event is triggered when audio buffer is available for reading more data.
869361847f8eSopenharmony_ci     * @param { 'readData' } type - Type of the event to listen for.
869461847f8eSopenharmony_ci     * @param { Callback<ArrayBuffer> } callback - Callback with the buffer to read.
869561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
869661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
869761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
869861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
869961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
870061847f8eSopenharmony_ci     * @since 11
870161847f8eSopenharmony_ci     */
870261847f8eSopenharmony_ci    /**
870361847f8eSopenharmony_ci     * Subscribes audio data callback.
870461847f8eSopenharmony_ci     * The event is triggered when audio buffer is available for reading more data.
870561847f8eSopenharmony_ci     * @param { 'readData' } type - Type of the event to listen for.
870661847f8eSopenharmony_ci     * @param { Callback<ArrayBuffer> } callback - Callback with the buffer to read.
870761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
870861847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
870961847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
871061847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
871161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
871261847f8eSopenharmony_ci     * @crossplatform
871361847f8eSopenharmony_ci     * @since 12
871461847f8eSopenharmony_ci     */
871561847f8eSopenharmony_ci    on(type: 'readData', callback: Callback<ArrayBuffer>): void;
871661847f8eSopenharmony_ci
871761847f8eSopenharmony_ci    /**
871861847f8eSopenharmony_ci     * Unsubscribes audio data callback.
871961847f8eSopenharmony_ci     * @param { 'readData' } type - Type of the event to listen for.
872061847f8eSopenharmony_ci     * @param { Callback<ArrayBuffer> } callback - Callback used in subscribe.
872161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
872261847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
872361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
872461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
872561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
872661847f8eSopenharmony_ci     * @since 11
872761847f8eSopenharmony_ci     */
872861847f8eSopenharmony_ci    /**
872961847f8eSopenharmony_ci     * Unsubscribes audio data callback.
873061847f8eSopenharmony_ci     * @param { 'readData' } type - Type of the event to listen for.
873161847f8eSopenharmony_ci     * @param { Callback<ArrayBuffer> } callback - Callback used in subscribe.
873261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
873361847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
873461847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
873561847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
873661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
873761847f8eSopenharmony_ci     * @crossplatform
873861847f8eSopenharmony_ci     * @since 12
873961847f8eSopenharmony_ci     */
874061847f8eSopenharmony_ci    off(type: 'readData', callback?: Callback<ArrayBuffer>): void;
874161847f8eSopenharmony_ci  }
874261847f8eSopenharmony_ci
874361847f8eSopenharmony_ci  /**
874461847f8eSopenharmony_ci   * ASR noise suppression mode.
874561847f8eSopenharmony_ci   * @enum { number }
874661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
874761847f8eSopenharmony_ci   * @systemapi
874861847f8eSopenharmony_ci   * @since 12
874961847f8eSopenharmony_ci   */
875061847f8eSopenharmony_ci  enum AsrNoiseSuppressionMode {
875161847f8eSopenharmony_ci    /**
875261847f8eSopenharmony_ci     * Bypass noise suppression.
875361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
875461847f8eSopenharmony_ci     * @systemapi
875561847f8eSopenharmony_ci     * @since 12
875661847f8eSopenharmony_ci     */
875761847f8eSopenharmony_ci    BYPASS = 0,
875861847f8eSopenharmony_ci    /**
875961847f8eSopenharmony_ci     * Standard noise suppression.
876061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
876161847f8eSopenharmony_ci     * @systemapi
876261847f8eSopenharmony_ci     * @since 12
876361847f8eSopenharmony_ci     */
876461847f8eSopenharmony_ci    STANDARD = 1,
876561847f8eSopenharmony_ci    /**
876661847f8eSopenharmony_ci     * Near field noise suppression.
876761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
876861847f8eSopenharmony_ci     * @systemapi
876961847f8eSopenharmony_ci     * @since 12
877061847f8eSopenharmony_ci     */
877161847f8eSopenharmony_ci    NEAR_FIELD = 2,
877261847f8eSopenharmony_ci    /**
877361847f8eSopenharmony_ci     * Far field noise suppression.
877461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
877561847f8eSopenharmony_ci     * @systemapi
877661847f8eSopenharmony_ci     * @since 12
877761847f8eSopenharmony_ci     */
877861847f8eSopenharmony_ci    FAR_FIELD = 3,
877961847f8eSopenharmony_ci  }
878061847f8eSopenharmony_ci
878161847f8eSopenharmony_ci  /**
878261847f8eSopenharmony_ci   * ASR AEC mode.
878361847f8eSopenharmony_ci   * @enum { number }
878461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
878561847f8eSopenharmony_ci   * @systemapi
878661847f8eSopenharmony_ci   * @since 12
878761847f8eSopenharmony_ci   */
878861847f8eSopenharmony_ci  enum AsrAecMode {
878961847f8eSopenharmony_ci    /**
879061847f8eSopenharmony_ci     * Bypass AEC.
879161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
879261847f8eSopenharmony_ci     * @systemapi
879361847f8eSopenharmony_ci     * @since 12
879461847f8eSopenharmony_ci     */
879561847f8eSopenharmony_ci    BYPASS = 0,
879661847f8eSopenharmony_ci    /**
879761847f8eSopenharmony_ci     * Using standard AEC.
879861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
879961847f8eSopenharmony_ci     * @systemapi
880061847f8eSopenharmony_ci     * @since 12
880161847f8eSopenharmony_ci     */
880261847f8eSopenharmony_ci    STANDARD = 1,
880361847f8eSopenharmony_ci  }
880461847f8eSopenharmony_ci
880561847f8eSopenharmony_ci  /**
880661847f8eSopenharmony_ci   * ASR voice control mode.
880761847f8eSopenharmony_ci   * @enum { number }
880861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
880961847f8eSopenharmony_ci   * @systemapi
881061847f8eSopenharmony_ci   * @since 12
881161847f8eSopenharmony_ci   */
881261847f8eSopenharmony_ci  enum AsrVoiceControlMode {
881361847f8eSopenharmony_ci    /**
881461847f8eSopenharmony_ci     * Send output stream to TX.
881561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
881661847f8eSopenharmony_ci     * @systemapi
881761847f8eSopenharmony_ci     * @since 12
881861847f8eSopenharmony_ci     */
881961847f8eSopenharmony_ci    AUDIO_2_VOICE_TX = 0,
882061847f8eSopenharmony_ci    /**
882161847f8eSopenharmony_ci     * Send both output stream and MIC input to TX.
882261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
882361847f8eSopenharmony_ci     * @systemapi
882461847f8eSopenharmony_ci     * @since 12
882561847f8eSopenharmony_ci     */
882661847f8eSopenharmony_ci    AUDIO_MIX_2_VOICE_TX = 1,
882761847f8eSopenharmony_ci    /**
882861847f8eSopenharmony_ci     * Based on the AUDIO_2_VOICE_TX, Send output stream to voice call record.
882961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
883061847f8eSopenharmony_ci     * @systemapi
883161847f8eSopenharmony_ci     * @since 12
883261847f8eSopenharmony_ci     */
883361847f8eSopenharmony_ci    AUDIO_2_VOICE_TX_EX = 2,
883461847f8eSopenharmony_ci    /**
883561847f8eSopenharmony_ci     * Based on the AUDIO_MIX_2_VOICE_TX, Send output stream to voice call record.
883661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
883761847f8eSopenharmony_ci     * @systemapi
883861847f8eSopenharmony_ci     * @since 12
883961847f8eSopenharmony_ci     */
884061847f8eSopenharmony_ci    AUDIO_MIX_2_VOICE_TX_EX = 3,
884161847f8eSopenharmony_ci  }
884261847f8eSopenharmony_ci
884361847f8eSopenharmony_ci  /**
884461847f8eSopenharmony_ci   * ASR voice mute mode.
884561847f8eSopenharmony_ci   * @enum { number }
884661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
884761847f8eSopenharmony_ci   * @systemapi
884861847f8eSopenharmony_ci   * @since 12
884961847f8eSopenharmony_ci   */
885061847f8eSopenharmony_ci  enum AsrVoiceMuteMode {
885161847f8eSopenharmony_ci    /**
885261847f8eSopenharmony_ci     * Mute the local output stream.
885361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
885461847f8eSopenharmony_ci     * @systemapi
885561847f8eSopenharmony_ci     * @since 12
885661847f8eSopenharmony_ci     */
885761847f8eSopenharmony_ci    OUTPUT_MUTE = 0,
885861847f8eSopenharmony_ci    /**
885961847f8eSopenharmony_ci     * Mute the local MIC input stream.
886061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
886161847f8eSopenharmony_ci     * @systemapi
886261847f8eSopenharmony_ci     * @since 12
886361847f8eSopenharmony_ci     */
886461847f8eSopenharmony_ci    INPUT_MUTE = 1,
886561847f8eSopenharmony_ci    /**
886661847f8eSopenharmony_ci     * Send tts output stream to TX and mute the local output stream.
886761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
886861847f8eSopenharmony_ci     * @systemapi
886961847f8eSopenharmony_ci     * @since 12
887061847f8eSopenharmony_ci     */
887161847f8eSopenharmony_ci    TTS_MUTE  = 2,
887261847f8eSopenharmony_ci    /**
887361847f8eSopenharmony_ci     * Mute the voice call stream.
887461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
887561847f8eSopenharmony_ci     * @systemapi
887661847f8eSopenharmony_ci       * @since 12
887761847f8eSopenharmony_ci       */
887861847f8eSopenharmony_ci    CALL_MUTE = 3,
887961847f8eSopenharmony_ci    /**
888061847f8eSopenharmony_ci     * Based on the OUTPUT_MUTE, send output stream to voice call record.
888161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
888261847f8eSopenharmony_ci     * @systemapi
888361847f8eSopenharmony_ci     * @since 12
888461847f8eSopenharmony_ci     */
888561847f8eSopenharmony_ci    OUTPUT_MUTE_EX = 4,
888661847f8eSopenharmony_ci  }
888761847f8eSopenharmony_ci
888861847f8eSopenharmony_ci  /**
888961847f8eSopenharmony_ci   * ASR whisper detection mode.
889061847f8eSopenharmony_ci   * @enum { number }
889161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
889261847f8eSopenharmony_ci   * @systemapi
889361847f8eSopenharmony_ci   * @since 12
889461847f8eSopenharmony_ci   */
889561847f8eSopenharmony_ci  enum AsrWhisperDetectionMode {
889661847f8eSopenharmony_ci    /**
889761847f8eSopenharmony_ci     * No operation.
889861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
889961847f8eSopenharmony_ci     * @systemapi
890061847f8eSopenharmony_ci     * @since 12
890161847f8eSopenharmony_ci     */
890261847f8eSopenharmony_ci    BYPASS = 0,
890361847f8eSopenharmony_ci    /**
890461847f8eSopenharmony_ci     * Use standard whisper detection model.
890561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
890661847f8eSopenharmony_ci     * @systemapi
890761847f8eSopenharmony_ci     * @since 12
890861847f8eSopenharmony_ci     */
890961847f8eSopenharmony_ci    STANDARD = 1,
891061847f8eSopenharmony_ci  }
891161847f8eSopenharmony_ci
891261847f8eSopenharmony_ci  /**
891361847f8eSopenharmony_ci   * ASR processing controller.
891461847f8eSopenharmony_ci   * @typedef AsrProcessingController
891561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
891661847f8eSopenharmony_ci   * @systemapi
891761847f8eSopenharmony_ci   * @since 12
891861847f8eSopenharmony_ci   */
891961847f8eSopenharmony_ci  interface AsrProcessingController {
892061847f8eSopenharmony_ci    /**
892161847f8eSopenharmony_ci     * Set ASR AEC mode.
892261847f8eSopenharmony_ci     * @param { AsrAecMode } mode - ASR AEC Mode.
892361847f8eSopenharmony_ci     * @returns { boolean } Indicates whether the mode has been successfully set.
892461847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Caller is not a system application.
892561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
892661847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
892761847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
892861847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
892961847f8eSopenharmony_ci     * @throws { BusinessError } 6800104 - Operation not allowed.
893061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
893161847f8eSopenharmony_ci     * @systemapi
893261847f8eSopenharmony_ci     * @since 12
893361847f8eSopenharmony_ci     */
893461847f8eSopenharmony_ci    setAsrAecMode(mode: AsrAecMode): boolean;
893561847f8eSopenharmony_ci
893661847f8eSopenharmony_ci    /**
893761847f8eSopenharmony_ci     * Get ASR AEC mode.
893861847f8eSopenharmony_ci     * @returns { AsrAecMode } ASR AEC Mode.
893961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Caller is not a system application.
894061847f8eSopenharmony_ci     * @throws { BusinessError } 6800104 - Operation not allowed.
894161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
894261847f8eSopenharmony_ci     * @systemapi
894361847f8eSopenharmony_ci     * @since 12
894461847f8eSopenharmony_ci     */
894561847f8eSopenharmony_ci    getAsrAecMode(): AsrAecMode;
894661847f8eSopenharmony_ci
894761847f8eSopenharmony_ci    /**
894861847f8eSopenharmony_ci     * Set ASR noise suppression mode.
894961847f8eSopenharmony_ci     * @param { AsrNoiseSuppressionMode } mode - ASR noise suppression mode.
895061847f8eSopenharmony_ci     * @returns { boolean } Indicates whether the mode has been successfully set.
895161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Caller is not a system application.
895261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
895361847f8eSopenharmony_ci     *                                 1.Mandatory parameters are left unspecified;
895461847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
895561847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
895661847f8eSopenharmony_ci     * @throws { BusinessError } 6800104 - Operation not allowed.
895761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
895861847f8eSopenharmony_ci     * @systemapi
895961847f8eSopenharmony_ci     * @since 12
896061847f8eSopenharmony_ci     */
896161847f8eSopenharmony_ci    setAsrNoiseSuppressionMode(mode: AsrNoiseSuppressionMode): boolean;
896261847f8eSopenharmony_ci
896361847f8eSopenharmony_ci    /**
896461847f8eSopenharmony_ci     * Get ASR noise suppression mode.
896561847f8eSopenharmony_ci     * @returns { AsrNoiseSuppressionMode } ASR noise suppression mode.
896661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Caller is not a system application.
896761847f8eSopenharmony_ci     * @throws { BusinessError } 6800104 - Operation not allowed.
896861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
896961847f8eSopenharmony_ci     * @systemapi
897061847f8eSopenharmony_ci     * @since 12
897161847f8eSopenharmony_ci     */
897261847f8eSopenharmony_ci    getAsrNoiseSuppressionMode(): AsrNoiseSuppressionMode;
897361847f8eSopenharmony_ci
897461847f8eSopenharmony_ci    /**
897561847f8eSopenharmony_ci     * Query whether user is whispering.
897661847f8eSopenharmony_ci     * @returns { boolean } whether user is whispering.
897761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Caller is not a system application.
897861847f8eSopenharmony_ci     * @throws { BusinessError } 6800104 - Operation not allowed.
897961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
898061847f8eSopenharmony_ci     * @systemapi
898161847f8eSopenharmony_ci     * @since 12
898261847f8eSopenharmony_ci     */
898361847f8eSopenharmony_ci    isWhispering(): boolean;
898461847f8eSopenharmony_ci
898561847f8eSopenharmony_ci    /**
898661847f8eSopenharmony_ci     * Set ASR voice control mode.
898761847f8eSopenharmony_ci     * @param { AsrVoiceControlMode } mode - ASR voice control mode.
898861847f8eSopenharmony_ci     * @param { boolean } enable - Indicates whether to switch on/off this mode.
898961847f8eSopenharmony_ci     * @returns { boolean } Indicates whether the mode has been successfully set.
899061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Caller is not a system application.
899161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
899261847f8eSopenharmony_ci     *                                 1.Mandatory parameters unspecified.
899361847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
899461847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
899561847f8eSopenharmony_ci     * @throws { BusinessError } 6800104 - Operation not allowed.
899661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
899761847f8eSopenharmony_ci     * @systemapi
899861847f8eSopenharmony_ci     * @since 12
899961847f8eSopenharmony_ci     */
900061847f8eSopenharmony_ci    setAsrVoiceControlMode(mode: AsrVoiceControlMode, enable: boolean): boolean;
900161847f8eSopenharmony_ci
900261847f8eSopenharmony_ci    /**
900361847f8eSopenharmony_ci     * Set ASR voice mute mode.
900461847f8eSopenharmony_ci     * @param { AsrVoiceMuteMode } mode - ASR voice mute mode.
900561847f8eSopenharmony_ci     * @param { boolean } enable - Indicates whether to switch on/off this mode.
900661847f8eSopenharmony_ci     * @returns { boolean } Indicates whether the mode has been successfully set.
900761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Caller is not a system application.
900861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
900961847f8eSopenharmony_ci     *                                 1.Mandatory parameters unspecified.
901061847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
901161847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
901261847f8eSopenharmony_ci     * @throws { BusinessError } 6800104 - Operation not allowed.
901361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
901461847f8eSopenharmony_ci     * @systemapi
901561847f8eSopenharmony_ci     * @since 12
901661847f8eSopenharmony_ci     */
901761847f8eSopenharmony_ci    setAsrVoiceMuteMode(mode: AsrVoiceMuteMode, enable: boolean): boolean;
901861847f8eSopenharmony_ci
901961847f8eSopenharmony_ci    /**
902061847f8eSopenharmony_ci     * Set ASR whisper detection mode.
902161847f8eSopenharmony_ci     * @param { AsrWhisperDetectionMode } mode - ASR whisper detection mode.
902261847f8eSopenharmony_ci     * @returns { boolean } Indicates whether the mode has been successfully set.
902361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Caller is not a system application.
902461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
902561847f8eSopenharmony_ci     *                                 1.Mandatory parameters unspecified.
902661847f8eSopenharmony_ci     *                                 2.Incorrect parameter types.
902761847f8eSopenharmony_ci     * @throws { BusinessError } 6800101 - Parameter verification failed.
902861847f8eSopenharmony_ci     * @throws { BusinessError } 6800104 - Operation not allowed.
902961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
903061847f8eSopenharmony_ci     * @systemapi
903161847f8eSopenharmony_ci     * @since 12
903261847f8eSopenharmony_ci     */
903361847f8eSopenharmony_ci    setAsrWhisperDetectionMode(mode: AsrWhisperDetectionMode): boolean;
903461847f8eSopenharmony_ci
903561847f8eSopenharmony_ci    /**
903661847f8eSopenharmony_ci     * Get ASR whisper detection mode.
903761847f8eSopenharmony_ci     * @returns { AsrWhisperDetectionMode } ASR whisper detection mode.
903861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Caller is not a system application.
903961847f8eSopenharmony_ci     * @throws { BusinessError } 6800104 - Operation not allowed.
904061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Capturer
904161847f8eSopenharmony_ci     * @systemapi
904261847f8eSopenharmony_ci     * @since 12
904361847f8eSopenharmony_ci     */
904461847f8eSopenharmony_ci    getAsrWhisperDetectionMode(): AsrWhisperDetectionMode;
904561847f8eSopenharmony_ci  }
904661847f8eSopenharmony_ci
904761847f8eSopenharmony_ci  /**
904861847f8eSopenharmony_ci   * Create ASR processing controller on one audio capturer.
904961847f8eSopenharmony_ci   * @param { AudioCapturer } audioCapturer - The audio capturer whose ASR processing will be controlled. The source
905061847f8eSopenharmony_ci   * type of this capturer must be {@link SourceType#SOURCE_TYPE_VOICE_RECOGNITION}.
905161847f8eSopenharmony_ci   * @returns { AsrProcessingController } ASR Processing Controller.
905261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Caller is not a system application.
905361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
905461847f8eSopenharmony_ci   *                                 1.Mandatory parameters are left unspecified;
905561847f8eSopenharmony_ci   *                                 2.Incorrect parameter types.
905661847f8eSopenharmony_ci   * @throws { BusinessError } 6800101 - Parameter verification failed.
905761847f8eSopenharmony_ci   * @throws { BusinessError } 6800104 - Operation not allowed. e.g. the source type of the input audio capturer is not
905861847f8eSopenharmony_ci   * {@link SourceType#SOURCE_TYPE_VOICE_RECOGNITION} or {@link SourceType#SOURCE_TYPE_WAKEUP}, or this audio capturer
905961847f8eSopenharmony_ci   * is already released.
906061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Capturer
906161847f8eSopenharmony_ci   * @systemapi
906261847f8eSopenharmony_ci   * @since 12
906361847f8eSopenharmony_ci   */
906461847f8eSopenharmony_ci  function createAsrProcessingController(audioCapturer: AudioCapturer): AsrProcessingController;
906561847f8eSopenharmony_ci
906661847f8eSopenharmony_ci  /**
906761847f8eSopenharmony_ci   * Enumerates tone types for player.
906861847f8eSopenharmony_ci   * @enum { number }
906961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Tone
907061847f8eSopenharmony_ci   * @systemapi
907161847f8eSopenharmony_ci   * @since 9
907261847f8eSopenharmony_ci   */
907361847f8eSopenharmony_ci  enum ToneType {
907461847f8eSopenharmony_ci    /**
907561847f8eSopenharmony_ci     * Dial tone for key 0.
907661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
907761847f8eSopenharmony_ci     * @systemapi
907861847f8eSopenharmony_ci     * @since 9
907961847f8eSopenharmony_ci     */
908061847f8eSopenharmony_ci    TONE_TYPE_DIAL_0 = 0,
908161847f8eSopenharmony_ci    /**
908261847f8eSopenharmony_ci     * Dial tone for key 1.
908361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
908461847f8eSopenharmony_ci     * @systemapi
908561847f8eSopenharmony_ci     * @since 9
908661847f8eSopenharmony_ci     */
908761847f8eSopenharmony_ci    TONE_TYPE_DIAL_1 = 1,
908861847f8eSopenharmony_ci    /**
908961847f8eSopenharmony_ci     * Dial tone for key 2.
909061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
909161847f8eSopenharmony_ci     * @systemapi
909261847f8eSopenharmony_ci     * @since 9
909361847f8eSopenharmony_ci     */
909461847f8eSopenharmony_ci    TONE_TYPE_DIAL_2 = 2,
909561847f8eSopenharmony_ci    /**
909661847f8eSopenharmony_ci     * Dial tone for key 3.
909761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
909861847f8eSopenharmony_ci     * @systemapi
909961847f8eSopenharmony_ci     * @since 9
910061847f8eSopenharmony_ci     */
910161847f8eSopenharmony_ci    TONE_TYPE_DIAL_3 = 3,
910261847f8eSopenharmony_ci    /**
910361847f8eSopenharmony_ci     * Dial tone for key 4.
910461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
910561847f8eSopenharmony_ci     * @systemapi
910661847f8eSopenharmony_ci     * @since 9
910761847f8eSopenharmony_ci     */
910861847f8eSopenharmony_ci    TONE_TYPE_DIAL_4 = 4,
910961847f8eSopenharmony_ci    /**
911061847f8eSopenharmony_ci     * Dial tone for key 5.
911161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
911261847f8eSopenharmony_ci     * @systemapi
911361847f8eSopenharmony_ci     * @since 9
911461847f8eSopenharmony_ci     */
911561847f8eSopenharmony_ci    TONE_TYPE_DIAL_5 = 5,
911661847f8eSopenharmony_ci    /**
911761847f8eSopenharmony_ci     * Dial tone for key 6.
911861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
911961847f8eSopenharmony_ci     * @systemapi
912061847f8eSopenharmony_ci     * @since 9
912161847f8eSopenharmony_ci     */
912261847f8eSopenharmony_ci    TONE_TYPE_DIAL_6 = 6,
912361847f8eSopenharmony_ci    /**
912461847f8eSopenharmony_ci     * Dial tone for key 7.
912561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
912661847f8eSopenharmony_ci     * @systemapi
912761847f8eSopenharmony_ci     * @since 9
912861847f8eSopenharmony_ci     */
912961847f8eSopenharmony_ci    TONE_TYPE_DIAL_7 = 7,
913061847f8eSopenharmony_ci    /**
913161847f8eSopenharmony_ci     * Dial tone for key 8.
913261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
913361847f8eSopenharmony_ci     * @systemapi
913461847f8eSopenharmony_ci     * @since 9
913561847f8eSopenharmony_ci     */
913661847f8eSopenharmony_ci    TONE_TYPE_DIAL_8 = 8,
913761847f8eSopenharmony_ci    /**
913861847f8eSopenharmony_ci     * Dial tone for key 9.
913961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
914061847f8eSopenharmony_ci     * @systemapi
914161847f8eSopenharmony_ci     * @since 9
914261847f8eSopenharmony_ci     */
914361847f8eSopenharmony_ci    TONE_TYPE_DIAL_9 = 9,
914461847f8eSopenharmony_ci    /**
914561847f8eSopenharmony_ci     * Dial tone for key *.
914661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
914761847f8eSopenharmony_ci     * @systemapi
914861847f8eSopenharmony_ci     * @since 9
914961847f8eSopenharmony_ci     */
915061847f8eSopenharmony_ci    TONE_TYPE_DIAL_S = 10,
915161847f8eSopenharmony_ci    /**
915261847f8eSopenharmony_ci     * Dial tone for key #.
915361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
915461847f8eSopenharmony_ci     * @systemapi
915561847f8eSopenharmony_ci     * @since 9
915661847f8eSopenharmony_ci     */
915761847f8eSopenharmony_ci    TONE_TYPE_DIAL_P = 11,
915861847f8eSopenharmony_ci    /**
915961847f8eSopenharmony_ci     * Dial tone for key A.
916061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
916161847f8eSopenharmony_ci     * @systemapi
916261847f8eSopenharmony_ci     * @since 9
916361847f8eSopenharmony_ci     */
916461847f8eSopenharmony_ci    TONE_TYPE_DIAL_A = 12,
916561847f8eSopenharmony_ci    /**
916661847f8eSopenharmony_ci     * Dial tone for key B.
916761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
916861847f8eSopenharmony_ci     * @systemapi
916961847f8eSopenharmony_ci     * @since 9
917061847f8eSopenharmony_ci     */
917161847f8eSopenharmony_ci    TONE_TYPE_DIAL_B = 13,
917261847f8eSopenharmony_ci    /**
917361847f8eSopenharmony_ci     * Dial tone for key C.
917461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
917561847f8eSopenharmony_ci     * @systemapi
917661847f8eSopenharmony_ci     * @since 9
917761847f8eSopenharmony_ci     */
917861847f8eSopenharmony_ci    TONE_TYPE_DIAL_C = 14,
917961847f8eSopenharmony_ci    /**
918061847f8eSopenharmony_ci     * Dial tone for key D.
918161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
918261847f8eSopenharmony_ci     * @systemapi
918361847f8eSopenharmony_ci     * @since 9
918461847f8eSopenharmony_ci     */
918561847f8eSopenharmony_ci    TONE_TYPE_DIAL_D = 15,
918661847f8eSopenharmony_ci    /**
918761847f8eSopenharmony_ci     * Supervisory tone for dial.
918861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
918961847f8eSopenharmony_ci     * @systemapi
919061847f8eSopenharmony_ci     * @since 9
919161847f8eSopenharmony_ci     */
919261847f8eSopenharmony_ci    TONE_TYPE_COMMON_SUPERVISORY_DIAL = 100,
919361847f8eSopenharmony_ci    /**
919461847f8eSopenharmony_ci     * Supervisory tone for busy.
919561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
919661847f8eSopenharmony_ci     * @systemapi
919761847f8eSopenharmony_ci     * @since 9
919861847f8eSopenharmony_ci     */
919961847f8eSopenharmony_ci    TONE_TYPE_COMMON_SUPERVISORY_BUSY = 101,
920061847f8eSopenharmony_ci    /**
920161847f8eSopenharmony_ci     * Supervisory tone for dial.
920261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
920361847f8eSopenharmony_ci     * @systemapi
920461847f8eSopenharmony_ci     * @since 9
920561847f8eSopenharmony_ci     */
920661847f8eSopenharmony_ci    TONE_TYPE_COMMON_SUPERVISORY_CONGESTION = 102,
920761847f8eSopenharmony_ci    /**
920861847f8eSopenharmony_ci     * Supervisory tone for radio path acknowledgment.
920961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
921061847f8eSopenharmony_ci     * @systemapi
921161847f8eSopenharmony_ci     * @since 9
921261847f8eSopenharmony_ci     */
921361847f8eSopenharmony_ci    TONE_TYPE_COMMON_SUPERVISORY_RADIO_ACK = 103,
921461847f8eSopenharmony_ci    /**
921561847f8eSopenharmony_ci     * Supervisory tone for radio path not available.
921661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
921761847f8eSopenharmony_ci     * @systemapi
921861847f8eSopenharmony_ci     * @since 9
921961847f8eSopenharmony_ci     */
922061847f8eSopenharmony_ci    TONE_TYPE_COMMON_SUPERVISORY_RADIO_NOT_AVAILABLE = 104,
922161847f8eSopenharmony_ci    /**
922261847f8eSopenharmony_ci     * Supervisory tone for call waiting.
922361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
922461847f8eSopenharmony_ci     * @systemapi
922561847f8eSopenharmony_ci     * @since 9
922661847f8eSopenharmony_ci     */
922761847f8eSopenharmony_ci    TONE_TYPE_COMMON_SUPERVISORY_CALL_WAITING = 106,
922861847f8eSopenharmony_ci    /**
922961847f8eSopenharmony_ci     * Supervisory tone for ringtone.
923061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
923161847f8eSopenharmony_ci     * @systemapi
923261847f8eSopenharmony_ci     * @since 9
923361847f8eSopenharmony_ci     */
923461847f8eSopenharmony_ci    TONE_TYPE_COMMON_SUPERVISORY_RINGTONE = 107,
923561847f8eSopenharmony_ci    /**
923661847f8eSopenharmony_ci     * Proprietary tone for beep.
923761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
923861847f8eSopenharmony_ci     * @systemapi
923961847f8eSopenharmony_ci     * @since 9
924061847f8eSopenharmony_ci     */
924161847f8eSopenharmony_ci    TONE_TYPE_COMMON_PROPRIETARY_BEEP = 200,
924261847f8eSopenharmony_ci    /**
924361847f8eSopenharmony_ci     * Proprietary tone for positive acknowledgment.
924461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
924561847f8eSopenharmony_ci     * @systemapi
924661847f8eSopenharmony_ci     * @since 9
924761847f8eSopenharmony_ci     */
924861847f8eSopenharmony_ci    TONE_TYPE_COMMON_PROPRIETARY_ACK = 201,
924961847f8eSopenharmony_ci    /**
925061847f8eSopenharmony_ci     * Proprietary tone for prompt.
925161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
925261847f8eSopenharmony_ci     * @systemapi
925361847f8eSopenharmony_ci     * @since 9
925461847f8eSopenharmony_ci     */
925561847f8eSopenharmony_ci    TONE_TYPE_COMMON_PROPRIETARY_PROMPT = 203,
925661847f8eSopenharmony_ci    /**
925761847f8eSopenharmony_ci     * Proprietary tone for double beep.
925861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
925961847f8eSopenharmony_ci     * @systemapi
926061847f8eSopenharmony_ci     * @since 9
926161847f8eSopenharmony_ci     */
926261847f8eSopenharmony_ci    TONE_TYPE_COMMON_PROPRIETARY_DOUBLE_BEEP = 204,
926361847f8eSopenharmony_ci  }
926461847f8eSopenharmony_ci
926561847f8eSopenharmony_ci  /**
926661847f8eSopenharmony_ci   * Provides APIs for tone playing.
926761847f8eSopenharmony_ci   * @typedef TonePlayer
926861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Tone
926961847f8eSopenharmony_ci   * @systemapi
927061847f8eSopenharmony_ci   * @since 9
927161847f8eSopenharmony_ci   */
927261847f8eSopenharmony_ci  interface TonePlayer {
927361847f8eSopenharmony_ci    /**
927461847f8eSopenharmony_ci     * Loads tone. This method uses an asynchronous callback to return the result.
927561847f8eSopenharmony_ci     * @param { ToneType } type - Tone type to play.
927661847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
927761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
927861847f8eSopenharmony_ci     * @systemapi
927961847f8eSopenharmony_ci     * @since 9
928061847f8eSopenharmony_ci     */
928161847f8eSopenharmony_ci    load(type: ToneType, callback: AsyncCallback<void>): void;
928261847f8eSopenharmony_ci    /**
928361847f8eSopenharmony_ci     * Loads tone. This method uses a promise to return the result.
928461847f8eSopenharmony_ci     * @param { ToneType } type - Tone type to play.
928561847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
928661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
928761847f8eSopenharmony_ci     * @systemapi
928861847f8eSopenharmony_ci     * @since 9
928961847f8eSopenharmony_ci     */
929061847f8eSopenharmony_ci    load(type: ToneType): Promise<void>;
929161847f8eSopenharmony_ci
929261847f8eSopenharmony_ci    /**
929361847f8eSopenharmony_ci     * Starts player. This method uses an asynchronous callback to return the result.
929461847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
929561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
929661847f8eSopenharmony_ci     * @systemapi
929761847f8eSopenharmony_ci     * @since 9
929861847f8eSopenharmony_ci     */
929961847f8eSopenharmony_ci    start(callback: AsyncCallback<void>): void;
930061847f8eSopenharmony_ci    /**
930161847f8eSopenharmony_ci     * Starts player. This method uses a promise to return the result.
930261847f8eSopenharmony_ci     * @returns { Promise<void> }Promise used to return the result.
930361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
930461847f8eSopenharmony_ci     * @systemapi
930561847f8eSopenharmony_ci     * @since 9
930661847f8eSopenharmony_ci     */
930761847f8eSopenharmony_ci    start(): Promise<void>;
930861847f8eSopenharmony_ci
930961847f8eSopenharmony_ci    /**
931061847f8eSopenharmony_ci     * Stops player. This method uses an asynchronous callback to return the result.
931161847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
931261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
931361847f8eSopenharmony_ci     * @systemapi
931461847f8eSopenharmony_ci     * @since 9
931561847f8eSopenharmony_ci     */
931661847f8eSopenharmony_ci    stop(callback: AsyncCallback<void>): void;
931761847f8eSopenharmony_ci    /**
931861847f8eSopenharmony_ci     * Stops player. This method uses a promise to return the result.
931961847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
932061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
932161847f8eSopenharmony_ci     * @systemapi
932261847f8eSopenharmony_ci     * @since 9
932361847f8eSopenharmony_ci     */
932461847f8eSopenharmony_ci    stop(): Promise<void>;
932561847f8eSopenharmony_ci
932661847f8eSopenharmony_ci    /**
932761847f8eSopenharmony_ci     * Releases the player. This method uses an asynchronous callback to return the result.
932861847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - Callback used to return the result.
932961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
933061847f8eSopenharmony_ci     * @systemapi
933161847f8eSopenharmony_ci     * @since 9
933261847f8eSopenharmony_ci     */
933361847f8eSopenharmony_ci    release(callback: AsyncCallback<void>): void;
933461847f8eSopenharmony_ci    /**
933561847f8eSopenharmony_ci     * Releases the player. This method uses a promise to return the result.
933661847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
933761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Tone
933861847f8eSopenharmony_ci     * @systemapi
933961847f8eSopenharmony_ci     * @since 9
934061847f8eSopenharmony_ci     */
934161847f8eSopenharmony_ci    release(): Promise<void>;
934261847f8eSopenharmony_ci  }
934361847f8eSopenharmony_ci
934461847f8eSopenharmony_ci  /**
934561847f8eSopenharmony_ci   * Array of AudioEffectMode, which is read-only.
934661847f8eSopenharmony_ci   * @typedef { Array<Readonly<AudioEffectMode>> } AudioEffectInfoArray
934761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
934861847f8eSopenharmony_ci   * @since 10
934961847f8eSopenharmony_ci   */
935061847f8eSopenharmony_ci  type AudioEffectInfoArray = Array<Readonly<AudioEffectMode>>;
935161847f8eSopenharmony_ci
935261847f8eSopenharmony_ci  /**
935361847f8eSopenharmony_ci   * Describes an audio effect mode group.
935461847f8eSopenharmony_ci   * @enum { number }
935561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
935661847f8eSopenharmony_ci   * @since 10
935761847f8eSopenharmony_ci   */
935861847f8eSopenharmony_ci  /**
935961847f8eSopenharmony_ci   * Describes an audio effect mode group.
936061847f8eSopenharmony_ci   * @enum { number }
936161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Renderer
936261847f8eSopenharmony_ci   * @atomicservice
936361847f8eSopenharmony_ci   * @since 12
936461847f8eSopenharmony_ci   */
936561847f8eSopenharmony_ci  enum AudioEffectMode {
936661847f8eSopenharmony_ci    /**
936761847f8eSopenharmony_ci     * Audio Effect Mode effect none.
936861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
936961847f8eSopenharmony_ci     * @since 10
937061847f8eSopenharmony_ci     */
937161847f8eSopenharmony_ci    /**
937261847f8eSopenharmony_ci     * Audio Effect Mode effect none.
937361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
937461847f8eSopenharmony_ci     * @atomicservice
937561847f8eSopenharmony_ci     * @since 12
937661847f8eSopenharmony_ci     */
937761847f8eSopenharmony_ci    EFFECT_NONE = 0,
937861847f8eSopenharmony_ci    /**
937961847f8eSopenharmony_ci     * Audio Effect Mode effect default.
938061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
938161847f8eSopenharmony_ci     * @since 10
938261847f8eSopenharmony_ci     */
938361847f8eSopenharmony_ci    /**
938461847f8eSopenharmony_ci     * Audio Effect Mode effect default.
938561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Renderer
938661847f8eSopenharmony_ci     * @atomicservice
938761847f8eSopenharmony_ci     * @since 12
938861847f8eSopenharmony_ci     */
938961847f8eSopenharmony_ci    EFFECT_DEFAULT = 1,
939061847f8eSopenharmony_ci  }
939161847f8eSopenharmony_ci
939261847f8eSopenharmony_ci  /**
939361847f8eSopenharmony_ci   * Describes spatial device state.
939461847f8eSopenharmony_ci   * @typedef AudioSpatialDeviceState
939561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Spatialization
939661847f8eSopenharmony_ci   * @systemapi
939761847f8eSopenharmony_ci   * @since 11
939861847f8eSopenharmony_ci   */
939961847f8eSopenharmony_ci  interface AudioSpatialDeviceState {
940061847f8eSopenharmony_ci    /**
940161847f8eSopenharmony_ci     * Spatial device address.
940261847f8eSopenharmony_ci     * @type { string }
940361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
940461847f8eSopenharmony_ci     * @systemapi
940561847f8eSopenharmony_ci     * @since 11
940661847f8eSopenharmony_ci     */
940761847f8eSopenharmony_ci    address: string;
940861847f8eSopenharmony_ci
940961847f8eSopenharmony_ci    /**
941061847f8eSopenharmony_ci     * Whether the spatial device supports spatial rendering.
941161847f8eSopenharmony_ci     * @type { boolean }
941261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
941361847f8eSopenharmony_ci     * @systemapi
941461847f8eSopenharmony_ci     * @since 11
941561847f8eSopenharmony_ci     */
941661847f8eSopenharmony_ci    isSpatializationSupported: boolean;
941761847f8eSopenharmony_ci
941861847f8eSopenharmony_ci    /**
941961847f8eSopenharmony_ci     * Whether the spatial device supports head tracking.
942061847f8eSopenharmony_ci     * @type { boolean }
942161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
942261847f8eSopenharmony_ci     * @systemapi
942361847f8eSopenharmony_ci     * @since 11
942461847f8eSopenharmony_ci     */
942561847f8eSopenharmony_ci    isHeadTrackingSupported: boolean;
942661847f8eSopenharmony_ci
942761847f8eSopenharmony_ci    /**
942861847f8eSopenharmony_ci     * Spatial device type.
942961847f8eSopenharmony_ci     * @type { AudioSpatialDeviceType }
943061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
943161847f8eSopenharmony_ci     * @systemapi
943261847f8eSopenharmony_ci     * @since 11
943361847f8eSopenharmony_ci     */
943461847f8eSopenharmony_ci    spatialDeviceType: AudioSpatialDeviceType;
943561847f8eSopenharmony_ci  }
943661847f8eSopenharmony_ci
943761847f8eSopenharmony_ci  /**
943861847f8eSopenharmony_ci   * Describes a spatial device type group.
943961847f8eSopenharmony_ci   * @enum { number }
944061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Spatialization
944161847f8eSopenharmony_ci   * @systemapi
944261847f8eSopenharmony_ci   * @since 11
944361847f8eSopenharmony_ci   */
944461847f8eSopenharmony_ci  enum AudioSpatialDeviceType {
944561847f8eSopenharmony_ci    /**
944661847f8eSopenharmony_ci     * Audio Spatial Device Type none.
944761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
944861847f8eSopenharmony_ci     * @systemapi
944961847f8eSopenharmony_ci     * @since 11
945061847f8eSopenharmony_ci     */
945161847f8eSopenharmony_ci    SPATIAL_DEVICE_TYPE_NONE = 0,
945261847f8eSopenharmony_ci    /**
945361847f8eSopenharmony_ci     * Audio Spatial Device Type in-ear headphone.
945461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
945561847f8eSopenharmony_ci     * @systemapi
945661847f8eSopenharmony_ci     * @since 11
945761847f8eSopenharmony_ci     */
945861847f8eSopenharmony_ci    SPATIAL_DEVICE_TYPE_IN_EAR_HEADPHONE = 1,
945961847f8eSopenharmony_ci    /**
946061847f8eSopenharmony_ci     * Audio Spatial Device Type half-in-ear headphone.
946161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
946261847f8eSopenharmony_ci     * @systemapi
946361847f8eSopenharmony_ci     * @since 11
946461847f8eSopenharmony_ci     */
946561847f8eSopenharmony_ci    SPATIAL_DEVICE_TYPE_HALF_IN_EAR_HEADPHONE = 2,
946661847f8eSopenharmony_ci    /**
946761847f8eSopenharmony_ci     * Audio Spatial Device Type over-ear headphone.
946861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
946961847f8eSopenharmony_ci     * @systemapi
947061847f8eSopenharmony_ci     * @since 11
947161847f8eSopenharmony_ci     */
947261847f8eSopenharmony_ci    SPATIAL_DEVICE_TYPE_OVER_EAR_HEADPHONE = 3,
947361847f8eSopenharmony_ci    /**
947461847f8eSopenharmony_ci     * Audio Spatial Device Type glasses.
947561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
947661847f8eSopenharmony_ci     * @systemapi
947761847f8eSopenharmony_ci     * @since 11
947861847f8eSopenharmony_ci     */
947961847f8eSopenharmony_ci    SPATIAL_DEVICE_TYPE_GLASSES = 4,
948061847f8eSopenharmony_ci    /**
948161847f8eSopenharmony_ci     * Audio Spatial Device Type others.
948261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
948361847f8eSopenharmony_ci     * @systemapi
948461847f8eSopenharmony_ci     * @since 11
948561847f8eSopenharmony_ci     */
948661847f8eSopenharmony_ci    SPATIAL_DEVICE_TYPE_OTHERS = 5,
948761847f8eSopenharmony_ci  }
948861847f8eSopenharmony_ci
948961847f8eSopenharmony_ci  /**
949061847f8eSopenharmony_ci   * Describes a spatialization scene type group.
949161847f8eSopenharmony_ci   * @enum { number }
949261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Spatialization
949361847f8eSopenharmony_ci   * @systemapi
949461847f8eSopenharmony_ci   * @since 12
949561847f8eSopenharmony_ci   */
949661847f8eSopenharmony_ci  enum AudioSpatializationSceneType {
949761847f8eSopenharmony_ci    /**
949861847f8eSopenharmony_ci     * Audio Spatialization Scene Type Default.
949961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
950061847f8eSopenharmony_ci     * @systemapi
950161847f8eSopenharmony_ci     * @since 12
950261847f8eSopenharmony_ci     */
950361847f8eSopenharmony_ci    DEFAULT = 0,
950461847f8eSopenharmony_ci    /**
950561847f8eSopenharmony_ci     * Audio Spatialization Scene Type Music.
950661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
950761847f8eSopenharmony_ci     * @systemapi
950861847f8eSopenharmony_ci     * @since 12
950961847f8eSopenharmony_ci     */
951061847f8eSopenharmony_ci    MUSIC = 1,
951161847f8eSopenharmony_ci    /**
951261847f8eSopenharmony_ci     * Audio Spatialization Scene Type Movie.
951361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
951461847f8eSopenharmony_ci     * @systemapi
951561847f8eSopenharmony_ci     * @since 12
951661847f8eSopenharmony_ci     */
951761847f8eSopenharmony_ci    MOVIE = 2,
951861847f8eSopenharmony_ci    /**
951961847f8eSopenharmony_ci     * Audio Spatialization Scene Type Audio Book.
952061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Spatialization
952161847f8eSopenharmony_ci     * @systemapi
952261847f8eSopenharmony_ci     * @since 12
952361847f8eSopenharmony_ci     */
952461847f8eSopenharmony_ci    AUDIOBOOK = 3,
952561847f8eSopenharmony_ci  }
952661847f8eSopenharmony_ci
952761847f8eSopenharmony_ci  /**
952861847f8eSopenharmony_ci   * Audio AudioChannel Layout
952961847f8eSopenharmony_ci   * A 64-bit integer indicates that the appearance and order of the speakers for recording or playback.
953061847f8eSopenharmony_ci   * @enum { number }
953161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
953261847f8eSopenharmony_ci   * @since 11
953361847f8eSopenharmony_ci   */
953461847f8eSopenharmony_ci  /**
953561847f8eSopenharmony_ci   * Audio AudioChannel Layout
953661847f8eSopenharmony_ci   * A 64-bit integer indicates that the appearance and order of the speakers for recording or playback.
953761847f8eSopenharmony_ci   * @enum { number }
953861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.Audio.Core
953961847f8eSopenharmony_ci   * @crossplatform
954061847f8eSopenharmony_ci   * @since 12
954161847f8eSopenharmony_ci   */
954261847f8eSopenharmony_ci  enum AudioChannelLayout {
954361847f8eSopenharmony_ci    /**
954461847f8eSopenharmony_ci     * Unknown Channel Layout
954561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
954661847f8eSopenharmony_ci     * @since 11
954761847f8eSopenharmony_ci     */
954861847f8eSopenharmony_ci    /**
954961847f8eSopenharmony_ci     * Unknown Channel Layout
955061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
955161847f8eSopenharmony_ci     * @crossplatform
955261847f8eSopenharmony_ci     * @since 12
955361847f8eSopenharmony_ci     */
955461847f8eSopenharmony_ci    CH_LAYOUT_UNKNOWN = 0x0,
955561847f8eSopenharmony_ci    /**
955661847f8eSopenharmony_ci     * Channel Layout For Mono, 1 channel in total
955761847f8eSopenharmony_ci     * Speaker layout: front center(FC)
955861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
955961847f8eSopenharmony_ci     * @since 11
956061847f8eSopenharmony_ci     */
956161847f8eSopenharmony_ci    /**
956261847f8eSopenharmony_ci     * Channel Layout For Mono, 1 channel in total
956361847f8eSopenharmony_ci     * Speaker layout: front center(FC)
956461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
956561847f8eSopenharmony_ci     * @crossplatform
956661847f8eSopenharmony_ci     * @since 12
956761847f8eSopenharmony_ci     */
956861847f8eSopenharmony_ci    CH_LAYOUT_MONO = 0x4,
956961847f8eSopenharmony_ci    /**
957061847f8eSopenharmony_ci     * Channel Layout For Stereo, 2 channels in total
957161847f8eSopenharmony_ci     * Speaker layout: front left(FL), front right(FR)
957261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
957361847f8eSopenharmony_ci     * @since 11
957461847f8eSopenharmony_ci     */
957561847f8eSopenharmony_ci    /**
957661847f8eSopenharmony_ci     * Channel Layout For Stereo, 2 channels in total
957761847f8eSopenharmony_ci     * Speaker layout: front left(FL), front right(FR)
957861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
957961847f8eSopenharmony_ci     * @crossplatform
958061847f8eSopenharmony_ci     * @since 12
958161847f8eSopenharmony_ci     */
958261847f8eSopenharmony_ci    CH_LAYOUT_STEREO = 0x3,
958361847f8eSopenharmony_ci    /**
958461847f8eSopenharmony_ci     * Channel Layout For Stereo-Downmix, 2 channels in total
958561847f8eSopenharmony_ci     * Speaker layout: Stereo left, stereo right
958661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
958761847f8eSopenharmony_ci     * @since 11
958861847f8eSopenharmony_ci     */
958961847f8eSopenharmony_ci    CH_LAYOUT_STEREO_DOWNMIX = 0x60000000,
959061847f8eSopenharmony_ci    /**
959161847f8eSopenharmony_ci     * Channel Layout For 2.1, 3 channels in total
959261847f8eSopenharmony_ci     * Speaker layout: Stereo plus low-frequency effects(LFE)
959361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
959461847f8eSopenharmony_ci     * @since 11
959561847f8eSopenharmony_ci     */
959661847f8eSopenharmony_ci    /**
959761847f8eSopenharmony_ci     * Channel Layout For 2.1, 3 channels in total
959861847f8eSopenharmony_ci     * Speaker layout: Stereo plus low-frequency effects(LFE)
959961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
960061847f8eSopenharmony_ci     * @crossplatform
960161847f8eSopenharmony_ci     * @since 12
960261847f8eSopenharmony_ci     */
960361847f8eSopenharmony_ci    CH_LAYOUT_2POINT1 = 0xB,
960461847f8eSopenharmony_ci    /**
960561847f8eSopenharmony_ci     * Channel Layout For 3.0, 3 channels in total
960661847f8eSopenharmony_ci     * Speaker layout: Stereo plus back center(BC)
960761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
960861847f8eSopenharmony_ci     * @since 11
960961847f8eSopenharmony_ci     */
961061847f8eSopenharmony_ci    /**
961161847f8eSopenharmony_ci     * Channel Layout For 3.0, 3 channels in total
961261847f8eSopenharmony_ci     * Speaker layout: Stereo plus back center(BC)
961361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
961461847f8eSopenharmony_ci     * @crossplatform
961561847f8eSopenharmony_ci     * @since 12
961661847f8eSopenharmony_ci     */
961761847f8eSopenharmony_ci    CH_LAYOUT_3POINT0 = 0x103,
961861847f8eSopenharmony_ci    /**
961961847f8eSopenharmony_ci     * Channel Layout For Surround, 3 channels in total
962061847f8eSopenharmony_ci     * Speaker layout: Stereo plus FC
962161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
962261847f8eSopenharmony_ci     * @since 11
962361847f8eSopenharmony_ci     */
962461847f8eSopenharmony_ci    /**
962561847f8eSopenharmony_ci     * Channel Layout For Surround, 3 channels in total
962661847f8eSopenharmony_ci     * Speaker layout: Stereo plus FC
962761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
962861847f8eSopenharmony_ci     * @crossplatform
962961847f8eSopenharmony_ci     * @since 12
963061847f8eSopenharmony_ci     */
963161847f8eSopenharmony_ci    CH_LAYOUT_SURROUND = 0x7,
963261847f8eSopenharmony_ci    /**
963361847f8eSopenharmony_ci     * Channel Layout For 3.1, 4 channels in total
963461847f8eSopenharmony_ci     * Speaker layout: Surround plus LFE
963561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
963661847f8eSopenharmony_ci     * @since 11
963761847f8eSopenharmony_ci     */
963861847f8eSopenharmony_ci    /**
963961847f8eSopenharmony_ci     * Channel Layout For 3.1, 4 channels in total
964061847f8eSopenharmony_ci     * Speaker layout: Surround plus LFE
964161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
964261847f8eSopenharmony_ci     * @crossplatform
964361847f8eSopenharmony_ci     * @since 12
964461847f8eSopenharmony_ci     */
964561847f8eSopenharmony_ci    CH_LAYOUT_3POINT1 = 0xF,
964661847f8eSopenharmony_ci    /**
964761847f8eSopenharmony_ci     * Channel Layout For 4.0, 4 channels in total
964861847f8eSopenharmony_ci     * Speaker layout: Surround plus BC
964961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
965061847f8eSopenharmony_ci     * @since 11
965161847f8eSopenharmony_ci     */
965261847f8eSopenharmony_ci    /**
965361847f8eSopenharmony_ci     * Channel Layout For 4.0, 4 channels in total
965461847f8eSopenharmony_ci     * Speaker layout: Surround plus BC
965561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
965661847f8eSopenharmony_ci     * @crossplatform
965761847f8eSopenharmony_ci     * @since 12
965861847f8eSopenharmony_ci     */
965961847f8eSopenharmony_ci    CH_LAYOUT_4POINT0 = 0x107,
966061847f8eSopenharmony_ci    /**
966161847f8eSopenharmony_ci     * Channel Layout For Quad, 4 channels in total
966261847f8eSopenharmony_ci     * Speaker layout: Stereo plus left and right back speakers
966361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
966461847f8eSopenharmony_ci     * @since 11
966561847f8eSopenharmony_ci     */
966661847f8eSopenharmony_ci    /**
966761847f8eSopenharmony_ci     * Channel Layout For Quad, 4 channels in total
966861847f8eSopenharmony_ci     * Speaker layout: Stereo plus left and right back speakers
966961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
967061847f8eSopenharmony_ci     * @crossplatform
967161847f8eSopenharmony_ci     * @since 12
967261847f8eSopenharmony_ci     */
967361847f8eSopenharmony_ci    CH_LAYOUT_QUAD = 0x33,
967461847f8eSopenharmony_ci    /**
967561847f8eSopenharmony_ci     * Channel Layout For Quad-Side, 4 channels in total
967661847f8eSopenharmony_ci     * Speaker layout: Stereo plus left and right side speakers(SL, SR)
967761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
967861847f8eSopenharmony_ci     * @since 11
967961847f8eSopenharmony_ci     */
968061847f8eSopenharmony_ci    CH_LAYOUT_QUAD_SIDE = 0x603,
968161847f8eSopenharmony_ci    /**
968261847f8eSopenharmony_ci     * Channel Layout For 2.0.2, 4 channels in total
968361847f8eSopenharmony_ci     * Speaker layout: Stereo plus left and right top side speakers
968461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
968561847f8eSopenharmony_ci     * @since 11
968661847f8eSopenharmony_ci     */
968761847f8eSopenharmony_ci    /**
968861847f8eSopenharmony_ci     * Channel Layout For 2.0.2, 4 channels in total
968961847f8eSopenharmony_ci     * Speaker layout: Stereo plus left and right top side speakers
969061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
969161847f8eSopenharmony_ci     * @crossplatform
969261847f8eSopenharmony_ci     * @since 12
969361847f8eSopenharmony_ci     */
969461847f8eSopenharmony_ci    CH_LAYOUT_2POINT0POINT2 = 0x3000000003,
969561847f8eSopenharmony_ci    /**
969661847f8eSopenharmony_ci     * Channel Layout For ORDER1-ACN-N3D First Order Ambisonic(FOA), 4 channels in total
969761847f8eSopenharmony_ci     * First order, Ambisonic Channel Number(ACN) format, Normalization of three-D(N3D)
969861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
969961847f8eSopenharmony_ci     * @since 11
970061847f8eSopenharmony_ci     */
970161847f8eSopenharmony_ci    CH_LAYOUT_AMB_ORDER1_ACN_N3D = 0x100000000001,
970261847f8eSopenharmony_ci    /**
970361847f8eSopenharmony_ci     * Channel Layout For ORDER1-ACN-SN3D FOA, 4 channels in total
970461847f8eSopenharmony_ci     * First order, ACN format, Semi-Normalization of three-D(SN3D)
970561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
970661847f8eSopenharmony_ci     * @since 11
970761847f8eSopenharmony_ci     */
970861847f8eSopenharmony_ci    CH_LAYOUT_AMB_ORDER1_ACN_SN3D = 0x100000001001,
970961847f8eSopenharmony_ci    /**
971061847f8eSopenharmony_ci     * Channel Layout For ORDER1-FUMA FOA, 4 channels in total
971161847f8eSopenharmony_ci     * First order, Furse-Malham(FuMa) format
971261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
971361847f8eSopenharmony_ci     * @since 11
971461847f8eSopenharmony_ci     */
971561847f8eSopenharmony_ci    CH_LAYOUT_AMB_ORDER1_FUMA = 0x100000000101,
971661847f8eSopenharmony_ci    /**
971761847f8eSopenharmony_ci     * Channel Layout For 4.1, 5 channels in total
971861847f8eSopenharmony_ci     * Speaker layout: 4.0 plus LFE
971961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
972061847f8eSopenharmony_ci     * @since 11
972161847f8eSopenharmony_ci     */
972261847f8eSopenharmony_ci    /**
972361847f8eSopenharmony_ci     * Channel Layout For 4.1, 5 channels in total
972461847f8eSopenharmony_ci     * Speaker layout: 4.0 plus LFE
972561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
972661847f8eSopenharmony_ci     * @crossplatform
972761847f8eSopenharmony_ci     * @since 12
972861847f8eSopenharmony_ci     */
972961847f8eSopenharmony_ci    CH_LAYOUT_4POINT1 = 0x10F,
973061847f8eSopenharmony_ci    /**
973161847f8eSopenharmony_ci     * Channel Layout For 5.0, 5 channels in total
973261847f8eSopenharmony_ci     * Speaker layout: Surround plus two side speakers
973361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
973461847f8eSopenharmony_ci     * @since 11
973561847f8eSopenharmony_ci     */
973661847f8eSopenharmony_ci    /**
973761847f8eSopenharmony_ci     * Channel Layout For 5.0, 5 channels in total
973861847f8eSopenharmony_ci     * Speaker layout: Surround plus two side speakers
973961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
974061847f8eSopenharmony_ci     * @crossplatform
974161847f8eSopenharmony_ci     * @since 12
974261847f8eSopenharmony_ci     */
974361847f8eSopenharmony_ci    CH_LAYOUT_5POINT0 = 0x607,
974461847f8eSopenharmony_ci    /**
974561847f8eSopenharmony_ci     * Channel Layout For 5.0-Back, 5 channels in total
974661847f8eSopenharmony_ci     * Speaker layout: Surround plus two back speakers
974761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
974861847f8eSopenharmony_ci     * @since 11
974961847f8eSopenharmony_ci     */
975061847f8eSopenharmony_ci    CH_LAYOUT_5POINT0_BACK = 0x37,
975161847f8eSopenharmony_ci    /**
975261847f8eSopenharmony_ci     * Channel Layout For 2.1.2, 5 channels in total
975361847f8eSopenharmony_ci     * Speaker layout: 2.0.2 plus LFE
975461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
975561847f8eSopenharmony_ci     * @since 11
975661847f8eSopenharmony_ci     */
975761847f8eSopenharmony_ci    CH_LAYOUT_2POINT1POINT2 = 0x300000000B,
975861847f8eSopenharmony_ci    /**
975961847f8eSopenharmony_ci     * Channel Layout For 3.0.2, 5 channels in total
976061847f8eSopenharmony_ci     * Speaker layout: 2.0.2 plus FC
976161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
976261847f8eSopenharmony_ci     * @since 11
976361847f8eSopenharmony_ci     */
976461847f8eSopenharmony_ci    CH_LAYOUT_3POINT0POINT2 = 0x3000000007,
976561847f8eSopenharmony_ci    /**
976661847f8eSopenharmony_ci     * Channel Layout For 5.1, 6 channels in total
976761847f8eSopenharmony_ci     * Speaker layout: 5.0 plus LFE
976861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
976961847f8eSopenharmony_ci     * @since 11
977061847f8eSopenharmony_ci     */
977161847f8eSopenharmony_ci    /**
977261847f8eSopenharmony_ci     * Channel Layout For 5.1, 6 channels in total
977361847f8eSopenharmony_ci     * Speaker layout: 5.0 plus LFE
977461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
977561847f8eSopenharmony_ci     * @crossplatform
977661847f8eSopenharmony_ci     * @since 12
977761847f8eSopenharmony_ci     */
977861847f8eSopenharmony_ci    CH_LAYOUT_5POINT1 = 0x60F,
977961847f8eSopenharmony_ci    /**
978061847f8eSopenharmony_ci     * Channel Layout For 5.1-Back, 6 channels in total
978161847f8eSopenharmony_ci     * Speaker layout: 5.0-Back plus LFE
978261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
978361847f8eSopenharmony_ci     * @since 11
978461847f8eSopenharmony_ci     */
978561847f8eSopenharmony_ci    CH_LAYOUT_5POINT1_BACK = 0x3F,
978661847f8eSopenharmony_ci    /**
978761847f8eSopenharmony_ci     * Channel Layout For 6.0, 6 channels in total
978861847f8eSopenharmony_ci     * Speaker layout: 5.0 plus BC
978961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
979061847f8eSopenharmony_ci     * @since 11
979161847f8eSopenharmony_ci     */
979261847f8eSopenharmony_ci    /**
979361847f8eSopenharmony_ci     * Channel Layout For 6.0, 6 channels in total
979461847f8eSopenharmony_ci     * Speaker layout: 5.0 plus BC
979561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
979661847f8eSopenharmony_ci     * @crossplatform
979761847f8eSopenharmony_ci     * @since 12
979861847f8eSopenharmony_ci     */
979961847f8eSopenharmony_ci    CH_LAYOUT_6POINT0 = 0x707,
980061847f8eSopenharmony_ci    /**
980161847f8eSopenharmony_ci     * Channel Layout For Hexagonal, 6 channels in total
980261847f8eSopenharmony_ci     * Speaker layout: 5.0-Back plus BC
980361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
980461847f8eSopenharmony_ci     * @since 11
980561847f8eSopenharmony_ci     */
980661847f8eSopenharmony_ci    /**
980761847f8eSopenharmony_ci     * Channel Layout For Hexagonal, 6 channels in total
980861847f8eSopenharmony_ci     * Speaker layout: 5.0-Back plus BC
980961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
981061847f8eSopenharmony_ci     * @crossplatform
981161847f8eSopenharmony_ci     * @since 12
981261847f8eSopenharmony_ci     */
981361847f8eSopenharmony_ci    CH_LAYOUT_HEXAGONAL = 0x137,
981461847f8eSopenharmony_ci    /**
981561847f8eSopenharmony_ci     * Channel Layout For 3.1.2, 6 channels in total
981661847f8eSopenharmony_ci     * Speaker layout: 3.1 plus two top front speakers(TFL, TFR)
981761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
981861847f8eSopenharmony_ci     * @since 11
981961847f8eSopenharmony_ci     */
982061847f8eSopenharmony_ci    CH_LAYOUT_3POINT1POINT2 = 0x500F,
982161847f8eSopenharmony_ci    /**
982261847f8eSopenharmony_ci     * Channel Layout For 6.0-Front, 6 channels in total
982361847f8eSopenharmony_ci     * Speaker layout: Quad-Side plus left and right front center speakers(FLC, FRC)
982461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
982561847f8eSopenharmony_ci     * @since 11
982661847f8eSopenharmony_ci     */
982761847f8eSopenharmony_ci    CH_LAYOUT_6POINT0_FRONT = 0x6C3,
982861847f8eSopenharmony_ci    /**
982961847f8eSopenharmony_ci     * Channel Layout For 6.1, 7 channels in total
983061847f8eSopenharmony_ci     * Speaker layout: 5.1 plus BC
983161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
983261847f8eSopenharmony_ci     * @since 11
983361847f8eSopenharmony_ci     */
983461847f8eSopenharmony_ci    /**
983561847f8eSopenharmony_ci     * Channel Layout For 6.1, 7 channels in total
983661847f8eSopenharmony_ci     * Speaker layout: 5.1 plus BC
983761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
983861847f8eSopenharmony_ci     * @crossplatform
983961847f8eSopenharmony_ci     * @since 12
984061847f8eSopenharmony_ci     */
984161847f8eSopenharmony_ci    CH_LAYOUT_6POINT1 = 0x70F,
984261847f8eSopenharmony_ci    /**
984361847f8eSopenharmony_ci     * Channel Layout For 6.1-Back, 7 channels in total
984461847f8eSopenharmony_ci     * Speaker layout: 5.1-Back plus BC
984561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
984661847f8eSopenharmony_ci     * @since 11
984761847f8eSopenharmony_ci     */
984861847f8eSopenharmony_ci    CH_LAYOUT_6POINT1_BACK = 0x13F,
984961847f8eSopenharmony_ci    /**
985061847f8eSopenharmony_ci     * Channel Layout For 6.1-Front, 7 channels in total
985161847f8eSopenharmony_ci     * Speaker layout: 6.0-Front plus LFE
985261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
985361847f8eSopenharmony_ci     * @since 11
985461847f8eSopenharmony_ci     */
985561847f8eSopenharmony_ci    CH_LAYOUT_6POINT1_FRONT = 0x6CB,
985661847f8eSopenharmony_ci    /**
985761847f8eSopenharmony_ci     * Channel Layout For 7.0, 7 channels in total
985861847f8eSopenharmony_ci     * Speaker layout: 5.0 plus two back speakers
985961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
986061847f8eSopenharmony_ci     * @since 11
986161847f8eSopenharmony_ci     */
986261847f8eSopenharmony_ci    /**
986361847f8eSopenharmony_ci     * Channel Layout For 7.0, 7 channels in total
986461847f8eSopenharmony_ci     * Speaker layout: 5.0 plus two back speakers
986561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
986661847f8eSopenharmony_ci     * @crossplatform
986761847f8eSopenharmony_ci     * @since 12
986861847f8eSopenharmony_ci     */
986961847f8eSopenharmony_ci    CH_LAYOUT_7POINT0 = 0x637,
987061847f8eSopenharmony_ci    /**
987161847f8eSopenharmony_ci     * Channel Layout For 7.0-Front, 7 channels in total
987261847f8eSopenharmony_ci     * Speaker layout: 5.0 plus left and right front center speakers
987361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
987461847f8eSopenharmony_ci     * @since 11
987561847f8eSopenharmony_ci     */
987661847f8eSopenharmony_ci    /**
987761847f8eSopenharmony_ci     * Channel Layout For 7.0-Front, 7 channels in total
987861847f8eSopenharmony_ci     * Speaker layout: 5.0 plus left and right front center speakers
987961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
988061847f8eSopenharmony_ci     * @crossplatform
988161847f8eSopenharmony_ci     * @since 12
988261847f8eSopenharmony_ci     */
988361847f8eSopenharmony_ci    CH_LAYOUT_7POINT0_FRONT = 0x6C7,
988461847f8eSopenharmony_ci    /**
988561847f8eSopenharmony_ci     * Channel Layout For 7.1, 8 channels in total
988661847f8eSopenharmony_ci     * Speaker layout: 5.1 plus two back speakers
988761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
988861847f8eSopenharmony_ci     * @since 11
988961847f8eSopenharmony_ci     */
989061847f8eSopenharmony_ci    /**
989161847f8eSopenharmony_ci     * Channel Layout For 7.1, 8 channels in total
989261847f8eSopenharmony_ci     * Speaker layout: 5.1 plus two back speakers
989361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
989461847f8eSopenharmony_ci     * @crossplatform
989561847f8eSopenharmony_ci     * @since 12
989661847f8eSopenharmony_ci     */
989761847f8eSopenharmony_ci    CH_LAYOUT_7POINT1 = 0x63F,
989861847f8eSopenharmony_ci    /**
989961847f8eSopenharmony_ci     * Channel Layout For Octagonal, 8 channels in total
990061847f8eSopenharmony_ci     * Speaker layout: 5.0 plus BL, BR and BC.
990161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
990261847f8eSopenharmony_ci     * @since 11
990361847f8eSopenharmony_ci     */
990461847f8eSopenharmony_ci    /**
990561847f8eSopenharmony_ci     * Channel Layout For Octagonal, 8 channels in total
990661847f8eSopenharmony_ci     * Speaker layout: 5.0 plus BL, BR and BC.
990761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
990861847f8eSopenharmony_ci     * @crossplatform
990961847f8eSopenharmony_ci     * @since 12
991061847f8eSopenharmony_ci     */
991161847f8eSopenharmony_ci    CH_LAYOUT_OCTAGONAL = 0x737,
991261847f8eSopenharmony_ci    /**
991361847f8eSopenharmony_ci     * Channel Layout For 5.1.2, 8 channels in total
991461847f8eSopenharmony_ci     * Speaker layout: 5.1 plus two top side speakers.
991561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
991661847f8eSopenharmony_ci     * @since 11
991761847f8eSopenharmony_ci     */
991861847f8eSopenharmony_ci    /**
991961847f8eSopenharmony_ci     * Channel Layout For 5.1.2, 8 channels in total
992061847f8eSopenharmony_ci     * Speaker layout: 5.1 plus two top side speakers.
992161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
992261847f8eSopenharmony_ci     * @crossplatform
992361847f8eSopenharmony_ci     * @since 12
992461847f8eSopenharmony_ci     */
992561847f8eSopenharmony_ci    CH_LAYOUT_5POINT1POINT2 = 0x300000060F,
992661847f8eSopenharmony_ci    /**
992761847f8eSopenharmony_ci     * Channel Layout For 7.1-Wide, 8 channels in total
992861847f8eSopenharmony_ci     * Speaker layout: 5.1 plus left and right front center speakers.
992961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
993061847f8eSopenharmony_ci     * @since 11
993161847f8eSopenharmony_ci     */
993261847f8eSopenharmony_ci    CH_LAYOUT_7POINT1_WIDE = 0x6CF,
993361847f8eSopenharmony_ci    /**
993461847f8eSopenharmony_ci     * Channel Layout For 7.1-Wide, 8 channels in total
993561847f8eSopenharmony_ci     * Speaker layout: 5.1-Back plus left and right front center speakers.
993661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
993761847f8eSopenharmony_ci     * @since 11
993861847f8eSopenharmony_ci     */
993961847f8eSopenharmony_ci    CH_LAYOUT_7POINT1_WIDE_BACK = 0xFF,
994061847f8eSopenharmony_ci    /**
994161847f8eSopenharmony_ci     * Channel Layout For ORDER2-ACN-N3D Higher Order Ambisonics(HOA), 9 channels in total
994261847f8eSopenharmony_ci     * Second order, ACN format, N3D
994361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
994461847f8eSopenharmony_ci     * @since 11
994561847f8eSopenharmony_ci     */
994661847f8eSopenharmony_ci    CH_LAYOUT_AMB_ORDER2_ACN_N3D = 0x100000000002,
994761847f8eSopenharmony_ci    /**
994861847f8eSopenharmony_ci     * Channel Layout For ORDER2-ACN-SN3D HOA, 9 channels in total
994961847f8eSopenharmony_ci     * Second order, ACN format, SN3D
995061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
995161847f8eSopenharmony_ci     * @since 11
995261847f8eSopenharmony_ci     */
995361847f8eSopenharmony_ci    CH_LAYOUT_AMB_ORDER2_ACN_SN3D = 0x100000001002,
995461847f8eSopenharmony_ci    /**
995561847f8eSopenharmony_ci     * Channel Layout For ORDER2-FUMA HOA, 9 channels in total
995661847f8eSopenharmony_ci     * Second order, FuMa format
995761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
995861847f8eSopenharmony_ci     * @since 11
995961847f8eSopenharmony_ci     */
996061847f8eSopenharmony_ci    CH_LAYOUT_AMB_ORDER2_FUMA = 0x100000000102,
996161847f8eSopenharmony_ci    /**
996261847f8eSopenharmony_ci     * Channel Layout For 5.1.4, 10 channels in total
996361847f8eSopenharmony_ci     * Speaker layout: 5.1 plus four top speakers(TFL, TFR, TBL, TBR)
996461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
996561847f8eSopenharmony_ci     * @since 11
996661847f8eSopenharmony_ci     */
996761847f8eSopenharmony_ci    /**
996861847f8eSopenharmony_ci     * Channel Layout For 5.1.4, 10 channels in total
996961847f8eSopenharmony_ci     * Speaker layout: 5.1 plus four top speakers(TFL, TFR, TBL, TBR)
997061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
997161847f8eSopenharmony_ci     * @crossplatform
997261847f8eSopenharmony_ci     * @since 12
997361847f8eSopenharmony_ci     */
997461847f8eSopenharmony_ci    CH_LAYOUT_5POINT1POINT4 = 0x2D60F,
997561847f8eSopenharmony_ci    /**
997661847f8eSopenharmony_ci     * Channel Layout For 7.1.2, 10 channels in total
997761847f8eSopenharmony_ci     * Speaker layout: 7.1 plus two top side speakers
997861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
997961847f8eSopenharmony_ci     * @since 11
998061847f8eSopenharmony_ci     */
998161847f8eSopenharmony_ci    /**
998261847f8eSopenharmony_ci     * Channel Layout For 7.1.2, 10 channels in total
998361847f8eSopenharmony_ci     * Speaker layout: 7.1 plus two top side speakers
998461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
998561847f8eSopenharmony_ci     * @crossplatform
998661847f8eSopenharmony_ci     * @since 12
998761847f8eSopenharmony_ci     */
998861847f8eSopenharmony_ci    CH_LAYOUT_7POINT1POINT2 = 0x300000063F,
998961847f8eSopenharmony_ci    /**
999061847f8eSopenharmony_ci     * Channel Layout For 7.1.4, 12 channels in total
999161847f8eSopenharmony_ci     * Speaker layout: 7.1 plus four top speakers
999261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
999361847f8eSopenharmony_ci     * @since 11
999461847f8eSopenharmony_ci     */
999561847f8eSopenharmony_ci    /**
999661847f8eSopenharmony_ci     * Channel Layout For 7.1.4, 12 channels in total
999761847f8eSopenharmony_ci     * Speaker layout: 7.1 plus four top speakers
999861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
999961847f8eSopenharmony_ci     * @crossplatform
1000061847f8eSopenharmony_ci     * @since 12
1000161847f8eSopenharmony_ci     */
1000261847f8eSopenharmony_ci    CH_LAYOUT_7POINT1POINT4 = 0x2D63F,
1000361847f8eSopenharmony_ci    /**
1000461847f8eSopenharmony_ci     * Channel Layout For 10.2, 12 channels in total
1000561847f8eSopenharmony_ci     * Speaker layout: FL, FR, FC, TFL, TFR, BL, BR, BC, SL, SR, wide left(WL), and wide right(WR)
1000661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1000761847f8eSopenharmony_ci     * @since 11
1000861847f8eSopenharmony_ci     */
1000961847f8eSopenharmony_ci    /**
1001061847f8eSopenharmony_ci     * Channel Layout For 10.2, 12 channels in total
1001161847f8eSopenharmony_ci     * Speaker layout: FL, FR, FC, TFL, TFR, BL, BR, BC, SL, SR, wide left(WL), and wide right(WR)
1001261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1001361847f8eSopenharmony_ci     * @crossplatform
1001461847f8eSopenharmony_ci     * @since 12
1001561847f8eSopenharmony_ci     */
1001661847f8eSopenharmony_ci    CH_LAYOUT_10POINT2 = 0x180005737,
1001761847f8eSopenharmony_ci    /**
1001861847f8eSopenharmony_ci     * Channel Layout For 9.1.4, 14 channels in total
1001961847f8eSopenharmony_ci     * Speaker layout: 7.1.4 plus two wide speakers(WL, WR)
1002061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1002161847f8eSopenharmony_ci     * @since 11
1002261847f8eSopenharmony_ci     */
1002361847f8eSopenharmony_ci    CH_LAYOUT_9POINT1POINT4 = 0x18002D63F,
1002461847f8eSopenharmony_ci    /**
1002561847f8eSopenharmony_ci     * Channel Layout For 9.1.6, 16 channels in total
1002661847f8eSopenharmony_ci     * Speaker layout: 9.1.4 plus two top side speakers
1002761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1002861847f8eSopenharmony_ci     * @since 11
1002961847f8eSopenharmony_ci     */
1003061847f8eSopenharmony_ci    /**
1003161847f8eSopenharmony_ci     * Channel Layout For 9.1.6, 16 channels in total
1003261847f8eSopenharmony_ci     * Speaker layout: 9.1.4 plus two top side speakers
1003361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1003461847f8eSopenharmony_ci     * @crossplatform
1003561847f8eSopenharmony_ci     * @since 12
1003661847f8eSopenharmony_ci     */
1003761847f8eSopenharmony_ci    CH_LAYOUT_9POINT1POINT6 = 0x318002D63F,
1003861847f8eSopenharmony_ci    /**
1003961847f8eSopenharmony_ci     * Channel Layout For Hexadecagonal, 16 channels in total
1004061847f8eSopenharmony_ci     * Speaker layout: Octagonal plus two wide speakers, six top speakers(TFL, TFR, TFC, TBL, TBR, TBC)
1004161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1004261847f8eSopenharmony_ci     * @since 11
1004361847f8eSopenharmony_ci     */
1004461847f8eSopenharmony_ci    /**
1004561847f8eSopenharmony_ci     * Channel Layout For Hexadecagonal, 16 channels in total
1004661847f8eSopenharmony_ci     * Speaker layout: Octagonal plus two wide speakers, six top speakers(TFL, TFR, TFC, TBL, TBR, TBC)
1004761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1004861847f8eSopenharmony_ci     * @crossplatform
1004961847f8eSopenharmony_ci     * @since 12
1005061847f8eSopenharmony_ci     */
1005161847f8eSopenharmony_ci    CH_LAYOUT_HEXADECAGONAL = 0x18003F737,
1005261847f8eSopenharmony_ci    /**
1005361847f8eSopenharmony_ci     * Channel Layout For ORDER3-ACN-N3D HOA, 16 channels in total
1005461847f8eSopenharmony_ci     * Third order, ACN format, N3D
1005561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1005661847f8eSopenharmony_ci     * @since 11
1005761847f8eSopenharmony_ci     */
1005861847f8eSopenharmony_ci    /**
1005961847f8eSopenharmony_ci     * Channel Layout For ORDER3-ACN-N3D HOA, 16 channels in total
1006061847f8eSopenharmony_ci     * Third order, ACN format, N3D
1006161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1006261847f8eSopenharmony_ci     * @crossplatform
1006361847f8eSopenharmony_ci     * @since 12
1006461847f8eSopenharmony_ci     */
1006561847f8eSopenharmony_ci    CH_LAYOUT_AMB_ORDER3_ACN_N3D = 0x100000000003,
1006661847f8eSopenharmony_ci    /**
1006761847f8eSopenharmony_ci     * Channel Layout For ORDER3-ACN-SN3D HOA, 16 channels in total
1006861847f8eSopenharmony_ci     * Third order, ACN format, N3D
1006961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1007061847f8eSopenharmony_ci     * @since 11
1007161847f8eSopenharmony_ci     */
1007261847f8eSopenharmony_ci    /**
1007361847f8eSopenharmony_ci     * Channel Layout For ORDER3-ACN-SN3D HOA, 16 channels in total
1007461847f8eSopenharmony_ci     * Third order, ACN format, N3D
1007561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1007661847f8eSopenharmony_ci     * @crossplatform
1007761847f8eSopenharmony_ci     * @since 12
1007861847f8eSopenharmony_ci     */
1007961847f8eSopenharmony_ci    CH_LAYOUT_AMB_ORDER3_ACN_SN3D = 0x100000001003,
1008061847f8eSopenharmony_ci    /**
1008161847f8eSopenharmony_ci     * Channel Layout For ORDER3-FUMA HOA, 16 channels in total
1008261847f8eSopenharmony_ci     * Third order, FuMa format
1008361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.Audio.Core
1008461847f8eSopenharmony_ci     * @since 11
1008561847f8eSopenharmony_ci     */
1008661847f8eSopenharmony_ci    CH_LAYOUT_AMB_ORDER3_FUMA = 0x100000000103
1008761847f8eSopenharmony_ci  }
1008861847f8eSopenharmony_ci}
1008961847f8eSopenharmony_ci
1009061847f8eSopenharmony_ciexport default audio;
10091