From 51ba3e2b07c38ccb1e41b3fa433f6d22c69acafe Mon Sep 17 00:00:00 2001 From: zhangqiang Date: Wed, 18 Jun 2025 14:44:43 +0800 Subject: [PATCH] =?UTF-8?q?20250618=20=20=20SoundPool=E5=88=A0=E9=99=A4HDC?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E5=A4=9A=E4=BD=99=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangqiang --- api/multimedia/soundPool.d.ts | 80 +---------------------------------- 1 file changed, 1 insertion(+), 79 deletions(-) diff --git a/api/multimedia/soundPool.d.ts b/api/multimedia/soundPool.d.ts index 63d9baad36..a0f4630dbe 100644 --- a/api/multimedia/soundPool.d.ts +++ b/api/multimedia/soundPool.d.ts @@ -18,70 +18,11 @@ * @kit MediaKit */ -import type { ErrorCallback, AsyncCallback, Callback, BusinessError } from '../@ohos.base'; +import type { ErrorCallback, AsyncCallback, Callback } from '../@ohos.base'; import type audio from '../@ohos.multimedia.audio'; import media from '../@ohos.multimedia.media'; import resourceManager from '../@ohos.resourceManager'; -/** - * Enumerates the error type. - * @enum { number } - * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 20 - */ -export enum ErrorType { - /** - * Load error. - * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 20 - */ - LOAD_ERROR = 1, - - /** - * Play error. - * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 20 - */ - PLAY_ERROR = 2 -} - -/** - * Interface for error info. - * @typedef { ErrorInfo } - * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 20 - */ -export interface ErrorInfo { - /** - * Error code. - * @type { T } - * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 20 - */ - errorCode: T; - /** - * Error type. - * @type { ?ErrorType } - * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 20 - */ - errorType?: ErrorType; - /** - * Sound id, returned from SoundPool.load function. - * @type { ?number } - * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 20 - */ - soundId?: number; - /** - * Stream id, returned from SoundPool.play function. - * @type { ?number } - * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 20 - */ - streamId?: number; -} - /** * Describes the playback parameters of the sound pool. * @@ -595,24 +536,5 @@ export interface SoundPool { * @since 10 */ off(type: 'error'): void; - /** - * Subscribes to errorOccurred events of this **SoundPool** instance. - * - * @param { 'errorOccurred' } type - Type of the soundpool event to listen for. - * @param { Callback } callback - Callback used to listen for soundpool errorOccurred events. - * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 20 - */ - on(type: 'errorOccurred', callback: Callback): void; - - /** - * Unsubscribes from errorOccurred events of this **SoundPool** instance. - * - * @param { 'errorOccurred' } type - Type of the soundpool event to listen for. - * @param { Callback } [callback] - Callback used to listen for soundpool errorOccurred events. - * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 20 - */ - off(type: 'errorOccurred', callback?: Callback): void; } -- Gitee