diff --git a/api/multimedia/soundPool.d.ts b/api/multimedia/soundPool.d.ts index 63d9baad36c7adaf78d71e655738204e6d74cdac..a0f4630dbe15d7500cf2d1b4f9fa6fbf6cd078c9 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; }