未验证 提交 32c6e7a8 编写于 作者: O openharmony_ci 提交者: Gitee

!22528 翻译完成:21954+22002+22130 几个零散刷新

Merge pull request !22528 from wusongqing/TR21954V2
......@@ -74,7 +74,6 @@ Creates an **AudioRenderer** instance. This API uses an asynchronous callback to
**Example**
```js
import featureAbility from '@ohos.ability.featureAbility';
import fs from '@ohos.file.fs';
import audio from '@ohos.multimedia.audio';
......@@ -129,7 +128,6 @@ Creates an **AudioRenderer** instance. This API uses a promise to return the res
**Example**
```js
import featureAbility from '@ohos.ability.featureAbility';
import fs from '@ohos.file.fs';
import audio from '@ohos.multimedia.audio';
......@@ -813,7 +811,7 @@ Describes audio capturer configurations.
| ----------------------------------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| 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 |
| 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>
......@@ -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_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_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|
## AudioPlaybackCaptureConfig<sup>10+</sup><a name="audioplaybackcaptureconfig"></a>
......@@ -5226,36 +5225,32 @@ let bufferSize;
audioRenderer.getBufferSize().then((data)=> {
console.info(`AudioFrameworkRenderLog: getBufferSize: SUCCESS ${data}`);
bufferSize = data;
}).catch((err) => {
console.error(`AudioFrameworkRenderLog: getBufferSize: ERROR: ${err}`);
});
console.info(`Buffer size: ${bufferSize}`);
let context = featureAbility.getContext();
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)
let writeSize = await new Promise((resolve,reject)=>{
audioRenderer.write(buf,(err,writeSize)=>{
if(err){
reject(err)
}else{
resolve(writeSize)
}
console.info(`Buffer size: ${bufferSize}`);
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)
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;
audioRenderer.getBufferSize().then((data) => {
console.info(`AudioFrameworkRenderLog: getBufferSize: SUCCESS ${data}`);
bufferSize = data;
}).catch((err) => {
console.info(`AudioFrameworkRenderLog: getBufferSize: ERROR: ${err}`);
console.info(`BufferSize: ${bufferSize}`);
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}`);
let context = featureAbility.getContext();
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}`);
}
}
}).catch((err) => {
console.info(`AudioFrameworkRenderLog: getBufferSize: ERROR: ${err}`);
});
```
......
......@@ -76,7 +76,7 @@ Visibility verification fails.
**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
......
......@@ -2,7 +2,7 @@
## Overview
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
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
### 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 (AArch64 architecture)
- 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
## Functions Provided by LLDB
- Loading a program to LLDB
- Setting a breakpoint
- Setting an observation point
- Setting a watchpoint
- Starting or attaching to a program
- Executing a control program
- Checking the thread status
- Checking the stack frame status
## 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.
先完成此消息的编辑!
想要评论请 注册