1e41f4b71Sopenharmony_ci# Multimedia Subsystem Changelog 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci## cl.multimedia.1 Added Error Code Declaration for APIs of API Version 10 with Input Parameters in @ohos.multimedia.audio.d.ts 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci**Change Impact** 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ciFor an API that carries input parameters, if the parameter type or quantity is incorrect, error code 401 is thrown synchronously. If the parameter value is out of the value range, the corresponding error code is thrown directly for a synchronous API and returned through the **error** object for an asynchronous API. 8e41f4b71Sopenharmony_ciIf the API usage meets the definition requirements, there is no compatibility impact. 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci**Key API/Component Changes** 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ciThe following APIs are involved: 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ci ```ts 15e41f4b71Sopenharmony_cigetPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo, callback: AsyncCallback<AudioDeviceDescriptors>): void; 16e41f4b71Sopenharmony_cigetPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo): Promise<AudioDeviceDescriptors>; 17e41f4b71Sopenharmony_cion(type: 'preferredOutputDeviceChangeForRendererInfo', rendererInfo: AudioRendererInfo, callback: Callback<AudioDeviceDescriptors>): void; 18e41f4b71Sopenharmony_cioff(type: 'preferredOutputDeviceChangeForRendererInfo', callback?: Callback<AudioDeviceDescriptors>): void; 19e41f4b71Sopenharmony_cisetAudioEffectMode(mode: AudioEffectMode, callback: AsyncCallback<void>): void; 20e41f4b71Sopenharmony_cisetAudioEffectMode(mode: AudioEffectMode): Promise<void>; 21e41f4b71Sopenharmony_ci ``` 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ciThe following error code types are added: 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci ```ts 26e41f4b71Sopenharmony_ci// The input parameter type or quantity is incorrect. 27e41f4b71Sopenharmony_ci@throws { BusinessError } 401 - If input parameter type or number mismatch. 28e41f4b71Sopenharmony_ci// The input parameter value is out of the value range. 29e41f4b71Sopenharmony_ci@throws { BusinessError } 6800101 - Invalid parameter error. 30e41f4b71Sopenharmony_ci// Common internal system error. 31e41f4b71Sopenharmony_ci@throws { BusinessError } 6800301 - System error. 32e41f4b71Sopenharmony_ci ``` 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci**Adaptation Guide** 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ciIf error code 401 is thrown, check whether the type and quantity of input parameters comply with the API definition. 37e41f4b71Sopenharmony_ciIf other codes are thrown, check the possible causes and handle the exceptions properly. 38