diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 4e9a3a755fa186cdd5ba14a4940316d66ec65023..1207a070e127bb41cd0432c0379f93a3d74de6ad 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -35,16 +35,17 @@ import { ErrorCallback, AsyncCallback, Callback } from './@ohos.base'; declare namespace audio { /** * Enumerates audio errors. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 9 */ /** * Enumerates audio errors. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioErrors { /** @@ -56,7 +57,8 @@ declare namespace audio { * Invalid parameter. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_INVALID_PARAM = 6800101, /** @@ -68,7 +70,8 @@ declare namespace audio { * Allocate memory failed. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_NO_MEMORY = 6800102, /** @@ -80,7 +83,8 @@ declare namespace audio { * Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_ILLEGAL_STATE = 6800103, /** @@ -92,19 +96,22 @@ declare namespace audio { * Unsupported option. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_UNSUPPORTED = 6800104, /** * Time out. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_TIMEOUT = 6800105, /** * Audio specific errors. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_STREAM_LIMIT = 6800201, /** @@ -116,7 +123,8 @@ declare namespace audio { * Default error. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_SYSTEM = 6800301 } @@ -125,7 +133,8 @@ declare namespace audio { * Define local device network id for audio * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ const LOCAL_NETWORK_ID: string; @@ -138,16 +147,18 @@ declare namespace audio { * Define default volume group id for audio * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - const DEFAULT_VOLUME_GROUP_ID: number; + const DEFAULT_VOLUME_GROUP_ID: int; /** * Define default interrupt group id for audio * @syscap SystemCapability.Multimedia.Audio.Interrupt - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - const DEFAULT_INTERRUPT_GROUP_ID: number; + const DEFAULT_INTERRUPT_GROUP_ID: int; /** * Obtains an {@link AudioManager} instance. @@ -182,7 +193,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the audio capturer instance. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createAudioCapturer(options: AudioCapturerOptions, callback: AsyncCallback): void; @@ -203,7 +215,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the audio capturer instance. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createAudioCapturer(options: AudioCapturerOptions): Promise; @@ -220,7 +233,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the audio renderer instance. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createAudioRenderer(options: AudioRendererOptions, callback: AsyncCallback): void; @@ -237,7 +251,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the audio renderer instance. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createAudioRenderer(options: AudioRendererOptions): Promise; @@ -247,7 +262,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the tonePlayer instance. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function createTonePlayer(options: AudioRendererInfo, callback: AsyncCallback): void; @@ -257,19 +273,20 @@ declare namespace audio { * @returns { Promise } Promise used to return the tonePlayer instance. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function createTonePlayer(options: AudioRendererInfo): Promise; /** * Enumerates the audio states. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates the audio states. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} @@ -371,13 +388,13 @@ declare namespace audio { /** * Enumerates audio stream types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @since 7 */ /** * Enumerates audio stream types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} @@ -449,6 +466,14 @@ declare namespace audio { * @arkts 1.1&1.2 */ ACCESSIBILITY = 5, + /** + * Audio volume for system sound. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + SYSTEM = 6, /** * Audio stream for voice assistant. * @syscap SystemCapability.Multimedia.Audio.Volume @@ -476,13 +501,13 @@ declare namespace audio { /** * Enumerates audio device flags. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 7 */ /** * Enumerates audio device flags. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} @@ -564,7 +589,7 @@ declare namespace audio { /** * Enumerates audio device for usage. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 @@ -616,13 +641,13 @@ declare namespace audio { /** * Enumerates device roles. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 7 */ /** * Enumerates device roles. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice @@ -662,13 +687,13 @@ declare namespace audio { /** * Enumerates device types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 7 */ /** * Enumerates device types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice @@ -891,16 +916,17 @@ declare namespace audio { /** * Enumerates the available device types for communication. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @since 9 */ /** * Enumerates the available device types for communication. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum CommunicationDeviceType { /** @@ -912,20 +938,21 @@ declare namespace audio { * Speaker. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEAKER = 2 } /** * Enumerates ringer modes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @since 7 */ /** * Enumerates ringer modes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} @@ -975,7 +1002,7 @@ declare namespace audio { /** * Enumerates type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi * @since arkts {'1.1':'12','1.2':'20'} @@ -1002,16 +1029,17 @@ declare namespace audio { /** * Enumerates the audio sample formats. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates the audio sample formats. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioSampleFormat { /** @@ -1023,7 +1051,8 @@ declare namespace audio { * Invalid format. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_INVALID = -1, /** @@ -1035,7 +1064,8 @@ declare namespace audio { * Unsigned 8 format. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_U8 = 0, /** @@ -1047,7 +1077,8 @@ declare namespace audio { * Signed 16 bit integer, little endian. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_S16LE = 1, /** @@ -1059,7 +1090,8 @@ declare namespace audio { * Signed 24 bit integer, little endian. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_S24LE = 2, /** @@ -1071,7 +1103,8 @@ declare namespace audio { * Signed 32 bit integer, little endian. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_S32LE = 3, /** @@ -1083,23 +1116,25 @@ declare namespace audio { * Signed 32 bit float, little endian. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_F32LE = 4, } /** * Enumerates the audio channel. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates the audio channel. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioChannel { /** @@ -1111,7 +1146,8 @@ declare namespace audio { * Channel 1. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_1 = 1, /** @@ -1123,7 +1159,8 @@ declare namespace audio { * Channel 2. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_2 = 2, /** @@ -1135,7 +1172,8 @@ declare namespace audio { * Channel 3. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_3 = 3, /** @@ -1147,7 +1185,8 @@ declare namespace audio { * Channel 4. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_4 = 4, /** @@ -1159,7 +1198,8 @@ declare namespace audio { * Channel 5. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_5 = 5, /** @@ -1171,7 +1211,8 @@ declare namespace audio { * Channel 6. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_6 = 6, /** @@ -1183,7 +1224,8 @@ declare namespace audio { * Channel 7. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_7 = 7, /** @@ -1195,7 +1237,8 @@ declare namespace audio { * Channel 8. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_8 = 8, /** @@ -1207,7 +1250,8 @@ declare namespace audio { * Channel 9. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_9 = 9, /** @@ -1219,7 +1263,8 @@ declare namespace audio { * Channel 10. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_10 = 10, /** @@ -1231,7 +1276,8 @@ declare namespace audio { * Channel 12. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_12 = 12, /** @@ -1243,7 +1289,8 @@ declare namespace audio { * Channel 14. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_14 = 14, /** @@ -1255,23 +1302,25 @@ declare namespace audio { * Channel 16. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_16 = 16 } /** * Enumerates the audio sampling rate. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates the audio sampling rate. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioSamplingRate { /** @@ -1283,7 +1332,8 @@ declare namespace audio { * 8kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_8000 = 8000, /** @@ -1295,7 +1345,8 @@ declare namespace audio { * 11.025kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_11025 = 11025, /** @@ -1307,7 +1358,8 @@ declare namespace audio { * 12kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_12000 = 12000, /** @@ -1319,7 +1371,8 @@ declare namespace audio { * 16kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_16000 = 16000, /** @@ -1331,7 +1384,8 @@ declare namespace audio { * 22.05kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_22050 = 22050, /** @@ -1343,7 +1397,8 @@ declare namespace audio { * 24kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_24000 = 24000, /** @@ -1355,7 +1410,8 @@ declare namespace audio { * 32kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_32000 = 32000, /** @@ -1367,7 +1423,8 @@ declare namespace audio { * 44.1kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_44100 = 44100, /** @@ -1379,7 +1436,8 @@ declare namespace audio { * 48kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_48000 = 48000, /** @@ -1391,13 +1449,15 @@ declare namespace audio { * 64kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_64000 = 64000, /** * 88.2kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_88200 = 88200, /** @@ -1409,32 +1469,35 @@ declare namespace audio { * 96kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_96000 = 96000, /** * 176.4kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_176400 = 176400, /** * 192kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_192000 = 192000 } /** * Enumerates the audio encoding type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates the audio encoding type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice @@ -1533,13 +1596,13 @@ declare namespace audio { /** * Enumerates the stream usage. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 7 */ /** * Enumerates the stream usage. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice @@ -1799,17 +1862,19 @@ declare namespace audio { /** * Enumerates the audio interrupt request type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum InterruptRequestType { /** * Default type to request audio interrupt. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_REQUEST_TYPE_DEFAULT = 0, } @@ -1817,17 +1882,19 @@ declare namespace audio { /** * Enumerates volume related operations. * Flags should be powers of 2! - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum VolumeFlag { /** * Show system volume bar. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_SHOW_SYSTEM_UI = 1, } @@ -1843,7 +1910,8 @@ declare namespace audio { * @typedef AudioStreamInfo * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioStreamInfo { /** @@ -1857,7 +1925,8 @@ declare namespace audio { * @type { AudioSamplingRate } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ samplingRate: AudioSamplingRate; /** @@ -1871,7 +1940,8 @@ declare namespace audio { * @type { AudioChannel } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ channels: AudioChannel; /** @@ -1885,7 +1955,8 @@ declare namespace audio { * @type { AudioSampleFormat } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sampleFormat: AudioSampleFormat; /** @@ -1899,7 +1970,8 @@ declare namespace audio { * @type { AudioEncodingType } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ encodingType: AudioEncodingType; /** @@ -1913,7 +1985,8 @@ declare namespace audio { * @type { ?AudioChannelLayout } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ channelLayout?: AudioChannelLayout; } @@ -1967,20 +2040,29 @@ declare namespace audio { usage: StreamUsage; /** * Audio renderer flags. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Audio renderer flags. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - rendererFlags: number; + rendererFlags: int; + /** + * Audio volume mode config. If volumeMode is set to {@link AudioVolumeMode.APP_INDIVIDUAL}, this audio renderer + * will be affeted by app volume percentage setted by {@link setAppVolumePercentage} + * @type { ?AudioVolumeMode } + * @syscap SystemCapability.Multimedia.Audio.Volume + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + volumeMode?: AudioVolumeMode; } /** @@ -1988,47 +2070,81 @@ declare namespace audio { * @typedef AudioRendererFilter * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioRendererFilter { /** * Application uid. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - uid?: number; + uid?: int; /** * Renderer information. * @type { ?AudioRendererInfo } * @syscap SystemCapability.Multimedia.Audio.Renderer * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ rendererInfo?: AudioRendererInfo; /** * AudioRenderer id. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - rendererId?: number; + rendererId?: int; } /** - * Describes audio renderer configuration options. - * @typedef AudioRendererOptions - * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 8 + * Describe audio capturer filter. + * @typedef AudioCapturerFilter + * @syscap SystemCapability.Multimedia.Audio.Core + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - /** - * Describes audio renderer configuration options. + interface AudioCapturerFilter { + /** + * Application uid. + * @type { ?int } + * @syscap SystemCapability.Multimedia.Audio.Core + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + uid?: int; + /** + * Capturer information. + * @type { ?AudioCapturerInfo } + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + capturerInfo?: AudioCapturerInfo; + } + + /** + * Describes audio renderer configuration options. + * @typedef AudioRendererOptions + * @syscap SystemCapability.Multimedia.Audio.Renderer + * @since 8 + */ + /** + * Describes audio renderer configuration options. * @typedef AudioRendererOptions * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioRendererOptions { /** @@ -2042,7 +2158,8 @@ declare namespace audio { * @type { AudioStreamInfo } * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ streamInfo: AudioStreamInfo; /** @@ -2056,7 +2173,8 @@ declare namespace audio { * @type { AudioRendererInfo } * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rendererInfo: AudioRendererInfo; /** @@ -2070,23 +2188,25 @@ declare namespace audio { * @type { ?AudioPrivacyType } * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ privacyType?: AudioPrivacyType; } /** * Enumerates audio stream privacy type for playback capture. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture * @since 10 */ /** * Enumerates audio stream privacy type for playback capture. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioPrivacyType { /** @@ -2098,7 +2218,8 @@ declare namespace audio { * Privacy type that stream can be captured by third party applications. * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIVACY_TYPE_PUBLIC = 0, @@ -2111,20 +2232,21 @@ declare namespace audio { * Privacy type that stream can not be captured. * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIVACY_TYPE_PRIVATE = 1, } /** * Enumerates the interrupt modes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @since 9 */ /** * Enumerates the interrupt modes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform * @atomicservice @@ -2164,40 +2286,44 @@ declare namespace audio { /** * Enumerates the audio renderer rates. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioRendererRate { /** * Normal rate. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ RENDER_RATE_NORMAL = 0, /** * Double rate. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ RENDER_RATE_DOUBLE = 1, /** * Half rate. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ RENDER_RATE_HALF = 2 } /** * Enumerates the interrupt types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 7 */ /** * Enumerates the interrupt types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice @@ -2238,13 +2364,13 @@ declare namespace audio { /** * Enumerates the interrupt hints. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 7 */ /** * Enumerates the interrupt hints. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice @@ -2261,7 +2387,8 @@ declare namespace audio { * None. * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_HINT_NONE = 0, /** @@ -2316,7 +2443,8 @@ declare namespace audio { * Ducked the playback. (In ducking, the audio volume is reduced, but not silenced.) * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_HINT_DUCK = 4, @@ -2329,20 +2457,21 @@ declare namespace audio { * Unducked the playback. * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_HINT_UNDUCK = 5, } /** * Enumerates the interrupt force types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Enumerates the interrupt force types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice @@ -2424,7 +2553,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ forceType: InterruptForceType; @@ -2474,13 +2604,13 @@ declare namespace audio { /** * Enumerates device change types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 7 */ /** * Enumerates device change types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} @@ -2518,13 +2648,13 @@ declare namespace audio { /** * Enumerates audio scenes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @since 8 */ /** * Enumerates audio scenes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} @@ -2575,7 +2705,7 @@ declare namespace audio { /** * Enumerates volume adjustment types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi * @since arkts {'1.1':'10','1.2':'20'} @@ -2929,7 +3059,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setExtraParameters(mainKey: string, kvpairs: Record): Promise; @@ -2945,7 +3076,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getExtraParameters(mainKey: string, subKeys?: Array): Promise>; @@ -3022,7 +3154,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Communication * @systemapi - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ setAudioScene(scene: AudioScene, callback: AsyncCallback): void; /** @@ -3031,7 +3164,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Communication * @systemapi - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ setAudioScene(scene: AudioScene): Promise; /** @@ -3045,7 +3179,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the audio scene mode. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioScene(callback: AsyncCallback): void; /** @@ -3059,7 +3194,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the audio scene mode. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioScene(): Promise; /** @@ -3073,7 +3209,8 @@ declare namespace audio { * @returns { AudioScene } Current audio scene mode. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioSceneSync(): AudioScene; @@ -3152,7 +3289,8 @@ declare namespace audio { * @returns { AudioStreamManager } AudioStreamManager instance. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamManager(): AudioStreamManager; @@ -3167,7 +3305,8 @@ declare namespace audio { * @returns { AudioRoutingManager } AudioRoutingManager instance. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRoutingManager(): AudioRoutingManager; @@ -3176,7 +3315,8 @@ declare namespace audio { * @returns { AudioSessionManager } AudioSessionManager instance. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSessionManager(): AudioSessionManager; @@ -3184,7 +3324,8 @@ declare namespace audio { * Obtains an {@link AudioSpatializationManager} instance. * @returns { AudioSpatializationManager } AudioSpatializationManager instance. * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getSpatializationManager(): AudioSpatializationManager; @@ -3194,7 +3335,8 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getEffectManager(): AudioEffectManager; @@ -3206,31 +3348,35 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ disableSafeMediaVolume(): Promise; } /** * Enumerates audio interrupt request result type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum InterruptRequestResultType { /** * Request audio interrupt success * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_REQUEST_GRANT = 0, /** * Request audio interrupt fail, may have higher priority type * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_REQUEST_REJECT = 1 } @@ -3240,7 +3386,8 @@ declare namespace audio { * @typedef InterruptResult * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface InterruptResult { /** @@ -3248,22 +3395,24 @@ declare namespace audio { * @type { InterruptRequestResultType } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ requestResult: InterruptRequestResultType; /** * Interrupt node as a unit to receive interrupt change event. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - interruptNode: number; + interruptNode: int; } /** * Desribes audio device block status. By default, the device is consider as unblocked. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 @@ -3289,14 +3438,16 @@ declare namespace audio { * Desribes audio device block status info. * @typedef DeviceBlockStatusInfo * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeviceBlockStatusInfo { /** * Device block status. * @type {DeviceBlockStatus} * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ blockStatus: DeviceBlockStatus; @@ -3304,7 +3455,8 @@ declare namespace audio { * Audio device descriptors whose block status has changed. * @type {AudioDeviceDescriptors} * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ devices: AudioDeviceDescriptors; } @@ -3320,7 +3472,8 @@ declare namespace audio { * @typedef AudioRoutingManager * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioRoutingManager { /** @@ -3336,7 +3489,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the device list. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDevices(deviceFlag: DeviceFlag, callback: AsyncCallback): void; /** @@ -3352,7 +3506,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the device list. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDevices(deviceFlag: DeviceFlag): Promise; /** @@ -3376,7 +3531,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDevicesSync(deviceFlag: DeviceFlag): AudioDeviceDescriptors; @@ -3405,7 +3561,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'deviceChange', deviceFlag: DeviceFlag, callback: Callback): void; @@ -3430,7 +3587,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'deviceChange', callback?: Callback): void; @@ -3443,7 +3601,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAvailableDevices(deviceUsage: DeviceUsage): AudioDeviceDescriptors; @@ -3458,7 +3617,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'availableDeviceChange', deviceUsage: DeviceUsage, callback: Callback): void; @@ -3471,7 +3631,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'availableDeviceChange', callback?: Callback): void; @@ -3492,7 +3653,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setCommunicationDevice(deviceType: CommunicationDeviceType, active: boolean, callback: AsyncCallback): void; /** @@ -3512,7 +3674,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setCommunicationDevice(deviceType: CommunicationDeviceType, active: boolean): Promise; @@ -3529,7 +3692,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the active status of the device. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isCommunicationDeviceActive(deviceType: CommunicationDeviceType, callback: AsyncCallback): void; /** @@ -3545,7 +3709,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the active status of the device. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isCommunicationDeviceActive(deviceType: CommunicationDeviceType): Promise; /** @@ -3569,7 +3734,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isCommunicationDeviceActiveSync(deviceType: CommunicationDeviceType): boolean; @@ -3579,7 +3745,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectOutputDevice(outputAudioDevices: AudioDeviceDescriptors, callback: AsyncCallback): void; /** @@ -3588,7 +3755,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectOutputDevice(outputAudioDevices: AudioDeviceDescriptors): Promise; @@ -3599,7 +3767,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectOutputDeviceByFilter(filter: AudioRendererFilter, outputAudioDevices: AudioDeviceDescriptors, callback: AsyncCallback): void; /** @@ -3609,7 +3778,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectOutputDeviceByFilter(filter: AudioRendererFilter, outputAudioDevices: AudioDeviceDescriptors): Promise; @@ -3619,7 +3789,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectInputDevice(inputAudioDevices: AudioDeviceDescriptors, callback: AsyncCallback): void; /** @@ -3628,10 +3799,25 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectInputDevice(inputAudioDevices: AudioDeviceDescriptors): Promise; + /** + * Select the input device with desired AudioCapturer. This method uses a promise to return the result. + * @param { AudioCapturerFilter } filter - Filter for AudioCapturer. + * @param { AudioDeviceDescriptors } inputAudioDevices - Audio device descriptions + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Device + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + selectInputDeviceByFilter(filter: AudioCapturerFilter, inputAudioDevices: AudioDeviceDescriptors): Promise; + /** * Get output device for target audio renderer info. * @param { AudioRendererInfo } rendererInfo - Audio renderer information @@ -3655,7 +3841,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo, callback: AsyncCallback): void; /** @@ -3681,7 +3868,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo): Promise; @@ -3706,10 +3894,24 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferredOutputDeviceForRendererInfoSync(rendererInfo: AudioRendererInfo): AudioDeviceDescriptors; + /** + * Get the preferred output devices by the target audio renderer filter. + * @param { AudioRendererFilter } filter - Audio renderer filter. + * @returns { AudioDeviceDescriptors } The preferred devices. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Device + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + getPreferredOutputDeviceByFilter(filter: AudioRendererFilter): AudioDeviceDescriptors; + /** * Subscribes to prefer output device change events. When prefer device for target audio renderer info changes, * registered clients will receive the callback. @@ -3737,7 +3939,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'preferOutputDeviceChangeForRendererInfo', rendererInfo: AudioRendererInfo, callback: Callback): void; /** @@ -3763,7 +3966,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'preferOutputDeviceChangeForRendererInfo', callback?: Callback): void; @@ -3790,7 +3994,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferredInputDeviceForCapturerInfo(capturerInfo: AudioCapturerInfo, callback: AsyncCallback): void; /** @@ -3816,19 +4021,33 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferredInputDeviceForCapturerInfo(capturerInfo: AudioCapturerInfo): Promise; /** - * Subscribes to preferred input device change events. When preferred device for target audio capturer info changes, - * registered clients will receive the callback. - * @param { 'preferredInputDeviceChangeForCapturerInfo' } type - Type of the event to listen for. - * @param { AudioCapturerInfo } capturerInfo - Audio capturer information. - * @param { Callback } callback - Callback used to obtain the changed preferred devices information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1.Mandatory parameters are left unspecified; - * 2.Incorrect parameter types. + * Get the preferred input device for the target audio capturer filter. + * @param { AudioCapturerFilter } filter - Audio capturer filter. + * @returns { AudioDeviceDescriptors } The preferred devices. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Device + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + getPreferredInputDeviceByFilter(filter: AudioCapturerFilter): AudioDeviceDescriptors; + + /** + * Subscribes to preferred input device change events. When preferred device for target audio capturer info changes, + * registered clients will receive the callback. + * @param { 'preferredInputDeviceChangeForCapturerInfo' } type - Type of the event to listen for. + * @param { AudioCapturerInfo } capturerInfo - Audio capturer information. + * @param { Callback } callback - Callback used to obtain the changed preferred devices information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1.Mandatory parameters are left unspecified; + * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @since 10 @@ -3845,7 +4064,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'preferredInputDeviceChangeForCapturerInfo', capturerInfo: AudioCapturerInfo, callback: Callback): void; /** @@ -3869,7 +4089,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'preferredInputDeviceChangeForCapturerInfo', callback?: Callback): void; @@ -3894,7 +4115,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferredInputDeviceForCapturerInfoSync(capturerInfo: AudioCapturerInfo): AudioDeviceDescriptors; @@ -3902,7 +4124,8 @@ declare namespace audio { * Query whether microphone block detection is supported on current device. * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ isMicBlockDetectionSupported():Promise; @@ -3918,7 +4141,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'micBlockStatusChanged', callback: Callback): void; @@ -3931,7 +4155,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'micBlockStatusChanged', callback?: Callback): void; @@ -3951,7 +4176,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ excludeOutputDevices(usage: DeviceUsage, devices: AudioDeviceDescriptors): Promise; @@ -3969,7 +4195,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ unexcludeOutputDevices(usage: DeviceUsage, devices: AudioDeviceDescriptors): Promise; @@ -3986,7 +4213,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ unexcludeOutputDevices(usage: DeviceUsage): Promise; @@ -4001,7 +4229,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getExcludedDevices(usage: DeviceUsage): AudioDeviceDescriptors; } @@ -4017,7 +4246,8 @@ declare namespace audio { * @typedef AudioStreamManager * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioStreamManager { /** @@ -4033,7 +4263,8 @@ declare namespace audio { * of current existing audio renderers. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioRendererInfoArray(callback: AsyncCallback): void; @@ -4050,7 +4281,8 @@ declare namespace audio { * existing audio renderers. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioRendererInfoArray(): Promise; @@ -4065,7 +4297,8 @@ declare namespace audio { * @returns { AudioRendererChangeInfoArray } The information of current existing audio renderers. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioRendererInfoArraySync(): AudioRendererChangeInfoArray; @@ -4082,7 +4315,8 @@ declare namespace audio { * of current existing audio capturers. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioCapturerInfoArray(callback: AsyncCallback): void; @@ -4099,7 +4333,8 @@ declare namespace audio { * audio capturers. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioCapturerInfoArray(): Promise; @@ -4114,7 +4349,8 @@ declare namespace audio { * @returns { AudioCapturerChangeInfoArray } The information of current existing audio capturers. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioCapturerInfoArraySync(): AudioCapturerChangeInfoArray; @@ -4127,7 +4363,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectInfoArray(usage: StreamUsage, callback: AsyncCallback): void; @@ -4140,7 +4377,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectInfoArray(usage: StreamUsage): Promise; @@ -4153,7 +4391,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectInfoArraySync(usage: StreamUsage): AudioEffectInfoArray; @@ -4180,7 +4419,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioRendererChange', callback: Callback): void; @@ -4205,7 +4445,17 @@ declare namespace audio { * @crossplatform * @since 12 */ - off(type: 'audioRendererChange'): void; + /** + * Unsubscribes to audio renderer change events. + * @param { 'audioRendererChange' } type - Type of the event to listen for. Only the audioRendererChange event is supported. + * @param { Callback } callback - Callback invoked for the audio renderer change event. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Renderer + * @crossplatform + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'audioRendererChange', callback?: Callback): void; /** * Listens for audio capturer change events. When there is any audio capturer change, @@ -4230,7 +4480,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioCapturerChange', callback: Callback): void; @@ -4255,7 +4506,17 @@ declare namespace audio { * @crossplatform * @since 12 */ - off(type: 'audioCapturerChange'): void; + /** + * Unsubscribes to audio capturer change events. + * @param { 'audioCapturerChange' } type - Type of the event to listen for. Only the audioCapturerChange event is supported. + * @param { Callback } callback - Callback invoked for the audio capturer change event. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @crossplatform + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'audioCapturerChange', callback?: Callback): void; /** * Checks whether a stream is active. This method uses an asynchronous callback to return the query result. @@ -4272,7 +4533,8 @@ declare namespace audio { * The value true means that the stream is active, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isActive(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** @@ -4290,7 +4552,8 @@ declare namespace audio { * true means that the stream is active, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isActive(volumeType: AudioVolumeType): Promise; /** @@ -4314,14 +4577,15 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isActiveSync(volumeType: AudioVolumeType): boolean; } /** * Audio concurrency mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} @@ -4364,7 +4628,7 @@ declare namespace audio { /** * Audio session deactivated reason. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} @@ -4394,7 +4658,8 @@ declare namespace audio { * @typedef AudioSessionStrategy * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSessionStrategy { /** @@ -4402,7 +4667,8 @@ declare namespace audio { * @type { AudioConcurrencyMode } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ concurrencyMode: AudioConcurrencyMode; } @@ -4412,7 +4678,8 @@ declare namespace audio { * @typedef AudioSessionDeactivatedEvent * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSessionDeactivatedEvent { /** @@ -4420,7 +4687,8 @@ declare namespace audio { * @type { AudioSessionDeactivatedReason } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reason: AudioSessionDeactivatedReason; } @@ -4430,7 +4698,8 @@ declare namespace audio { * @typedef AudioSessionManager * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSessionManager { /** @@ -4444,7 +4713,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Returned by promise. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ activateAudioSession(strategy: AudioSessionStrategy): Promise; @@ -4454,7 +4724,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Returned by promise. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deactivateAudioSession(): Promise; @@ -4463,7 +4734,8 @@ declare namespace audio { * @returns { boolean } The active audio session status for the current pid application. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isAudioSessionActivated(): boolean; @@ -4478,7 +4750,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioSessionDeactivated', callback: Callback): void; @@ -4492,7 +4765,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioSessionDeactivated', callback?: Callback): void; } @@ -4518,7 +4792,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ getVolumeGroupInfos(networkId: string, callback: AsyncCallback): void; /** @@ -4527,7 +4802,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ getVolumeGroupInfos(networkId: string): Promise; /** @@ -4540,45 +4816,48 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getVolumeGroupInfosSync(networkId: string): VolumeGroupInfos; /** * Obtains an AudioVolumeGroupManager instance. This method uses an asynchronous callback to return the result. - * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default + * @param { int } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains an AudioVolumeGroupManager instance. This method uses an asynchronous callback to return the result. - * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default + * @param { int } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getVolumeGroupManager(groupId: number, callback: AsyncCallback): void; + getVolumeGroupManager(groupId: int, callback: AsyncCallback): void; /** * Obtains an AudioVolumeGroupManager instance. This method uses a promise to return the result. - * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default + * @param { int } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains an AudioVolumeGroupManager instance. This method uses a promise to return the result. - * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default + * @param { int } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getVolumeGroupManager(groupId: number): Promise; + getVolumeGroupManager(groupId: int): Promise; /** * Obtains an AudioVolumeGroupManager instance. - * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default + * @param { int } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default * @returns { AudioVolumeGroupManager } The audio volume group manager instance. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -4589,7 +4868,7 @@ declare namespace audio { */ /** * Obtains an AudioVolumeGroupManager instance. - * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default + * @param { int } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default * @returns { AudioVolumeGroupManager } The audio volume group manager instance. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -4597,9 +4876,104 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + getVolumeGroupManagerSync(groupId: int): AudioVolumeGroupManager; + + /** + * Get the volume for specified app with range from 0 to 100. Applications with same uid share the same volume. + * @permission ohos.permission.MANAGE_AUDIO_CONFIG + * @param { int } uid - App's uid. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getVolumeGroupManagerSync(groupId: number): AudioVolumeGroupManager; + getAppVolumePercentageForUid(uid: int): Promise; + + /** + * Sets the volume for specified app with range from 0 to 100. Applications with same uid share the same volume. + * @permission ohos.permission.MANAGE_AUDIO_CONFIG + * @param { int } uid - App's uid. + * @param { int } volume - Volume to set. The value range is from 0 to 100. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800301 - Crash or blocking occurs in system process. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + setAppVolumePercentageForUid(uid: int, volume: int): Promise; + + /** + * Checks whether the app volume is muted. If there are multiple callers setting muted states, + * only when all callers cancel muted state the volume of this app will be truly unmuted. + * @permission ohos.permission.MANAGE_AUDIO_CONFIG + * @param { int } uid - App's uid. + * @param { boolean } owned - If true is passed, the result will be indicated your owned muted state + * settings to this app. Otherwise if false is passed, the result will be indicated the real muted state. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + isAppVolumeMutedForUid(uid: int, owned: boolean): Promise; + + /** + * Change mute state of specified application volume. If there are multiple callers setting muted states, + * only when all callers cancel muted state the volume of this app will be truly unmuted. + * @permission ohos.permission.MANAGE_AUDIO_CONFIG + * @param { int } uid - App's uid. + * @param { boolean } muted - Muted state to set. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800301 - Crash or blocking occurs in system process. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + setAppVolumeMutedForUid(uid: int, muted: boolean): Promise; + + /** + * Get the volume for your app with range from 0 to 100. Applications with the same uid share the same volume. + * @returns { Promise } The application's volume percentage. The value range is from 0 to 100. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + getAppVolumePercentage(): Promise; + + /** + * Sets the volume for your app with range from 0 to 100. Applications with the same uid share the same volume. + * Only AudioRenderers with {@link AudioRendererInfo.volumeMode} set to {@link AudioVolumeMode.APP_INDIVIDUAL} + * will be affected by this volume. + * When you change your app's volume, your will receive 'appVolumeChange' callback event. + * Your app volume can be also changed by other system settings, and you can monitor the changes through + * 'appVolumeChange' callback. + * @param { int } volume - Volume to set. The value range is from 0 to 100. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800301 - Crash or blocking occurs in system process. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + setAppVolumePercentage(volume: int): Promise; /** * Listens for system volume change events. This method uses a callback to get volume change events. @@ -4622,7 +4996,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'volumeChange', callback: Callback): void; @@ -4635,9 +5010,68 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'volumeChange', callback?: Callback): void; + + /** + * Listens for specified app volume change events. + * The app volume may changed by {@link setAppVolumePercentageForUid}. + * @permission ohos.permission.MANAGE_AUDIO_CONFIG + * @param { 'appVolumeChangeForUid' } type - Type of the event to listen for. Only the + * appVolumeChangeForUid event is supported. + * @param { int } uid - The app's uid. + * @param { Callback } callback - Callback used to get the app volume change event. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + on(type: 'appVolumeChangeForUid', uid: int, callback: Callback): void; + + /** + * Unsubscribes to the app volume change events.. + * @permission ohos.permission.MANAGE_AUDIO_CONFIG + * @param { 'appVolumeChangeForUid' } type - Type of the event to be unregistered. Only the appVolumeChangeForUid + * event is supported. + * @param { Callback } callback - Callback used to obtain the invoking volume change event. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'appVolumeChangeForUid', callback?: Callback): void; + + /** + * Listens for app volume change events. The app volume may changed by your called {@link setAppVolumePercentage} + * or other system settings. + * @param { 'appVolumeChange' } type - Type of the event to listen for. Only the appVolumeChange event is supported. + * @param { Callback } callback - Callback used to get the app volume change event. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + on(type: 'appVolumeChange', callback: Callback): void; + + /** + * Unsubscribes to the app volume change events.. + * @param { 'appVolumeChange' } type - Type of the event to be unregistered. Only the appVolumeChange event + * is supported. + * @param { Callback } callback - Callback used to obtain the invoking volume change event. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'appVolumeChange', callback?: Callback): void; } /** @@ -4651,50 +5085,54 @@ declare namespace audio { * @typedef AudioVolumeGroupManager * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioVolumeGroupManager { /** * Sets the volume for a stream. This method uses an asynchronous callback to return the result. * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { number } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume. + * @param { int } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume. * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolume(volumeType: AudioVolumeType, volume: number, callback: AsyncCallback): void; + setVolume(volumeType: AudioVolumeType, volume: int, callback: AsyncCallback): void; /** * Sets the volume for a stream. This method uses a promise to return the result. * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { number } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume. + * @param { int } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume. * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolume(volumeType: AudioVolumeType, volume: number): Promise; + setVolume(volumeType: AudioVolumeType, volume: int): Promise; /** * Sets the volume for a stream. This method uses a promise to return the result. * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { number } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume. - * @param { number } flags - volume flags used to enable different operations, can be union of {@link VolumeFlag} + * @param { int } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume. + * @param { int } flags - volume flags used to enable different operations, can be union of {@link VolumeFlag} * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolumeWithFlag(volumeType: AudioVolumeType, volume: number, flags: number): Promise; + setVolumeWithFlag(volumeType: AudioVolumeType, volume: int, flags: int): Promise; /** * Obtains the active volume type in the calling moment. This method returns in sync mode. - * @param { number } uid - The target uid's active volume type or + * @param { int } uid - The target uid's active volume type or * 0 which means the global active volume type. * @returns { AudioVolumeType } Current active volume type. * @throws { BusinessError } 202 - Not system App. @@ -4704,46 +5142,49 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - getActiveVolumeTypeSync(uid: number): AudioVolumeType; + getActiveVolumeTypeSync(uid: int): AudioVolumeType; /** * Obtains the volume of a stream. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { AsyncCallback } callback - Callback used to return the volume. + * @param { AsyncCallback } callback - Callback used to return the volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the volume of a stream. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { AsyncCallback } callback - Callback used to return the volume. + * @param { AsyncCallback } callback - Callback used to return the volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; + getVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** * Obtains the volume of a stream. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { Promise } Promise used to return the volume. + * @returns { Promise } Promise used to return the volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the volume of a stream. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { Promise } Promise used to return the volume. + * @returns { Promise } Promise used to return the volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getVolume(volumeType: AudioVolumeType): Promise; + getVolume(volumeType: AudioVolumeType): Promise; /** * Obtains the volume of a stream. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { number } Current system volume level. + * @returns { int } Current system volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -4754,53 +5195,56 @@ declare namespace audio { /** * Obtains the volume of a stream. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { number } Current system volume level. + * @returns { int } Current system volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getVolumeSync(volumeType: AudioVolumeType): number; + getVolumeSync(volumeType: AudioVolumeType): int; /** * Obtains the minimum volume allowed for a stream. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { AsyncCallback } callback - Callback used to return the minimum volume. + * @param { AsyncCallback } callback - Callback used to return the minimum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the minimum volume allowed for a stream. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { AsyncCallback } callback - Callback used to return the minimum volume. + * @param { AsyncCallback } callback - Callback used to return the minimum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMinVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; + getMinVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** * Obtains the minimum volume allowed for a stream. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { Promise } Promise used to return the minimum volume. + * @returns { Promise } Promise used to return the minimum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the minimum volume allowed for a stream. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { Promise } Promise used to return the minimum volume. + * @returns { Promise } Promise used to return the minimum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMinVolume(volumeType: AudioVolumeType): Promise; + getMinVolume(volumeType: AudioVolumeType): Promise; /** * Obtains the minimum volume allowed for a stream. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { number } Min volume level. + * @returns { int } Min volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -4811,53 +5255,56 @@ declare namespace audio { /** * Obtains the minimum volume allowed for a stream. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { number } Min volume level. + * @returns { int } Min volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMinVolumeSync(volumeType: AudioVolumeType): number; + getMinVolumeSync(volumeType: AudioVolumeType): int; /** * Obtains the maximum volume allowed for a stream. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { AsyncCallback } callback - Callback used to return the maximum volume. + * @param { AsyncCallback } callback - Callback used to return the maximum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the maximum volume allowed for a stream. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { AsyncCallback } callback - Callback used to return the maximum volume. + * @param { AsyncCallback } callback - Callback used to return the maximum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; + getMaxVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** * Obtains the maximum volume allowed for a stream. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { Promise } Promise used to return the maximum volume. + * @returns { Promise } Promise used to return the maximum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the maximum volume allowed for a stream. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { Promise } Promise used to return the maximum volume. + * @returns { Promise } Promise used to return the maximum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxVolume(volumeType: AudioVolumeType): Promise; + getMaxVolume(volumeType: AudioVolumeType): Promise; /** * Obtains the maximum volume allowed for a stream. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { number } Max volume level. + * @returns { int } Max volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -4868,16 +5315,17 @@ declare namespace audio { /** * Obtains the maximum volume allowed for a stream. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { number } Max volume level. + * @returns { int } Max volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxVolumeSync(volumeType: AudioVolumeType): number; + getMaxVolumeSync(volumeType: AudioVolumeType): int; /** * Mutes a stream. This method uses an asynchronous callback to return the result. @@ -4887,7 +5335,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ mute(volumeType: AudioVolumeType, mute: boolean, callback: AsyncCallback): void; /** @@ -4898,7 +5347,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ mute(volumeType: AudioVolumeType, mute: boolean): Promise; @@ -4917,7 +5367,8 @@ declare namespace audio { * value true means that the stream is muted, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isMute(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** @@ -4935,7 +5386,8 @@ declare namespace audio { * means that the stream is muted, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isMute(volumeType: AudioVolumeType): Promise; /** @@ -4961,7 +5413,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isMuteSync(volumeType: AudioVolumeType): boolean; @@ -4972,7 +5425,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ setRingerMode(mode: AudioRingMode, callback: AsyncCallback): void; /** @@ -4982,7 +5436,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ setRingerMode(mode: AudioRingMode): Promise; @@ -4997,7 +5452,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the ringer mode. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRingerMode(callback: AsyncCallback): void; /** @@ -5011,7 +5467,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the ringer mode. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRingerMode(): Promise; /** @@ -5025,7 +5482,8 @@ declare namespace audio { * @returns { AudioRingMode } Current ringer mode. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRingerModeSync(): AudioRingMode; @@ -5038,10 +5496,22 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'ringerModeChange', callback: Callback): void; + /** + * Unsubscribes to the ringer mode state change events. + * @param { 'ringerModeChange' } type - Type of the event to listen for. + * @param { Callback } callback - Callback used to get the updated ringer mode. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'ringerModeChange', callback?: Callback): void; + /** * Mutes or unmutes the microphone. This method uses an asynchronous callback to return the result. * @permission ohos.permission.MANAGE_AUDIO_CONFIG @@ -5078,7 +5548,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setMicMute(mute: boolean): Promise; @@ -5096,7 +5567,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setMicMutePersistent(mute: boolean, type: PolicyType): Promise; @@ -5110,7 +5582,8 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isPersistentMicMute(): boolean; @@ -5127,7 +5600,8 @@ declare namespace audio { * true means that the microphone is muted, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isMicrophoneMute(callback: AsyncCallback): void; /** @@ -5143,7 +5617,8 @@ declare namespace audio { * means that the microphone is muted, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isMicrophoneMute(): Promise; /** @@ -5159,7 +5634,8 @@ declare namespace audio { * means that the microphone is muted, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isMicrophoneMuteSync(): boolean; @@ -5172,7 +5648,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'micStateChange', callback: Callback): void; @@ -5185,7 +5662,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'micStateChange', callback?: Callback): void; @@ -5200,7 +5678,8 @@ declare namespace audio { * @returns { boolean } Whether it is volume unadjustable. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isVolumeUnadjustable(): boolean; @@ -5218,7 +5697,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ adjustVolumeByStep(adjustType: VolumeAdjustType, callback: AsyncCallback): void; /** @@ -5235,7 +5715,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ adjustVolumeByStep(adjustType: VolumeAdjustType): Promise; @@ -5254,7 +5735,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustType, callback: AsyncCallback): void; /** @@ -5272,7 +5754,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustType): Promise; @@ -5280,9 +5763,9 @@ declare namespace audio { * Gets the volume db value that system calculate by volume type, volume level and device type. * This method uses an asynchronous callback to return the result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -5295,9 +5778,9 @@ declare namespace audio { * Gets the volume db value that system calculate by volume type, volume level and device type. * This method uses an asynchronous callback to return the result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -5305,16 +5788,17 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType, callback: AsyncCallback): void; + getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: int, device: DeviceType, callback: AsyncCallback): void; /** * Gets the volume db value that system calculate by volume type, volume level and device type. * This method uses a promise to return the result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -5327,9 +5811,9 @@ declare namespace audio { * Gets the volume db value that system calculate by volume type, volume level and device type. * This method uses a promise to return the result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -5337,15 +5821,16 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType): Promise; + getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: int, device: DeviceType): Promise; /** * Gets the volume db value that system calculate by volume type, volume level and device type. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @returns { number } The system volume in dB. + * @returns { double } The system volume in dB. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -5356,47 +5841,50 @@ declare namespace audio { /** * Gets the volume db value that system calculate by volume type, volume level and device type. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @returns { number } The system volume in dB. + * @returns { double } The system volume in dB. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSystemVolumeInDbSync(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType): number; + getSystemVolumeInDbSync(volumeType: AudioVolumeType, volumeLevel: int, device: DeviceType): double; /** * Gets the max amplitude value for a specific input device. * This method uses a promise to return the result. * @param { AudioDeviceDescriptor } inputDevice - the target device. - * @returns { Promise } Promise used to return the max amplitude value. + * @returns { Promise } Promise used to return the max amplitude value. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise. * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxAmplitudeForInputDevice(inputDevice: AudioDeviceDescriptor): Promise; + getMaxAmplitudeForInputDevice(inputDevice: AudioDeviceDescriptor): Promise; /** * Gets the max amplitude value for a specific output device. * This method uses a promise to return the result. * @param { AudioDeviceDescriptor } outputDevice - the target device. - * @returns { Promise } Promise used to return the max amplitude value. + * @returns { Promise } Promise used to return the max amplitude value. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise. * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxAmplitudeForOutputDevice(outputDevice: AudioDeviceDescriptor): Promise; + getMaxAmplitudeForOutputDevice(outputDevice: AudioDeviceDescriptor): Promise; } /** @@ -5404,7 +5892,8 @@ declare namespace audio { * @interface AudioSpatialEnabledStateForDevice * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSpatialEnabledStateForDevice { /** @@ -5412,7 +5901,8 @@ declare namespace audio { * @type { AudioDeviceDescriptor } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deviceDescriptor: AudioDeviceDescriptor; /** @@ -5420,7 +5910,8 @@ declare namespace audio { * @type { boolean } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enabled: boolean; } @@ -5429,7 +5920,8 @@ declare namespace audio { * Implements audio spatialization management. * @typedef AudioSpatializationManager * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSpatializationManager { /** @@ -5438,7 +5930,8 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isSpatializationSupported(): boolean; @@ -5453,7 +5946,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isSpatializationSupportedForDevice(deviceDescriptor: AudioDeviceDescriptor): boolean; @@ -5463,7 +5957,8 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isHeadTrackingSupported(): boolean; @@ -5478,7 +5973,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isHeadTrackingSupportedForDevice(deviceDescriptor: AudioDeviceDescriptor): boolean; @@ -5532,7 +6028,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setSpatializationEnabled(deviceDescriptor: AudioDeviceDescriptor, enabled: boolean): Promise; @@ -5558,7 +6055,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isSpatializationEnabled(deviceDescriptor: AudioDeviceDescriptor): boolean; @@ -5591,7 +6089,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'spatializationEnabledChangeForAnyDevice', callback: Callback): void; @@ -5622,7 +6121,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'spatializationEnabledChangeForAnyDevice', callback?: Callback): void; @@ -5676,7 +6176,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setHeadTrackingEnabled(deviceDescriptor: AudioDeviceDescriptor, enabled: boolean): Promise; @@ -5702,7 +6203,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isHeadTrackingEnabled(deviceDescriptor: AudioDeviceDescriptor): boolean; @@ -5735,7 +6237,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'headTrackingEnabledChangeForAnyDevice', callback: Callback): void; @@ -5766,7 +6269,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'headTrackingEnabledChangeForAnyDevice', callback?: Callback): void; @@ -5782,7 +6286,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ updateSpatialDeviceState(spatialDeviceState: AudioSpatialDeviceState): void; @@ -5798,7 +6303,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setSpatializationSceneType(spatializationSceneType: AudioSpatializationSceneType): void; @@ -5808,7 +6314,8 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSpatializationSceneType(): AudioSpatializationSceneType; @@ -5816,7 +6323,8 @@ declare namespace audio { * Checks whether the spatialization is enabled by the current device. * @returns { boolean } Whether the spatialization is enabled by the current device. * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isSpatializationEnabledForCurrentDevice(): boolean; @@ -5830,7 +6338,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'spatializationEnabledChangeForCurrentDevice', callback: Callback): void; @@ -5843,7 +6352,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'spatializationEnabledChangeForCurrentDevice', callback?: Callback): void; } @@ -5853,7 +6363,8 @@ declare namespace audio { * @typedef AudioEffectManager * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioEffectManager { /** @@ -5865,7 +6376,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedAudioEffectProperty(): Array; @@ -5886,7 +6398,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ setAudioEffectProperty(propertyArray: Array): void; @@ -5899,14 +6412,15 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectProperty(): Array; } /** * Connect type for device. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi * @since arkts {'1.1':'9','1.2':'20'} @@ -5954,25 +6468,25 @@ declare namespace audio { /** * Volume group id. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi * @since arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 */ - readonly groupId: number; + readonly groupId: int; /** * Volume mapping group id. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi * @since arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 */ - readonly mappingId: number; + readonly mappingId: int; /** * Volume group name. @@ -6040,31 +6554,31 @@ declare namespace audio { interface AudioRendererChangeInfo { /** * Audio stream unique id. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Audio stream unique id. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - readonly streamId: number; + readonly streamId: int; /** * Uid for audio renderer client application. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Renderer * @systemapi * @since arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 */ - readonly clientUid: number; + readonly clientUid: int; /** * Audio renderer information. @@ -6145,31 +6659,31 @@ declare namespace audio { interface AudioCapturerChangeInfo { /** * Audio stream unique id. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 9 */ /** * Audio stream unique id. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - readonly streamId: number; + readonly streamId: int; /** * Uid for audio capturer client application. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi * @since arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 */ - readonly clientUid: number; + readonly clientUid: int; /** * Audio capturer information. @@ -6288,20 +6802,21 @@ declare namespace audio { /** * Audio device id. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 9 */ /** * Audio device id. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly id: number; + readonly id: int; /** * Audio device name. @@ -6316,7 +6831,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -6333,87 +6849,94 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly address: string; /** * Supported sampling rates. - * @type { Array } + * @type { Array } * @syscap SystemCapability.Multimedia.Audio.Device * @since 9 */ /** * Supported sampling rates. - * @type { Array } + * @type { Array } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly sampleRates: Array; + readonly sampleRates: Array; /** * Supported channel counts. - * @type { Array } + * @type { Array } * @syscap SystemCapability.Multimedia.Audio.Device * @since 9 */ /** * Supported channel counts. - * @type { Array } + * @type { Array } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly channelCounts: Array; + readonly channelCounts: Array; /** * Supported channel masks. - * @type { Array } + * @type { Array } * @syscap SystemCapability.Multimedia.Audio.Device * @since 9 */ /** * Supported channel masks. - * @type { Array } + * @type { Array } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly channelMasks: Array; + readonly channelMasks: Array; /** * Device network id * @type { string } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly networkId: string; /** * Interrupt group id - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly interruptGroupId: number; + readonly interruptGroupId: int; /** * Volume group id - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly volumeGroupId: number; + readonly volumeGroupId: int; /** * Name used to display, considering distributed device situation. * @type { string } @@ -6427,7 +6950,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly displayName: string; @@ -6444,7 +6968,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly encodingTypes?: Array; @@ -6453,20 +6978,22 @@ declare namespace audio { * @type { boolean } * @readonly * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ readonly spatializationSupported?: boolean; /** * Only {@link DeviceType.SPEAKER} with networkId、{@link DeviceType.REMOTE_CAST} * or {@link DeviceType.REMOTE_DAUDIO} has dmDeviceType which indicated deviceTypeId. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly dmDeviceType?: number; + readonly dmDeviceType?: int; } /** @@ -6486,6 +7013,30 @@ declare namespace audio { */ type AudioDeviceDescriptors = Array>; + /** + * Volume mode. + * @enum { int } + * @syscap SystemCapability.Multimedia.Audio.Volume + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + enum AudioVolumeMode { + /** + * Audio volume affected by system volume level. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + SYSTEM_GLOBAL = 0, + /** + * Audio volume affected by app's individual percentage. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + APP_INDIVIDUAL = 1 + } + /** * Describes the volume event received by the app when the volume is changed. * @typedef VolumeEvent @@ -6511,19 +7062,19 @@ declare namespace audio { volumeType: AudioVolumeType; /** * Volume level. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Volume level. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - volume: number; + volume: int; /** * Whether to show the volume change in UI. * @type { boolean } @@ -6534,20 +7085,30 @@ declare namespace audio { updateUi: boolean; /** * volumeGroup id - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - volumeGroupId: number; + volumeGroupId: int; /** * Device network id * @type { string } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ networkId: string; + /** + * Audio volume mode of this volume event + * @type { ?AudioVolumeMode } + * @syscap SystemCapability.Multimedia.Audio.Volume + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + volumeMode?: AudioVolumeMode; } /** @@ -6642,14 +7203,16 @@ declare namespace audio { * Describes the microphone state change event received by the app when the microphone state is changed. * @typedef MicStateChangeEvent * @syscap SystemCapability.Multimedia.Audio.Device - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface MicStateChangeEvent { /** * Mic mute state. * @type { boolean } * @syscap SystemCapability.Multimedia.Audio.Device - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ mute: boolean; } @@ -6664,7 +7227,8 @@ declare namespace audio { * @typedef DeviceChangeAction * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeviceChangeAction { /** @@ -6678,7 +7242,8 @@ declare namespace audio { * @type { DeviceChangeType } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: DeviceChangeType; @@ -6693,23 +7258,25 @@ declare namespace audio { * @type { AudioDeviceDescriptors } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deviceDescriptors: AudioDeviceDescriptors; } /** * Enumerates channel blend mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 11 */ /** * Enumerates channel blend mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum ChannelBlendMode { /** @@ -6721,7 +7288,8 @@ declare namespace audio { * No channel process. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MODE_DEFAULT = 0, /** @@ -6733,7 +7301,8 @@ declare namespace audio { * Blend left and right channel. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MODE_BLEND_LR = 1, /** @@ -6745,7 +7314,8 @@ declare namespace audio { * Replicate left to right channel. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MODE_ALL_LEFT = 2, /** @@ -6757,20 +7327,21 @@ declare namespace audio { * Replicate right to left channel. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MODE_ALL_RIGHT = 3, } /** * Enumerates audio stream device change reason. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 11 */ /** * Enumerates audio stream device change reason. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice @@ -6889,17 +7460,19 @@ declare namespace audio { /** * Enumerates callback result. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioDataCallbackResult { /** * Indicates data of this callback is invalid. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INVALID = -1, @@ -6907,7 +7480,8 @@ declare namespace audio { * Indicates data of this callback is valid. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VALID = 0, } @@ -6926,31 +7500,48 @@ declare namespace audio { */ type AudioRendererWriteDataCallback = (data: ArrayBuffer) => AudioDataCallbackResult | void; + /** + * Type definition of callback function for audio renderer write data. + * + * @typedef { function } AudioRendererWriteDataCallback + * @param { ArrayBuffer } data - audio data array buffer. + * @returns { AudioDataCallbackResult } result of callback. If AudioDataCallbackResult.VALID + * is returned, it indicates the data is valid and will be played. If AudioDataCallbackResult.INVALID + * is returned, it indicates the data is will not be played. + * @syscap SystemCapability.Multimedia.Audio.Renderer + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + type AudioRendererWriteDataCallback = (data: ArrayBuffer) => AudioDataCallbackResult; /** * Audio timestamp info. * @typedef AudioTimestampInfo * @syscap SystemCapability.Multimedia.Audio.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioTimestampInfo { /** * Frame position. - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.Multimedia.Audio.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly framePos: number; + readonly framePos: long; /** * Timestamp when frame in {@link AudioTimestampInfo#framePos} was rendered or captured. - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.Multimedia.Audio.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly timestamp: number; + readonly timestamp: long; } /** @@ -6964,7 +7555,8 @@ declare namespace audio { * @typedef AudioRenderer * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioRenderer { /** @@ -6979,7 +7571,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly state: AudioState; @@ -6996,7 +7589,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the renderer information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRendererInfo(callback: AsyncCallback): void; /** @@ -7012,7 +7606,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the renderer information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRendererInfo(): Promise; /** @@ -7026,7 +7621,8 @@ declare namespace audio { * @returns { AudioRendererInfo } The renderer information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRendererInfoSync(): AudioRendererInfo; @@ -7041,7 +7637,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the stream information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfo(callback: AsyncCallback): void; /** @@ -7055,7 +7652,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the stream information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfo(): Promise; /** @@ -7069,65 +7667,71 @@ declare namespace audio { * @returns { AudioStreamInfo } The stream information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfoSync(): AudioStreamInfo; /** * Obtains the renderer stream id. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the stream id. + * @param { AsyncCallback } callback - Callback used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Obtains the renderer stream id. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the stream id. + * @param { AsyncCallback } callback - Callback used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamId(callback: AsyncCallback): void; + getAudioStreamId(callback: AsyncCallback): void; /** * Obtains the renderer stream id. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the stream id. + * @returns { Promise } Promise used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Obtains the renderer stream id. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the stream id. + * @returns { Promise } Promise used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamId(): Promise; + getAudioStreamId(): Promise; /** * Obtains the renderer stream id. - * @returns { number } The stream id. + * @returns { long } The stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Obtains the renderer stream id. - * @returns { number } The stream id. + * @returns { long } The stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamIdSync(): number; + getAudioStreamIdSync(): long; /** * Obtains the current audio effect mode. This method uses an asynchronous callback to return the query result. * @param { AsyncCallback } callback - Callback used to return the current audio effect mode. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectMode(callback: AsyncCallback): void; /** * Obtains the current audio effect mode. This method uses a promise to return the query result. * @returns { Promise } Promise used to return the current audio effect mode. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectMode(): Promise; @@ -7140,7 +7744,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ setAudioEffectMode(mode: AudioEffectMode, callback: AsyncCallback): void; /** @@ -7152,7 +7757,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ setAudioEffectMode(mode: AudioEffectMode): Promise; @@ -7170,7 +7776,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; /** @@ -7187,7 +7794,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -7217,49 +7825,52 @@ declare namespace audio { /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses an * asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the timestamp. + * @param { AsyncCallback } callback - Callback used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses an * asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the timestamp. + * @param { AsyncCallback } callback - Callback used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTime(callback: AsyncCallback): void; + getAudioTime(callback: AsyncCallback): void; /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses a * promise to return the result. - * @returns { Promise } Promise used to return the timestamp. + * @returns { Promise } Promise used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses a * promise to return the result. - * @returns { Promise } Promise used to return the timestamp. + * @returns { Promise } Promise used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTime(): Promise; + getAudioTime(): Promise; /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. - * @returns { number } The audio timestamp. + * @returns { long } The audio timestamp. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. - * @returns { number } The audio timestamp. + * @returns { long } The audio timestamp. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTimeSync(): number; + getAudioTimeSync(): long; /** * Obtains the timestamp info. @@ -7267,7 +7878,8 @@ declare namespace audio { * @returns { Promise } The Promise used to return timestamp info. * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioTimestampInfo(): Promise; @@ -7277,7 +7889,8 @@ declare namespace audio { * @returns { AudioTimestampInfo } The returned timestamp info. * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioTimestampInfoSync(): AudioTimestampInfo; @@ -7292,7 +7905,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ drain(callback: AsyncCallback): void; /** @@ -7306,7 +7920,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ drain(): Promise; @@ -7323,7 +7938,8 @@ declare namespace audio { * @throws { BusinessError } 6800103 - Operation not permit at current state. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ flush(): Promise; @@ -7338,7 +7954,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pause(callback: AsyncCallback): void; /** @@ -7352,7 +7969,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pause(): Promise; @@ -7367,7 +7985,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; /** @@ -7381,7 +8000,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -7396,7 +8016,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; /** @@ -7410,54 +8031,58 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; /** * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses an asynchronous callback to * return the result. - * @param { AsyncCallback } callback - Callback used to return the buffer size. + * @param { AsyncCallback } callback - Callback used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ /** * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses an asynchronous callback to * return the result. - * @param { AsyncCallback } callback - Callback used to return the buffer size. + * @param { AsyncCallback } callback - Callback used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSize(callback: AsyncCallback): void; + getBufferSize(callback: AsyncCallback): void; /** * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the buffer size. + * @returns { Promise } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ /** * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the buffer size. + * @returns { Promise } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSize(): Promise; + getBufferSize(): Promise; /** * Obtains a reasonable minimum buffer size in bytes for rendering. - * @returns { number } The audio buffer size. + * @returns { long } The audio buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Obtains a reasonable minimum buffer size in bytes for rendering. - * @returns { number } The audio buffer size. + * @returns { long } The audio buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSizeSync(): number; + getBufferSizeSync(): long; /** * Sets the render rate. This method uses an asynchronous callback to return the result. @@ -7483,7 +8108,7 @@ declare namespace audio { /** * Sets the playback speed. - * @param { number } speed - Audio playback speed. The value type is float, form 0.25 to 4.0. + * @param { double } speed - Audio playback speed. The value type is float, form 0.25 to 4.0. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -7493,16 +8118,17 @@ declare namespace audio { */ /** * Sets the playback speed. - * @param { number } speed - Audio playback speed. The value type is float, form 0.25 to 4.0. + * @param { double } speed - Audio playback speed. The value type is float, form 0.25 to 4.0. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setSpeed(speed: number): void; + setSpeed(speed: double): void; /** * Obtains the current render rate. This method uses an asynchronous callback to return the result. @@ -7536,18 +8162,19 @@ declare namespace audio { /** * Obtains the current playback speed. - * @returns { number } The playback speed. + * @returns { double } The playback speed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 11 */ /** * Obtains the current playback speed. - * @returns { number } The playback speed. + * @returns { double } The playback speed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSpeed(): number; + getSpeed(): double; /** * Set interrupt mode. @@ -7562,7 +8189,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setInterruptMode(mode: InterruptMode, callback: AsyncCallback): void; /** @@ -7578,7 +8206,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setInterruptMode(mode: InterruptMode): Promise; /** @@ -7600,55 +8229,59 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setInterruptModeSync(mode: InterruptMode): void; /** * Sets the volume for this stream. This method uses an asynchronous callback to return the result. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Sets the volume for this stream. This method uses an asynchronous callback to return the result. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolume(volume: number, callback: AsyncCallback): void; + setVolume(volume: double, callback: AsyncCallback): void; /** * Sets the volume for a stream. This method uses a promise to return the result. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Sets the volume for a stream. This method uses a promise to return the result. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolume(volume: number): Promise; + setVolume(volume: double): Promise; /** * Gets volume of this stream. - * @returns { number } Returns one float value. + * @returns { double } Returns one float value. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getVolume(): number; + getVolume(): double; /** * Changes the volume with ramp for a duration. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. - * @param { number } duration - Duration for volume ramp, in millisecond. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { int } duration - Duration for volume ramp, in millisecond. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -7658,146 +8291,156 @@ declare namespace audio { */ /** * Changes the volume with ramp for a duration. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. - * @param { number } duration - Duration for volume ramp, in millisecond. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { int } duration - Duration for volume ramp, in millisecond. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolumeWithRamp(volume: number, duration: number): void; + setVolumeWithRamp(volume: double, duration: int): void; /** * Gets the min volume this stream can set. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the min volume this stream can set. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMinStreamVolume(callback: AsyncCallback): void; + getMinStreamVolume(callback: AsyncCallback): void; /** * Gets the min volume this stream can set. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the min volume this stream can set. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMinStreamVolume(): Promise; + getMinStreamVolume(): Promise; /** * Gets the min volume this stream can set. - * @returns { number } Min stream volume. + * @returns { double } Min stream volume. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the min volume this stream can set. - * @returns { number } Min stream volume. + * @returns { double } Min stream volume. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMinStreamVolumeSync(): number; + getMinStreamVolumeSync(): double; /** * Gets the max volume this stream can set. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the max volume this stream can set. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxStreamVolume(callback: AsyncCallback): void; + getMaxStreamVolume(callback: AsyncCallback): void; /** * Gets the max volume this stream can set. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the max volume this stream can set. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxStreamVolume(): Promise; + getMaxStreamVolume(): Promise; /** * Gets the max volume this stream can set. - * @returns { number } Max stream volume. + * @returns { double } Max stream volume. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the max volume this stream can set. - * @returns { number } Max stream volume. + * @returns { double } Max stream volume. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxStreamVolumeSync(): number; + getMaxStreamVolumeSync(): double; /** * Gets buffer underflow count. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets buffer underflow count. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getUnderflowCount(callback: AsyncCallback): void; + getUnderflowCount(callback: AsyncCallback): void; /** * Gets buffer underflow count. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets buffer underflow count. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getUnderflowCount(): Promise; + getUnderflowCount(): Promise; /** * Gets buffer underflow count. - * @returns { number } Underflow count number. + * @returns { long } Underflow count number. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets buffer underflow count. - * @returns { number } Underflow count number. + * @returns { long } Underflow count number. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getUnderflowCountSync(): number; + getUnderflowCountSync(): long; /** * Gets the output device or devices for this stream. @@ -7812,7 +8455,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentOutputDevices(callback: AsyncCallback): void; /** @@ -7828,7 +8472,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentOutputDevices(): Promise; /** @@ -7842,7 +8487,8 @@ declare namespace audio { * @returns { AudioDeviceDescriptors } Output device or devices. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentOutputDevicesSync(): AudioDeviceDescriptors; @@ -7867,7 +8513,8 @@ declare namespace audio { * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setChannelBlendMode(mode: ChannelBlendMode): void; @@ -7877,7 +8524,8 @@ declare namespace audio { * true: set the silent mode and mix with other streams. * false: unset the silent mode, current stream will trigger the audio focus internally. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setSilentModeAndMixWithOthers(on: boolean): void; @@ -7887,7 +8535,8 @@ declare namespace audio { * true: current stream is in the silent mode and mix with other streams. * false: current stream in in the normal playback mode * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSilentModeAndMixWithOthers(): boolean; @@ -7907,7 +8556,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setDefaultOutputDevice(deviceType: DeviceType): Promise; @@ -7934,16 +8584,28 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioInterrupt', callback: Callback): void; + /** + * Unsubscribes audio interrupt events. + * @param { 'audioInterrupt' } type - Type of the event to listen for. + * @param { Callback } callback - Callback used to listen for interrupt callback. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Interrupt + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'audioInterrupt', callback?: Callback): void; + /** * Subscribes to mark reached events. When the number of frames rendered reaches the value of the frame parameter, * the callback is invoked. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Number of frames to trigger the event. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ @@ -7951,34 +8613,44 @@ declare namespace audio { * Subscribes to mark reached events. When the number of frames rendered reaches the value of the frame parameter, * the callback is invoked. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Number of frames to trigger the event. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'markReach', frame: number, callback: Callback): void; + on(type: 'markReach', frame: long, callback: Callback): void; /** - * Unsubscribes from mark reached events. + * Unsubscribes from the mark reached events. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @syscap SystemCapability.Multimedia.Audio.Renderer + * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ /** - * Unsubscribes from mark reached events. + * Unsubscribes from the mark reached events. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @syscap SystemCapability.Multimedia.Audio.Renderer + * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform * @since 12 */ - off(type: 'markReach'): void; + /** + * Unsubscribes from the mark reached events. + * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. + * @param { Callback } callback - Callback invoked when the event is triggered. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @crossplatform + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'markReach', callback?: Callback): void; /** * Subscribes to period reached events. When the period of frame rendering reaches the value of frame parameter, * the callback is invoked. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. - * @param { number } frame - Period during which frame rendering is listened. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Period during which frame rendering is listened. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ @@ -7986,13 +8658,14 @@ declare namespace audio { * Subscribes to period reached events. When the period of frame rendering reaches the value of frame parameter, * the callback is invoked. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. - * @param { number } frame - Period during which frame rendering is listened. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Period during which frame rendering is listened. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'periodReach', frame: number, callback: Callback): void; + on(type: 'periodReach', frame: long, callback: Callback): void; /** * Unsubscribes from period reached events. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. @@ -8006,7 +8679,16 @@ declare namespace audio { * @crossplatform * @since 12 */ - off(type: 'periodReach'): void; + /** + * Unsubscribes from period reached events. + * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. + * @param { Callback } callback - Callback invoked when the event is triggered. + * @syscap SystemCapability.Multimedia.Audio.Renderer + * @crossplatform + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'periodReach', callback?: Callback): void; /** * Subscribes audio state change event callback. @@ -8021,10 +8703,22 @@ declare namespace audio { * @param { Callback } callback - Callback invoked when state change. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'stateChange', callback: Callback): void; + /** + * Unsubscribes audio state change event callback. + * @param { 'stateChange' } type - Type of the event to listen for. + * @param { Callback } callback - Callback invoked when state change. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Renderer + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'stateChange', callback?: Callback): void; + /** * Subscribes output device change event callback. * The event is triggered when output device change for this stream. @@ -8048,7 +8742,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'outputDeviceChange', callback: Callback): void; @@ -8075,7 +8770,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'outputDeviceChangeWithInfo', callback: Callback): void; @@ -8100,7 +8796,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'outputDeviceChange', callback?: Callback): void; @@ -8125,7 +8822,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'outputDeviceChangeWithInfo', callback?: Callback): void; @@ -8152,7 +8850,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'writeData', callback: AudioRendererWriteDataCallback): void; @@ -8177,20 +8876,21 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'writeData', callback?: AudioRendererWriteDataCallback): void; } /** * Enumerates source types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates source types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} @@ -8338,18 +9038,19 @@ declare namespace audio { source: SourceType; /** * Audio capturer flags. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Audio capturer flags. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - capturerFlags: number; + capturerFlags: int; } /** @@ -8363,7 +9064,8 @@ declare namespace audio { * @typedef AudioCapturerOptions * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioCapturerOptions { /** @@ -8377,7 +9079,8 @@ declare namespace audio { * @type { AudioStreamInfo } * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ streamInfo: AudioStreamInfo; /** @@ -8391,7 +9094,8 @@ declare namespace audio { * @type { AudioCapturerInfo } * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ capturerInfo: AudioCapturerInfo; /** @@ -8463,7 +9167,8 @@ declare namespace audio { * @typedef AudioCapturer * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioCapturer { /** @@ -8478,7 +9183,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly state: AudioState; @@ -8495,7 +9201,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the capturer information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCapturerInfo(callback: AsyncCallback): void; /** @@ -8511,7 +9218,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the capturer information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCapturerInfo(): Promise; /** @@ -8525,7 +9233,8 @@ declare namespace audio { * @returns { AudioCapturerInfo } The capturer information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCapturerInfoSync(): AudioCapturerInfo; @@ -8540,7 +9249,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the stream information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfo(callback: AsyncCallback): void; /** @@ -8554,7 +9264,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the stream information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfo(): Promise; /** @@ -8568,52 +9279,56 @@ declare namespace audio { * @returns { AudioStreamInfo } The stream information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfoSync(): AudioStreamInfo; /** * Obtains the capturer stream id. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the stream id. + * @param { AsyncCallback } callback - Callback used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 9 */ /** * Obtains the capturer stream id. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the stream id. + * @param { AsyncCallback } callback - Callback used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamId(callback: AsyncCallback): void; + getAudioStreamId(callback: AsyncCallback): void; /** * Obtains the capturer stream id. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the stream id. + * @returns { Promise } Promise used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 9 */ /** * Obtains the capturer stream id. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the stream id. + * @returns { Promise } Promise used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamId(): Promise; + getAudioStreamId(): Promise; /** * Obtains the capturer stream id. - * @returns { number } The stream id. + * @returns { long } The stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 10 */ /** * Obtains the capturer stream id. - * @returns { number } The stream id. + * @returns { long } The stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamIdSync(): number; + getAudioStreamIdSync(): long; /** * Starts capturing. @@ -8629,7 +9344,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; /** @@ -8646,7 +9362,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -8677,49 +9394,52 @@ declare namespace audio { /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses an * asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the timestamp. + * @param { AsyncCallback } callback - Callback used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses an * asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the timestamp. + * @param { AsyncCallback } callback - Callback used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTime(callback: AsyncCallback): void; + getAudioTime(callback: AsyncCallback): void; /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses a * promise to return the result. - * @returns { Promise } Promise used to return the timestamp. + * @returns { Promise } Promise used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses a * promise to return the result. - * @returns { Promise } Promise used to return the timestamp. + * @returns { Promise } Promise used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTime(): Promise; + getAudioTime(): Promise; /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. - * @returns { number } The audio timestamp. + * @returns { long } The audio timestamp. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 10 */ /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. - * @returns { number } The audio timestamp. + * @returns { long } The audio timestamp. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTimeSync(): number; + getAudioTimeSync(): long; /** * Obtains the timestamp info. @@ -8727,7 +9447,8 @@ declare namespace audio { * @returns { Promise } The Promise used to return timestamp info. * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Capturer - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioTimestampInfo(): Promise; @@ -8737,7 +9458,8 @@ declare namespace audio { * @returns { AudioTimestampInfo } The returned timestamp info. * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Capturer - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioTimestampInfoSync(): AudioTimestampInfo; @@ -8752,7 +9474,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; /** @@ -8766,7 +9489,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -8781,7 +9505,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; /** @@ -8795,54 +9520,58 @@ declare namespace audio { * @returns { Promise } - Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; /** * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses an asynchronous callback to * return the result. - * @param { AsyncCallback } callback - Callback used to return the buffer size. + * @param { AsyncCallback } callback - Callback used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ /** * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses an asynchronous callback to * return the result. - * @param { AsyncCallback } callback - Callback used to return the buffer size. + * @param { AsyncCallback } callback - Callback used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSize(callback: AsyncCallback): void; + getBufferSize(callback: AsyncCallback): void; /** * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the buffer size. + * @returns { Promise } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ /** * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the buffer size. + * @returns { Promise } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSize(): Promise; + getBufferSize(): Promise; /** * Obtains a reasonable minimum buffer size in bytes for capturing. - * @returns { number } Promise used to return the buffer size. + * @returns { long } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 10 */ /** * Obtains a reasonable minimum buffer size in bytes for capturing. - * @returns { number } Promise used to return the buffer size. + * @returns { long } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSizeSync(): number; + getBufferSizeSync(): long; /** * Gets the input device or devices for this stream. @@ -8855,7 +9584,8 @@ declare namespace audio { * @returns { AudioDeviceDescriptors } Descriptors of input devices. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentInputDevices(): AudioDeviceDescriptors; @@ -8870,32 +9600,35 @@ declare namespace audio { * @returns { AudioCapturerChangeInfo } Full capture info. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioCapturerChangeInfo(): AudioCapturerChangeInfo; /** * Gets overflow count. - * @returns { Promise } - Promise used to return the result. + * @returns { Promise } - Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getOverflowCount(): Promise + getOverflowCount(): Promise /** * Gets overflow count. - * @returns { number } Overflow count number. + * @returns { long } Overflow count number. * @syscap SystemCapability.Multimedia.Audio.Capturer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getOverflowCountSync(): number; + getOverflowCountSync(): long; /** * Subscribes to mark reached events. When the number of frames captured reaches the value of the frame parameter, * the callback is invoked. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Number of frames to trigger the event. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ @@ -8903,13 +9636,14 @@ declare namespace audio { * Subscribes to mark reached events. When the number of frames captured reaches the value of the frame parameter, * the callback is invoked. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Number of frames to trigger the event. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'markReach', frame: number, callback: Callback): void; + on(type: 'markReach', frame: long, callback: Callback): void; /** * Unsubscribes from the mark reached events. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. @@ -8923,14 +9657,23 @@ declare namespace audio { * @crossplatform * @since 12 */ - off(type: 'markReach'): void; + /** + * Unsubscribes from the mark reached events. + * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. + * @param { Callback } callback - Callback invoked when the event is triggered. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @crossplatform + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'markReach', callback?: Callback): void; /** * Subscribes to period reached events. When the period of frame capturing reaches the value of frame parameter, * the callback is invoked. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. - * @param { number } frame - Period during which frame capturing is listened. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Period during which frame capturing is listened. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ @@ -8938,13 +9681,14 @@ declare namespace audio { * Subscribes to period reached events. When the period of frame capturing reaches the value of frame parameter, * the callback is invoked. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. - * @param { number } frame - Period during which frame capturing is listened. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Period during which frame capturing is listened. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'periodReach', frame: number, callback: Callback): void; + on(type: 'periodReach', frame: long, callback: Callback): void; /** * Unsubscribes from period reached events. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. @@ -8954,11 +9698,13 @@ declare namespace audio { /** * Unsubscribes from period reached events. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'periodReach'): void; + off(type: 'periodReach', callback?: Callback): void; /** * Subscribes audio state change event callback. @@ -8973,10 +9719,22 @@ declare namespace audio { * @param { Callback } callback - Callback used to listen for the audio state change event. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'stateChange', callback: Callback): void; + /** + * Unsubscribes audio state change event callback. + * @param { 'stateChange' } type - Type of the event to listen for. + * @param { Callback } callback - Callback used to listen for the audio state change event. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'stateChange', callback?: Callback): void; + /** * Listens for audio interrupt events. This method uses a callback to get interrupt events. The interrupt event is * triggered when audio recording is interrupted. @@ -9000,7 +9758,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioInterrupt', callback: Callback): void; @@ -9023,7 +9782,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioInterrupt'): void; @@ -9050,7 +9810,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'inputDeviceChange', callback: Callback): void; /** @@ -9074,7 +9835,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'inputDeviceChange', callback?: Callback): void; @@ -9101,7 +9863,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioCapturerChange', callback: Callback): void; /** @@ -9125,7 +9888,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioCapturerChange', callback?: Callback): void; @@ -9152,7 +9916,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'readData', callback: Callback): void; @@ -9177,176 +9942,199 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'readData', callback?: Callback): void; } /** * ASR noise suppression mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AsrNoiseSuppressionMode { /** * Bypass noise suppression. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BYPASS = 0, /** * Standard noise suppression. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 1, /** * Near field noise suppression. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NEAR_FIELD = 2, /** * Far field noise suppression. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FAR_FIELD = 3, } /** * ASR AEC mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AsrAecMode { /** * Bypass AEC. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BYPASS = 0, /** * Using standard AEC. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 1, } /** * ASR voice control mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AsrVoiceControlMode { /** * Send output stream to TX. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_2_VOICE_TX = 0, /** * Send both output stream and MIC input to TX. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_MIX_2_VOICE_TX = 1, /** * Based on the AUDIO_2_VOICE_TX, Send output stream to voice call record. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_2_VOICE_TX_EX = 2, /** * Based on the AUDIO_MIX_2_VOICE_TX, Send output stream to voice call record. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_MIX_2_VOICE_TX_EX = 3, } /** * ASR voice mute mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AsrVoiceMuteMode { /** * Mute the local output stream. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OUTPUT_MUTE = 0, /** * Mute the local MIC input stream. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INPUT_MUTE = 1, /** * Send tts output stream to TX and mute the local output stream. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TTS_MUTE = 2, /** * Mute the voice call stream. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ CALL_MUTE = 3, /** * Based on the OUTPUT_MUTE, send output stream to voice call record. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OUTPUT_MUTE_EX = 4, } /** * ASR whisper detection mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AsrWhisperDetectionMode { /** * No operation. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BYPASS = 0, /** * Use standard whisper detection model. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 1, } @@ -9356,7 +10144,8 @@ declare namespace audio { * @typedef AsrProcessingController * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AsrProcessingController { /** @@ -9371,7 +10160,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAsrAecMode(mode: AsrAecMode): boolean; @@ -9382,7 +10172,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAsrAecMode(): AsrAecMode; @@ -9398,7 +10189,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAsrNoiseSuppressionMode(mode: AsrNoiseSuppressionMode): boolean; @@ -9409,7 +10201,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAsrNoiseSuppressionMode(): AsrNoiseSuppressionMode; @@ -9420,7 +10213,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isWhispering(): boolean; @@ -9437,7 +10231,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAsrVoiceControlMode(mode: AsrVoiceControlMode, enable: boolean): boolean; @@ -9454,7 +10249,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAsrVoiceMuteMode(mode: AsrVoiceMuteMode, enable: boolean): boolean; @@ -9470,7 +10266,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAsrWhisperDetectionMode(mode: AsrWhisperDetectionMode): boolean; @@ -9481,7 +10278,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAsrWhisperDetectionMode(): AsrWhisperDetectionMode; } @@ -9501,212 +10299,242 @@ declare namespace audio { * is already released. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createAsrProcessingController(audioCapturer: AudioCapturer): AsrProcessingController; /** * Enumerates tone types for player. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum ToneType { /** * Dial tone for key 0. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_0 = 0, /** * Dial tone for key 1. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_1 = 1, /** * Dial tone for key 2. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_2 = 2, /** * Dial tone for key 3. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_3 = 3, /** * Dial tone for key 4. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_4 = 4, /** * Dial tone for key 5. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_5 = 5, /** * Dial tone for key 6. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_6 = 6, /** * Dial tone for key 7. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_7 = 7, /** * Dial tone for key 8. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_8 = 8, /** * Dial tone for key 9. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_9 = 9, /** * Dial tone for key *. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_S = 10, /** * Dial tone for key #. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_P = 11, /** * Dial tone for key A. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_A = 12, /** * Dial tone for key B. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_B = 13, /** * Dial tone for key C. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_C = 14, /** * Dial tone for key D. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_D = 15, /** * Supervisory tone for dial. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_DIAL = 100, /** * Supervisory tone for busy. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_BUSY = 101, /** * Supervisory tone for dial. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_CONGESTION = 102, /** * Supervisory tone for radio path acknowledgment. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_RADIO_ACK = 103, /** * Supervisory tone for radio path not available. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_RADIO_NOT_AVAILABLE = 104, /** * Supervisory tone for call waiting. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_CALL_WAITING = 106, /** * Supervisory tone for ringtone. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_RINGTONE = 107, /** * Supervisory tone for call holding. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_CALL_HOLDING = 108, /** * Proprietary tone for beep. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_PROPRIETARY_BEEP = 200, /** * Proprietary tone for positive acknowledgment. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_PROPRIETARY_ACK = 201, /** * Proprietary tone for prompt. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_PROPRIETARY_PROMPT = 203, /** * Proprietary tone for double beep. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_PROPRIETARY_DOUBLE_BEEP = 204, } @@ -9716,7 +10544,8 @@ declare namespace audio { * @typedef TonePlayer * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface TonePlayer { /** @@ -9725,7 +10554,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ load(type: ToneType, callback: AsyncCallback): void; /** @@ -9734,7 +10564,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ load(type: ToneType): Promise; @@ -9743,7 +10574,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; /** @@ -9751,7 +10583,8 @@ declare namespace audio { * @returns { Promise }Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -9760,7 +10593,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; /** @@ -9768,7 +10602,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -9777,7 +10612,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; /** @@ -9785,7 +10621,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; } @@ -9801,13 +10638,13 @@ declare namespace audio { /** * Describes an audio effect mode group. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Describes an audio effect mode group. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} @@ -9847,7 +10684,8 @@ declare namespace audio { * @typedef AudioSpatialDeviceState * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSpatialDeviceState { /** @@ -9855,7 +10693,8 @@ declare namespace audio { * @type { string } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ address: string; @@ -9864,7 +10703,8 @@ declare namespace audio { * @type { boolean } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isSpatializationSupported: boolean; @@ -9873,7 +10713,8 @@ declare namespace audio { * @type { boolean } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isHeadTrackingSupported: boolean; @@ -9882,14 +10723,15 @@ declare namespace audio { * @type { AudioSpatialDeviceType } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spatialDeviceType: AudioSpatialDeviceType; } /** * Describes a spatial device type group. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi * @since arkts {'1.1':'11','1.2':'20'} @@ -9948,7 +10790,7 @@ declare namespace audio { /** * Describes a spatialization scene type group. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi * @since arkts {'1.1':'12','1.2':'20'} @@ -9992,17 +10834,18 @@ declare namespace audio { /** * Audio AudioChannel Layout * A 64-bit integer indicates that the appearance and order of the speakers for recording or playback. - * @enum { number } + * @enum { long } * @syscap SystemCapability.Multimedia.Audio.Core * @since 11 */ /** * Audio AudioChannel Layout * A 64-bit integer indicates that the appearance and order of the speakers for recording or playback. - * @enum { number } + * @enum { long } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioChannelLayout { /** @@ -10014,7 +10857,8 @@ declare namespace audio { * Unknown Channel Layout * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_UNKNOWN = 0x0, /** @@ -10028,7 +10872,8 @@ declare namespace audio { * Speaker layout: front center(FC) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_MONO = 0x4, /** @@ -10042,14 +10887,16 @@ declare namespace audio { * Speaker layout: front left(FL), front right(FR) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_STEREO = 0x3, /** * Channel Layout For Stereo-Downmix, 2 channels in total * Speaker layout: Stereo left, stereo right * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_STEREO_DOWNMIX = 0x60000000, /** @@ -10063,7 +10910,8 @@ declare namespace audio { * Speaker layout: Stereo plus low-frequency effects(LFE) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_2POINT1 = 0xB, /** @@ -10077,7 +10925,8 @@ declare namespace audio { * Speaker layout: Stereo plus back center(BC) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_3POINT0 = 0x103, /** @@ -10091,7 +10940,8 @@ declare namespace audio { * Speaker layout: Stereo plus FC * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_SURROUND = 0x7, /** @@ -10105,7 +10955,8 @@ declare namespace audio { * Speaker layout: Surround plus LFE * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_3POINT1 = 0xF, /** @@ -10119,7 +10970,8 @@ declare namespace audio { * Speaker layout: Surround plus BC * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_4POINT0 = 0x107, /** @@ -10133,14 +10985,16 @@ declare namespace audio { * Speaker layout: Stereo plus left and right back speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_QUAD = 0x33, /** * Channel Layout For Quad-Side, 4 channels in total * Speaker layout: Stereo plus left and right side speakers(SL, SR) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_QUAD_SIDE = 0x603, /** @@ -10154,28 +11008,32 @@ declare namespace audio { * Speaker layout: Stereo plus left and right top side speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_2POINT0POINT2 = 0x3000000003, /** * Channel Layout For ORDER1-ACN-N3D First Order Ambisonic(FOA), 4 channels in total * First order, Ambisonic Channel Number(ACN) format, Normalization of three-D(N3D) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER1_ACN_N3D = 0x100000000001, /** * Channel Layout For ORDER1-ACN-SN3D FOA, 4 channels in total * First order, ACN format, Semi-Normalization of three-D(SN3D) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER1_ACN_SN3D = 0x100000001001, /** * Channel Layout For ORDER1-FUMA FOA, 4 channels in total * First order, Furse-Malham(FuMa) format * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER1_FUMA = 0x100000000101, /** @@ -10189,7 +11047,8 @@ declare namespace audio { * Speaker layout: 4.0 plus LFE * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_4POINT1 = 0x10F, /** @@ -10203,28 +11062,32 @@ declare namespace audio { * Speaker layout: Surround plus two side speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT0 = 0x607, /** * Channel Layout For 5.0-Back, 5 channels in total * Speaker layout: Surround plus two back speakers * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT0_BACK = 0x37, /** * Channel Layout For 2.1.2, 5 channels in total * Speaker layout: 2.0.2 plus LFE * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_2POINT1POINT2 = 0x300000000B, /** * Channel Layout For 3.0.2, 5 channels in total * Speaker layout: 2.0.2 plus FC * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_3POINT0POINT2 = 0x3000000007, /** @@ -10238,14 +11101,16 @@ declare namespace audio { * Speaker layout: 5.0 plus LFE * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT1 = 0x60F, /** * Channel Layout For 5.1-Back, 6 channels in total * Speaker layout: 5.0-Back plus LFE * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT1_BACK = 0x3F, /** @@ -10259,7 +11124,8 @@ declare namespace audio { * Speaker layout: 5.0 plus BC * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_6POINT0 = 0x707, /** @@ -10273,21 +11139,24 @@ declare namespace audio { * Speaker layout: 5.0-Back plus BC * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_HEXAGONAL = 0x137, /** * Channel Layout For 3.1.2, 6 channels in total * Speaker layout: 3.1 plus two top front speakers(TFL, TFR) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_3POINT1POINT2 = 0x500F, /** * Channel Layout For 6.0-Front, 6 channels in total * Speaker layout: Quad-Side plus left and right front center speakers(FLC, FRC) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_6POINT0_FRONT = 0x6C3, /** @@ -10301,21 +11170,24 @@ declare namespace audio { * Speaker layout: 5.1 plus BC * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_6POINT1 = 0x70F, /** * Channel Layout For 6.1-Back, 7 channels in total * Speaker layout: 5.1-Back plus BC * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_6POINT1_BACK = 0x13F, /** * Channel Layout For 6.1-Front, 7 channels in total * Speaker layout: 6.0-Front plus LFE * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_6POINT1_FRONT = 0x6CB, /** @@ -10329,7 +11201,8 @@ declare namespace audio { * Speaker layout: 5.0 plus two back speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT0 = 0x637, /** @@ -10343,7 +11216,8 @@ declare namespace audio { * Speaker layout: 5.0 plus left and right front center speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT0_FRONT = 0x6C7, /** @@ -10357,7 +11231,8 @@ declare namespace audio { * Speaker layout: 5.1 plus two back speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT1 = 0x63F, /** @@ -10371,7 +11246,8 @@ declare namespace audio { * Speaker layout: 5.0 plus BL, BR and BC. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_OCTAGONAL = 0x737, /** @@ -10385,42 +11261,48 @@ declare namespace audio { * Speaker layout: 5.1 plus two top side speakers. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT1POINT2 = 0x300000060F, /** * Channel Layout For 7.1-Wide, 8 channels in total * Speaker layout: 5.1 plus left and right front center speakers. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT1_WIDE = 0x6CF, /** * Channel Layout For 7.1-Wide, 8 channels in total * Speaker layout: 5.1-Back plus left and right front center speakers. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT1_WIDE_BACK = 0xFF, /** * Channel Layout For ORDER2-ACN-N3D Higher Order Ambisonics(HOA), 9 channels in total * Second order, ACN format, N3D * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER2_ACN_N3D = 0x100000000002, /** * Channel Layout For ORDER2-ACN-SN3D HOA, 9 channels in total * Second order, ACN format, SN3D * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER2_ACN_SN3D = 0x100000001002, /** * Channel Layout For ORDER2-FUMA HOA, 9 channels in total * Second order, FuMa format * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER2_FUMA = 0x100000000102, /** @@ -10434,7 +11316,8 @@ declare namespace audio { * Speaker layout: 5.1 plus four top speakers(TFL, TFR, TBL, TBR) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT1POINT4 = 0x2D60F, /** @@ -10448,7 +11331,8 @@ declare namespace audio { * Speaker layout: 7.1 plus two top side speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT1POINT2 = 0x300000063F, /** @@ -10462,7 +11346,8 @@ declare namespace audio { * Speaker layout: 7.1 plus four top speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT1POINT4 = 0x2D63F, /** @@ -10476,14 +11361,16 @@ declare namespace audio { * Speaker layout: FL, FR, FC, TFL, TFR, BL, BR, BC, SL, SR, wide left(WL), and wide right(WR) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_10POINT2 = 0x180005737, /** * Channel Layout For 9.1.4, 14 channels in total * Speaker layout: 7.1.4 plus two wide speakers(WL, WR) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_9POINT1POINT4 = 0x18002D63F, /** @@ -10497,7 +11384,8 @@ declare namespace audio { * Speaker layout: 9.1.4 plus two top side speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_9POINT1POINT6 = 0x318002D63F, /** @@ -10511,7 +11399,8 @@ declare namespace audio { * Speaker layout: Octagonal plus two wide speakers, six top speakers(TFL, TFR, TFC, TBL, TBR, TBC) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_HEXADECAGONAL = 0x18003F737, /** @@ -10525,7 +11414,8 @@ declare namespace audio { * Third order, ACN format, N3D * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER3_ACN_N3D = 0x100000000003, /** @@ -10539,31 +11429,35 @@ declare namespace audio { * Third order, ACN format, N3D * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER3_ACN_SN3D = 0x100000001003, /** * Channel Layout For ORDER3-FUMA HOA, 16 channels in total * Third order, FuMa format * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER3_FUMA = 0x100000000103 } /** * Enumerates audio effect flags. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enum EffectFlag { /** * Audio render effect. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RENDER_EFFECT_FLAG = 0, @@ -10571,7 +11465,8 @@ declare namespace audio { * Audio capture effect. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CAPTURE_EFFECT_FLAG = 1 } @@ -10581,7 +11476,8 @@ declare namespace audio { * @typedef AudioEffectProperty * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioEffectProperty { /** @@ -10589,7 +11485,8 @@ declare namespace audio { * @type { string } * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -10598,7 +11495,8 @@ declare namespace audio { * @type { string } * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ category: string; @@ -10607,7 +11505,8 @@ declare namespace audio { * @type { EffectFlag } * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ flag: EffectFlag; }