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

!19959 翻译完成:19639+19641 修改音效管理框架打印结果

Merge pull request !19959 from wusongqing/TR19639
......@@ -109,7 +109,7 @@ Create an **AudioStreamManager** instance. Before using **AudioStreamManager** A
```js
audioStreamManager.getAudioEffectInfoArray(audio.ContentType.CONTENT_TYPE_MUSIC, audio.StreamUsage.STREAM_USAGE_MEDIA, async (err, audioEffectInfoArray) => {
if (err) {
console.error(`Failed to get effect info array`);
console.error('Failed to get effect info array');
return;
} else {
console.info(`getAudioEffectInfoArray: ${audioEffectInfoArray}`);
......
......@@ -3431,7 +3431,7 @@ audioStreamManager.getAudioEffectInfoArray(audio.ContentType.CONTENT_TYPE_MUSIC,
console.error(`getAudioEffectInfoArray :ERROR: ${err}`);
return;
} else {
console.info(`The contentType of ${CONTENT_TYPE_MUSIC} and the streamUsage of ${STREAM_USAGE_MEDIA} 's effect modes are: ${audioEffectInfoArray}`);
console.info(`The effect modes are: ${audioEffectInfoArray}`);
}
});
```
......@@ -3460,9 +3460,9 @@ Obtains information about the sound effect mode in use. This API uses a promise
**Example**
```js
audioStreamManager.getAudioEffectInfoArray().then((audioEffectInfoArray) => {
console.info(`getAudioEffectInfoArray ######### Get Promise is called ##########`);
console.info(`The contentType of ${CONTENT_TYPE_MUSIC} and the streamUsage of ${STREAM_USAGE_MEDIA} 's effect modes are: ${audioEffectInfoArray}`);
audioStreamManager.getAudioEffectInfoArray(audio.ContentType.CONTENT_TYPE_MUSIC, audio.StreamUsage.STREAM_USAGE_MEDIA).then((audioEffectInfoArray) => {
console.info('getAudioEffectInfoArray ######### Get Promise is called ##########');
console.info(`The effect modes are: ${audioEffectInfoArray}`);
}).catch((err) => {
console.error(`getAudioEffectInfoArray :ERROR: ${err}`);
});
......@@ -4895,9 +4895,9 @@ async function getCacheDir(){
}
let filePath = path + '/StarWars10s-2C-48000-4SW.wav';
let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY);
let stat = await fs.stat(path);
let currStat = await fs.stat(path);
let buf = new ArrayBuffer(bufferSize);
let len = stat.size % bufferSize == 0 ? Math.floor(stat.size / bufferSize) : Math.floor(stat.size / bufferSize + 1);
let len = currStat.size % bufferSize == 0 ? Math.floor(currStat.size / bufferSize) : Math.floor(currStat.size / bufferSize + 1);
for (let i = 0;i < len; i++) {
let options = {
offset: i * bufferSize,
......@@ -4949,9 +4949,9 @@ async function getCacheDir(){
}
let filePath = path + '/StarWars10s-2C-48000-4SW.wav';
let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY);
let stat = await fs.stat(path);
let currStat = await fs.stat(path);
let buf = new ArrayBuffer(bufferSize);
let len = stat.size % bufferSize == 0 ? Math.floor(stat.size / bufferSize) : Math.floor(stat.size / bufferSize + 1);
let len = currStat.size % bufferSize == 0 ? Math.floor(currStat.size / bufferSize) : Math.floor(currStat.size / bufferSize + 1);
for (let i = 0;i < len; i++) {
let options = {
offset: i * bufferSize,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册