1# Multimedia Subsystem Changelog
2
3## cl.multimedia.1 Implementation Error of AudioRenderer.getCurrentOutputDevices Corrected
4
5According to the definition, the **getCurrentOutputDevices** API of the **AudioRenderer** class should return the **AudioDeviceDescriptors** type, that is, an array of the **AudioDeviceDescriptor** types. However, the **AudioDeviceDescriptor** type is returned in the API implementation and XTS test case in the earlier versions. This error is rectified.
6
7**Change Impact**
8
9Applications that use the involved API may have compatibility issues.
10
11**Key API/Component Changes**
12
13Before change:
14
15```ts
16// AudioRenderer API
17getCurrentOutputDevices(callback: AsyncCallback<AudioDeviceDescriptors>): void
18getCurrentOutputDevices(): Promise<AudioDeviceDescriptors>;
19```
20
21After change:
22
23The API definition remains unchanged, but the API now correctly returns the **AudioDeviceDescriptors** type.
24
25**Adaptation Guide**
26
27If you implement the API according to the declared type, no adaptation is required.
28If you refer to the original XTS test case to implement the API and mask the alarm indicating API definition mismatch during invoking, you must change the implementation accordingly.
29
30## cl.multimedia.2 Implementation of Error Code 401 Modified for Synchronous APIs
31
32For certain APIs that contain input parameters and is of API version 10, if a mandatory parameter is not passed in or an incorrect parameter type is passed in, the APIs should throw exceptions in synchronous mode based on the API declaration.
33However, these APIs do not throw exceptions as expected. This error is rectified.
34
35**Change Impact**
36
37The scenario where these APIs are incorrectly used is affected.
38
39**Key API/Component Changes**
40
41Before change:
42
43```ts
44// AudioRenderer API
45adjustVolumeByStep(adjustType: VolumeAdjustType, callback: AsyncCallback<void>): void;
46adjustVolumeByStep(adjustType: VolumeAdjustType): Promise<void>;
47adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustType, callback: AsyncCallback<void>): void;
48adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustType): Promise<void>;
49getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType, callback: AsyncCallback<number>): void;
50getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType): Promise<number>;
51setAudioEffectMode(mode: AudioEffectMode, callback: AsyncCallback<void>): void;
52setAudioEffectMode(mode: AudioEffectMode): Promise<void>;
53getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo, callback: AsyncCallback<AudioDeviceDescriptors>): void;
54getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo): Promise<AudioDeviceDescriptors>;
55```
56
57After change:
58
59```ts
60// The description of error code 401 is adjusted.
61@throws { BusinessError } 401 - Input parameter type or number mismatch.
62```
63
64**Adaptation Guide**
65
66If the API is called correctly, no adaptation is required. If an exception is thrown, pass in parameters according to the API definition.
67