提交 ce687e7f 编写于 作者: G Gloria

Update docs against 21954+22002+22130

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 41d6c63c
...@@ -74,7 +74,6 @@ Creates an **AudioRenderer** instance. This API uses an asynchronous callback to ...@@ -74,7 +74,6 @@ Creates an **AudioRenderer** instance. This API uses an asynchronous callback to
**Example** **Example**
```js ```js
import featureAbility from '@ohos.ability.featureAbility';
import fs from '@ohos.file.fs'; import fs from '@ohos.file.fs';
import audio from '@ohos.multimedia.audio'; import audio from '@ohos.multimedia.audio';
...@@ -129,7 +128,6 @@ Creates an **AudioRenderer** instance. This API uses a promise to return the res ...@@ -129,7 +128,6 @@ Creates an **AudioRenderer** instance. This API uses a promise to return the res
**Example** **Example**
```js ```js
import featureAbility from '@ohos.ability.featureAbility';
import fs from '@ohos.file.fs'; import fs from '@ohos.file.fs';
import audio from '@ohos.multimedia.audio'; import audio from '@ohos.multimedia.audio';
...@@ -813,7 +811,7 @@ Describes audio capturer configurations. ...@@ -813,7 +811,7 @@ Describes audio capturer configurations.
| ----------------------------------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ | | ----------------------------------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| streamInfo | [AudioStreamInfo](#audiostreaminfo8) | Yes | Audio stream information.<br>**System capability**: SystemCapability.Multimedia.Audio.Capturer | | streamInfo | [AudioStreamInfo](#audiostreaminfo8) | Yes | Audio stream information.<br>**System capability**: SystemCapability.Multimedia.Audio.Capturer |
| capturerInfo | [AudioCapturerInfo](#audiocapturerinfo) | Yes | Audio capturer information.<br>**System capability**: SystemCapability.Multimedia.Audio.Capturer | | capturerInfo | [AudioCapturerInfo](#audiocapturerinfo) | Yes | Audio capturer information.<br>**System capability**: SystemCapability.Multimedia.Audio.Capturer |
| playbackCaptureConfig<sup>10+</sup> | [AudioPlaybackCaptureConfig](#audioplaybackcaptureconfig) | No | Configuration of internal audio recording.<br>**System capability**: SystemCapability.Multimedia.Audio.PlaybackCapture | | playbackCaptureConfig<sup>10+</sup> | [AudioPlaybackCaptureConfig](#audioplaybackcaptureconfig) | No | Configuration of internal audio recording.<br>**System capability**: SystemCapability.Multimedia.Audio.PlaybackCapture|
## AudioCapturerInfo<sup>8+</sup><a name="audiocapturerinfo"></a> ## AudioCapturerInfo<sup>8+</sup><a name="audiocapturerinfo"></a>
...@@ -835,7 +833,8 @@ Enumerates the audio source types. ...@@ -835,7 +833,8 @@ Enumerates the audio source types.
| SOURCE_TYPE_INVALID | -1 | Invalid audio source.<br>**System capability**: SystemCapability.Multimedia.Audio.Core | | SOURCE_TYPE_INVALID | -1 | Invalid audio source.<br>**System capability**: SystemCapability.Multimedia.Audio.Core |
| SOURCE_TYPE_MIC | 0 | Mic source.<br>**System capability**: SystemCapability.Multimedia.Audio.Core| | SOURCE_TYPE_MIC | 0 | Mic source.<br>**System capability**: SystemCapability.Multimedia.Audio.Core|
| SOURCE_TYPE_VOICE_RECOGNITION<sup>9+</sup> | 1 | Voice recognition source.<br>**System capability**: SystemCapability.Multimedia.Audio.Core | | SOURCE_TYPE_VOICE_RECOGNITION<sup>9+</sup> | 1 | Voice recognition source.<br>**System capability**: SystemCapability.Multimedia.Audio.Core |
| SOURCE_TYPE_PLAYBACK_CAPTURE<sup>10+</sup> | 2 | Internal audio recording source.<br>**System capability**: SystemCapability.Multimedia.Audio.PlaybackCapture | | SOURCE_TYPE_PLAYBACK_CAPTURE<sup>10+</sup> | 2 | Internal audio recording source.<br>**System capability**: SystemCapability.Multimedia.Audio.PlaybackCapture|
| SOURCE_TYPE_WAKEUP <sup>10+</sup> | 3 | Audio recording source in voice wakeup scenarios.<br>**System capability**: SystemCapability.Multimedia.Audio.Core<br>**Required permissions**: ohos.permission.MANAGE_INTELLIGENT_VOICE <br> This is a system API.|
| SOURCE_TYPE_VOICE_COMMUNICATION | 7 | Voice communication source.<br>**System capability**: SystemCapability.Multimedia.Audio.Core| | SOURCE_TYPE_VOICE_COMMUNICATION | 7 | Voice communication source.<br>**System capability**: SystemCapability.Multimedia.Audio.Core|
## AudioPlaybackCaptureConfig<sup>10+</sup><a name="audioplaybackcaptureconfig"></a> ## AudioPlaybackCaptureConfig<sup>10+</sup><a name="audioplaybackcaptureconfig"></a>
...@@ -5226,36 +5225,32 @@ let bufferSize; ...@@ -5226,36 +5225,32 @@ let bufferSize;
audioRenderer.getBufferSize().then((data)=> { audioRenderer.getBufferSize().then((data)=> {
console.info(`AudioFrameworkRenderLog: getBufferSize: SUCCESS ${data}`); console.info(`AudioFrameworkRenderLog: getBufferSize: SUCCESS ${data}`);
bufferSize = data; bufferSize = data;
}).catch((err) => { console.info(`Buffer size: ${bufferSize}`);
console.error(`AudioFrameworkRenderLog: getBufferSize: ERROR: ${err}`); let path = getContext().cacheDir;
}); let filePath = path + '/StarWars10s-2C-48000-4SW.wav';
console.info(`Buffer size: ${bufferSize}`); let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY);
let context = featureAbility.getContext(); fs.stat(filePath).then(async (stat) => {
let path; let buf = new ArrayBuffer(bufferSize);
async function getCacheDir(){ let len = stat.size % bufferSize == 0 ? Math.floor(stat.size / bufferSize) : Math.floor(stat.size / bufferSize + 1);
path = await context.getCacheDir(); for (let i = 0;i < len; i++) {
} let options = {
let filePath = path + '/StarWars10s-2C-48000-4SW.wav'; offset: i * bufferSize,
let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY); length: bufferSize
fs.stat(path).then((stat) => { }
let buf = new ArrayBuffer(bufferSize); let readsize = await fs.read(file.fd, buf, options)
let len = stat.size % bufferSize == 0 ? Math.floor(stat.size / bufferSize) : Math.floor(stat.size / bufferSize + 1); let writeSize = await new Promise((resolve,reject)=>{
for (let i = 0;i < len; i++) { audioRenderer.write(buf,(err,writeSize)=>{
let options = { if(err){
offset: i * bufferSize, reject(err)
length: bufferSize }else{
} resolve(writeSize)
let readsize = await fs.read(file.fd, buf, options) }
let writeSize = await new Promise((resolve,reject)=>{ })
audioRenderer.write(buf,(err,writeSize)=>{
if(err){
reject(err)
}else{
resolve(writeSize)
}
}) })
}) }
} });
}).catch((err) => {
console.error(`AudioFrameworkRenderLog: getBufferSize: ERROR: ${err}`);
}); });
...@@ -5282,32 +5277,28 @@ let bufferSize; ...@@ -5282,32 +5277,28 @@ let bufferSize;
audioRenderer.getBufferSize().then((data) => { audioRenderer.getBufferSize().then((data) => {
console.info(`AudioFrameworkRenderLog: getBufferSize: SUCCESS ${data}`); console.info(`AudioFrameworkRenderLog: getBufferSize: SUCCESS ${data}`);
bufferSize = data; bufferSize = data;
}).catch((err) => { console.info(`BufferSize: ${bufferSize}`);
console.info(`AudioFrameworkRenderLog: getBufferSize: ERROR: ${err}`); let path = getContext().cacheDir;
let filePath = path + '/StarWars10s-2C-48000-4SW.wav';
let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY);
fs.stat(filePath).then(async (stat) => {
let buf = new ArrayBuffer(bufferSize);
let len = stat.size % bufferSize == 0 ? Math.floor(stat.size / bufferSize) : Math.floor(stat.size / bufferSize + 1);
for (let i = 0;i < len; i++) {
let options = {
offset: i * bufferSize,
length: bufferSize
}
let readsize = await fs.read(file.fd, buf, options)
try{
let writeSize = await audioRenderer.write(buf);
} catch(err) {
console.error(`audioRenderer.write err: ${err}`);
}
}
}); });
console.info(`BufferSize: ${bufferSize}`); }).catch((err) => {
let context = featureAbility.getContext(); console.info(`AudioFrameworkRenderLog: getBufferSize: ERROR: ${err}`);
let path;
async function getCacheDir(){
path = await context.getCacheDir();
}
let filePath = path + '/StarWars10s-2C-48000-4SW.wav';
let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY);
fs.stat(path).then((stat) => {
let buf = new ArrayBuffer(bufferSize);
let len = stat.size % bufferSize == 0 ? Math.floor(stat.size / bufferSize) : Math.floor(stat.size / bufferSize + 1);
for (let i = 0;i < len; i++) {
let options = {
offset: i * bufferSize,
length: bufferSize
}
let readsize = await fs.read(file.fd, buf, options)
try{
let writeSize = await audioRenderer.write(buf);
} catch(err) {
console.error(`audioRenderer.write err: ${err}`);
}
}
}); });
``` ```
......
...@@ -76,7 +76,7 @@ Visibility verification fails. ...@@ -76,7 +76,7 @@ Visibility verification fails.
**Solution** **Solution**
Check whether the application meets the visibility restriction of the started application. Check whether **exported** under the **Ability** field in the **module.json5** file of the application is set to **true**. If this parameter is set to **true**, the ability can be invoked by other applications. If this parameter is set to **false**, the ability cannot be invoked by other applications.
## 16000006 Cross-User Operation Is Not Allowed ## 16000006 Cross-User Operation Is Not Allowed
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
## Overview ## Overview
Low Lever Debugger (LLDB) is a next-generation high-performance debugger. Low Lever Debugger (LLDB) is a next-generation high-performance debugger.
LLDB is developed based on the [llvm15.0.4](https://github.com/llvm/llvm-project/releases/tag/llvmorg-15.0.4) and supports debugging on the home screen and OpenHarmony devices or simulators. LLDB is developed based on [LLVM 15.0.4](https://github.com/llvm/llvm-project/releases/tag/llvmorg-15.0.4) and supports debugging on the home screen and OpenHarmony devices or emulators.
## How to Obtain ## How to Obtain
Obtain the OpenHarmony SDK from http://ci.openharmony.cn/workbench/cicd/dailybuild. Obtain the OpenHarmony SDK from http://ci.openharmony.cn/workbench/cicd/dailybuild.
...@@ -45,7 +45,7 @@ For example, for Windows, **lldb.exe** is stored in the following path after the ...@@ -45,7 +45,7 @@ For example, for Windows, **lldb.exe** is stored in the following path after the
### Remote Debugging ### Remote Debugging
> **Note: During remote debugging, the LLDB server and LLDB must be used together.** > **Note: During remote debugging, lldb-server and lldb must be used together.**
- Debugging the OHOS device on the Windows platform (Arm architecture) - Debugging the OHOS device on the Windows platform (Arm architecture)
- Debugging the OHOS device on the Windows platform (AArch64 architecture) - Debugging the OHOS device on the Windows platform (AArch64 architecture)
- Debugging the simulator on the Windows platform - Debugging the simulator on the Windows platform
...@@ -99,11 +99,11 @@ For example, for Windows, **lldb.exe** is stored in the following path after the ...@@ -99,11 +99,11 @@ For example, for Windows, **lldb.exe** is stored in the following path after the
## Functions Provided by LLDB ## Functions Provided by LLDB
- Loading a program to LLDB - Loading a program to LLDB
- Setting a breakpoint - Setting a breakpoint
- Setting an observation point - Setting a watchpoint
- Starting or attaching to a program - Starting or attaching to a program
- Executing a control program - Executing a control program
- Checking the thread status - Checking the thread status
- Checking the stack frame status - Checking the stack frame status
## References ## References
For details about other functions and commands, see [LLDB Usage Guide](https://gitee.com/openharmony/third_party_llvm-project/blob/master/lldb/README.md) For details about other functions and commands, see [LLDB](https://gitee.com/openharmony/third_party_llvm-project/blob/master/lldb/README.md)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册