From 1576bcbe3388885cd37665eece514041e755c521 Mon Sep 17 00:00:00 2001 From: jiao Date: Mon, 23 Jun 2025 14:15:54 +0800 Subject: [PATCH 1/2] fix TDD Signed-off-by: jiao --- api/@ohos.multimedia.audio.d.ts | 14 ++++++++++++++ api/multimedia/soundPool.d.ts | 23 +++++++++++------------ 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 6389c98849..4e9a3a755f 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -825,6 +825,20 @@ declare namespace audio { * @arkts 1.1&1.2 */ USB_DEVICE = 25, + /** + * HDMI device, such as HDMI, ARC, eARC + * @syscap SystemCapability.Multimedia.Audio.Device + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + HDMI = 27, + /** + * Line connected digital output device, such as s/pdif + * @syscap SystemCapability.Multimedia.Audio.Device + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + LINE_DIGITAL = 28, /** * Distributed virtualization audio device. * @syscap SystemCapability.Multimedia.Audio.Device diff --git a/api/multimedia/soundPool.d.ts b/api/multimedia/soundPool.d.ts index 3ffd0b1176..f819cc1d30 100644 --- a/api/multimedia/soundPool.d.ts +++ b/api/multimedia/soundPool.d.ts @@ -392,7 +392,7 @@ export interface SoundPool { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ -// on(type: 'loadComplete', callback: Callback): void; + on(type: 'loadComplete', callback: Callback): void; /** * Cancel Listens for load result event. * @@ -401,30 +401,29 @@ export interface SoundPool { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ -// off(type: 'loadComplete'): void; + off(type: 'loadComplete'): void; /** * Register the listener for playing finished event. The conditions which this event is called * are the same as {@link #playFinished}, additionally, this event can callback the streamId of finishing playing. * If this event and the {@link #playFinished} event are registered at the same time, * only this event will be called, and the {@link #playFinished} event will not be called. * - * @param {'playFinishedWithStreamId' | 'playFinished' | 'error' | 'loadComplete'} type name of the play finished event to listen for. - * @param {Callback | Callback | ErrorCallback} callback Callback used to listen which stream id has finished playback. + * @param {'playFinishedWithStreamId'} type name of the play finished event to listen for. + * @param {Callback} callback Callback used to listen which stream id has finished playback. * @syscap SystemCapability.Multimedia.Media.SoundPool * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - on(type: 'playFinishedWithStreamId' | 'playFinished' | 'error' | 'loadComplete', - callback: Callback | Callback | ErrorCallback): void; + on(type: 'playFinishedWithStreamId', callback: Callback): void; /** * Cancel listening for playing finished event. * - * @param {'playFinishedWithStreamId' | 'loadComplete' | 'playFinished' | 'error'} type name of the play finished event to listen for. + * @param {'playFinishedWithStreamId'} type name of the play finished event to listen for. * @syscap SystemCapability.Multimedia.Media.SoundPool * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - off(type: 'playFinishedWithStreamId' | 'loadComplete' | 'playFinished' | 'error'): void; + off(type: 'playFinishedWithStreamId'): void; /** * Register listens for play finish event. * @@ -434,7 +433,7 @@ export interface SoundPool { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ -// on(type: 'playFinished', callback: Callback): void; + on(type: 'playFinished', callback: Callback): void; /** * Cancel Listens for play finish event. * @@ -443,7 +442,7 @@ export interface SoundPool { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ -// off(type: 'playFinished'): void; + off(type: 'playFinished'): void; /** * Register listens for sound play error events. * @@ -453,7 +452,7 @@ export interface SoundPool { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ -// on(type: 'error', callback: ErrorCallback): void; + on(type: 'error', callback: ErrorCallback): void; /** * Cancel Listens for sound play error events. * @@ -462,6 +461,6 @@ export interface SoundPool { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ -// off(type: 'error'): void; + off(type: 'error'): void; } -- Gitee From e53bacd6b0349ab45683e50e954b1465f65382ce Mon Sep 17 00:00:00 2001 From: jiao Date: Mon, 23 Jun 2025 09:32:28 +0000 Subject: [PATCH 2/2] update api/multimedia/soundPool.d.ts. Signed-off-by: jiao --- api/multimedia/soundPool.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/multimedia/soundPool.d.ts b/api/multimedia/soundPool.d.ts index f819cc1d30..8d4c735296 100644 --- a/api/multimedia/soundPool.d.ts +++ b/api/multimedia/soundPool.d.ts @@ -449,8 +449,7 @@ export interface SoundPool { * @param {'error'} type Type of the sound play error event to listen for. * @param {ErrorCallback} callback Callback used to listen for sound play error events. * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ on(type: 'error', callback: ErrorCallback): void; /** -- Gitee