From 57ebb1d13532fe495034e8b4f45dc17fbb745f6f Mon Sep 17 00:00:00 2001 From: magekkkk Date: Sat, 9 Sep 2023 13:49:18 +0800 Subject: [PATCH] fix conflict issue Signed-off-by: magekkkk --- api/@ohos.multimedia.audio.d.ts | 50 +++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index cc896b2ff..e5df8f66d 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -2002,7 +2002,7 @@ declare namespace audio { getPreferredOutputDeviceForRendererInfoSync(rendererInfo: AudioRendererInfo): AudioDeviceDescriptors; /** - * Subscribes to preferred output device change events. When preferred device for target audio renderer info changes, + * Subscribes to prefer output device change events. When prefer device for target audio renderer info changes, * registered clients will receive the callback. * @param { 'preferOutputDeviceChangeForRendererInfo' } type - Type of the event to listen for. Only the * preferOutputDeviceChangeForRendererInfo event is supported. @@ -2016,7 +2016,7 @@ declare namespace audio { on(type: 'preferOutputDeviceChangeForRendererInfo', rendererInfo: AudioRendererInfo, callback: Callback): void; /** * UnSubscribes to prefer output device change events. - * @param { 'preferOutputDeviceChangeForRendererInfo' } type - Type of the event to listen for. Only the + * @param { 'preferOutputDeviceChangeForRendererInfo' } type - Type of the event to listen for. Only the * preferOutputDeviceChangeForRendererInfo event is supported. * @param { Callback } callback - Callback used to obtain the changed prefer devices in subscribe. * @throws { BusinessError } 401 - Input parameter type or number mismatch. @@ -2024,6 +2024,52 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @since 10 */ + off(type: 'preferOutputDeviceChangeForRendererInfo', callback?: Callback): void; + + /** + * Get input device for target audio capturer info. + * @param { AudioCapturerInfo } capturerInfo - Audio capturer information. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 401 - If input parameter type or number mismatch. + * @throws { BusinessError } 6800101 - Invalid parameter error. Return by callback. + * @throws { BusinessError } 6800301 - System error. Return by callback. + * @syscap SystemCapability.Multimedia.Audio.Device + * @since 10 + */ + getPreferredInputDeviceForCapturerInfo(capturerInfo: AudioCapturerInfo, callback: AsyncCallback): void; + /** + * Get input device for target audio capturer info. + * @param { AudioCapturerInfo } capturerInfo - Audio capturer information. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 401 - If input parameter type or number mismatch. + * @throws { BusinessError } 6800101 - Invalid parameter error. Return by promise. + * @throws { BusinessError } 6800301 - System error. Return by promise. + * @syscap SystemCapability.Multimedia.Audio.Device + * @since 10 + */ + 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 - if input parameter type or number mismatch + * @throws { BusinessError } 6800101 - if input parameter value error + * @syscap SystemCapability.Multimedia.Audio.Device + * @since 10 + */ + on(type: 'preferredInputDeviceChangeForCapturerInfo', capturerInfo: AudioCapturerInfo, callback: Callback): void; + /** + * Unsubscribes to preferred input device change events. + * @param { 'preferredInputDeviceChangeForCapturerInfo' } type - Type of the event to listen for. + * @param { Callback } callback - Callback used to obtain the changed preferred devices in subscribe. + * @throws { BusinessError } 401 - if input parameter type or number mismatch + * @throws { BusinessError } 6800101 - if input parameter value error + * @syscap SystemCapability.Multimedia.Audio.Device + * @since 10 + */ off(type: 'preferredInputDeviceChangeForCapturerInfo', callback?: Callback): void; /**