“9e72cc5c9a4950caf723d35eb6e2eafbd2227ab3”上不存在“doc/howto/git@gitcode.net:s920243400/PaddleDetection.git”
提交 f14c0e90 编写于 作者: W wangzx0705

fix some doc code error

Signed-off-by: Nwangzx0705 <wangzx0705@thundersoft.com>
上级 a2ec4b16
...@@ -3044,7 +3044,7 @@ isVolumeUnadjustable(): boolean ...@@ -3044,7 +3044,7 @@ isVolumeUnadjustable(): boolean
**示例:** **示例:**
```js ```js
bool volumeAdjustSwitch = audioVolumeGroupManager.isVolumeUnadjustable(); let volumeAdjustSwitch = audioVolumeGroupManager.isVolumeUnadjustable();
console.info(`Whether it is volume unadjustable: ${volumeAdjustSwitch}.`); console.info(`Whether it is volume unadjustable: ${volumeAdjustSwitch}.`);
``` ```
...@@ -5758,13 +5758,13 @@ audioRenderer.getCurrentOutputDevices((err, deviceInfo) => { ...@@ -5758,13 +5758,13 @@ audioRenderer.getCurrentOutputDevices((err, deviceInfo) => {
console.error(`getCurrentOutputDevices Fail: ${err}`); console.error(`getCurrentOutputDevices Fail: ${err}`);
} else { } else {
console.info(`DeviceInfo id: ${deviceInfo.id}`); console.info(`DeviceInfo id: ${deviceInfo.id}`);
console.info(`DeviceInfo type: ${descriptor.deviceType}`); console.info(`DeviceInfo type: ${deviceInfo.deviceType}`);
console.info(`DeviceInfo role: ${descriptor.deviceRole}`); console.info(`DeviceInfo role: ${deviceInfo.deviceRole}`);
console.info(`DeviceInfo name: ${descriptor.name}`); console.info(`DeviceInfo name: ${deviceInfo.name}`);
console.info(`DeviceInfo address: ${descriptor.address}`); console.info(`DeviceInfo address: ${deviceInfo.address}`);
console.info(`DeviceInfo samplerates: ${descriptor.sampleRates[0]}`); console.info(`DeviceInfo samplerates: ${deviceInfo.sampleRates[0]}`);
console.info(`DeviceInfo channelcounts: ${descriptor.channelCounts[0]}`); console.info(`DeviceInfo channelcounts: ${deviceInfo.channelCounts[0]}`);
console.info(`DeviceInfo channelmask: ${descriptor.channelMasks}`); console.info(`DeviceInfo channelmask: ${deviceInfo.channelMasks}`);
} }
}); });
``` ```
...@@ -5787,13 +5787,13 @@ getCurrentOutputDevices(): Promise&lt;AudioDeviceDescriptors&gt; ...@@ -5787,13 +5787,13 @@ getCurrentOutputDevices(): Promise&lt;AudioDeviceDescriptors&gt;
```js ```js
audioRenderer.getCurrentOutputDevices().then((deviceInfo) => { audioRenderer.getCurrentOutputDevices().then((deviceInfo) => {
console.info(`DeviceInfo id: ${deviceInfo.id}`); console.info(`DeviceInfo id: ${deviceInfo.id}`);
console.info(`DeviceInfo type: ${descriptor.deviceType}`); console.info(`DeviceInfo type: ${deviceInfo.deviceType}`);
console.info(`DeviceInfo role: ${descriptor.deviceRole}`); console.info(`DeviceInfo role: ${deviceInfo.deviceRole}`);
console.info(`DeviceInfo name: ${descriptor.name}`); console.info(`DeviceInfo name: ${deviceInfo.name}`);
console.info(`DeviceInfo address: ${descriptor.address}`); console.info(`DeviceInfo address: ${deviceInfo.address}`);
console.info(`DeviceInfo samplerates: ${descriptor.sampleRates[0]}`); console.info(`DeviceInfo samplerates: ${deviceInfo.sampleRates[0]}`);
console.info(`DeviceInfo channelcounts: ${descriptor.channelCounts[0]}`); console.info(`DeviceInfo channelcounts: ${deviceInfo.channelCounts[0]}`);
console.info(`DeviceInfo channelmask: ${descriptor.channelMasks}`); console.info(`DeviceInfo channelmask: ${deviceInfo.channelMasks}`);
}).catch((err) => { }).catch((err) => {
console.error(`Get current output devices Fail: ${err}`); console.error(`Get current output devices Fail: ${err}`);
}); });
...@@ -6041,7 +6041,7 @@ on(type: 'outputDeviceChange', callback: Callback\<AudioDeviceDescriptors>): voi ...@@ -6041,7 +6041,7 @@ on(type: 'outputDeviceChange', callback: Callback\<AudioDeviceDescriptors>): voi
**示例:** **示例:**
```js ```js
audioRenderer.on('outputDeviceChange', (deviceChangeInfo) => { audioRenderer.on('outputDeviceChange', (err, deviceChangeInfo) => {
if (err) { if (err) {
console.error(`Subscribes output device change event callback Fail: ${err}`); console.error(`Subscribes output device change event callback Fail: ${err}`);
} else { } else {
...@@ -6073,7 +6073,7 @@ off(type: 'outputDeviceChange', callback?: Callback\<AudioDeviceDescriptors>): v ...@@ -6073,7 +6073,7 @@ off(type: 'outputDeviceChange', callback?: Callback\<AudioDeviceDescriptors>): v
**示例:** **示例:**
```js ```js
audioRenderer.off('outputDeviceChange', (deviceChangeInfo) => { audioRenderer.off('outputDeviceChange', (err,deviceChangeInfo) => {
if (err) { if (err) {
console.error(`Unsubscribes output device change event callback Fail: ${err}`); console.error(`Unsubscribes output device change event callback Fail: ${err}`);
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册