Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
b3bcad2e
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b3bcad2e
编写于
8月 09, 2022
作者:
L
lwx1121892
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<audioXTS整改>
Signed-off-by:
N
lwx1121892
<
liuxueqi3@huawei.com
>
上级
7c917232
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
96 addition
and
102 deletion
+96
-102
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturer.test.js
...ndard/audioManager/src/main/js/test/AudioCapturer.test.js
+96
-102
未找到文件。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioCapturer.test.js
浏览文件 @
b3bcad2e
...
...
@@ -23,31 +23,24 @@ describe('audioCapturer', function () {
var
audioCapCallBack
;
var
audioCapPromise
;
var
dirPath
;
var
fpath
;
async
function
getAbilityInfo
(
fileName
)
{
async
function
getFd
(
fileName
)
{
let
context
=
await
featureAbility
.
getContext
();
console
.
info
(
"
case0 context is
"
+
context
);
await
context
.
getFilesDir
().
then
((
data
)
=>
{
console
.
info
(
"
case1 getFilesDir is path
"
+
data
);
fpath
=
data
+
'
/
'
+
fileName
;
console
.
info
(
'
case2 fpath is
'
+
fpath
);
})
}
async
function
getInfo
(
fileName
)
{
let
context
=
await
featureAbility
.
getContext
();
console
.
info
(
"
case0 context is
"
+
context
);
await
context
.
getFilesDir
().
then
((
data
)
=>
{
console
.
info
(
"
case1 getFilesDir is path
"
+
data
);
dirPath
=
data
+
'
/
'
+
fileName
;
console
.
info
(
'
case2
fp
ath is
'
+
dirPath
);
console
.
info
(
'
case2
dirP
ath is
'
+
dirPath
);
})
}
const
audioManager
=
audio
.
getAudioManager
();
console
.
info
(
'
AudioFrameworkRenderLog: Create AudioManger Object JS Framework
'
);
async
function
closeFileDescriptor
()
{
await
resourceManager
.
getResourceManager
().
then
(
async
(
mgr
)
=>
{
await
mgr
.
closeRawFileDescriptor
(
dirPath
).
then
(
value
=>
{
console
.
log
(
'
AudioFrameworkRenderLog:case closeRawFileDescriptor success for file:
'
+
dirPath
);
}).
catch
(
error
=>
{
console
.
log
(
'
AudioFrameworkRenderLog:case closeRawFileDescriptor err:
'
+
error
);
});
});
}
const
audioManagerRec
=
audio
.
getAudioManager
();
console
.
info
(
'
AudioFrameworkRecLog: Create AudioManger Object JS Framework
'
);
beforeAll
(
async
function
()
{
console
.
info
(
'
AudioFrameworkTest: beforeAll: Prerequisites at the test suite level
'
);
await
sleep
(
100
);
...
...
@@ -61,6 +54,7 @@ describe('audioCapturer', function () {
afterEach
(
function
()
{
console
.
info
(
'
AudioFrameworkTest: afterEach: Test case-level clearance conditions
'
);
closeFileDescriptor
();
})
afterAll
(
async
function
()
{
...
...
@@ -73,7 +67,7 @@ describe('audioCapturer', function () {
}
async
function
recPromise
(
AudioCapturerOptions
,
fp
ath
,
AudioScene
)
{
async
function
recPromise
(
AudioCapturerOptions
,
dirP
ath
,
AudioScene
)
{
var
resultFlag
=
'
new
'
;
console
.
info
(
'
AudioFrameworkRecLog: Promise : Audio Recording Function
'
);
...
...
@@ -100,7 +94,7 @@ describe('audioCapturer', function () {
return
resultFlag
;
}
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer : Path :
'
+
fp
ath
);
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer : Path :
'
+
dirP
ath
);
console
.
info
(
'
AudioFrameworkRecLog: AudioCapturer : STATE :
'
+
audioCap
.
state
);
...
...
@@ -160,7 +154,7 @@ describe('audioCapturer', function () {
var
bufferSize
=
await
audioCap
.
getBufferSize
();
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
...
...
@@ -170,7 +164,7 @@ describe('audioCapturer', function () {
return
resultFlag
;
}
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
...
...
@@ -219,7 +213,7 @@ describe('audioCapturer', function () {
}
async
function
recCallBack
(
AudioCapturerOptions
,
fp
ath
,
AudioScene
)
{
async
function
recCallBack
(
AudioCapturerOptions
,
dirP
ath
,
AudioScene
)
{
var
resultFlag
=
true
;
console
.
info
(
'
AudioFrameworkRecLog: CallBack : Audio Recording Function
'
);
...
...
@@ -288,7 +282,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -297,7 +291,7 @@ describe('audioCapturer', function () {
return
resultFlag
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -1032,7 +1026,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_010
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -1079,7 +1073,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -1087,7 +1081,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -1745,7 +1739,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_PROMISE_READ_BUFFER_020
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkpromisereadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkpromisereadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -1791,7 +1785,7 @@ describe('audioCapturer', function () {
stateFlag
=
true
;
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -1799,7 +1793,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -1868,7 +1862,7 @@ describe('audioCapturer', function () {
capturerInfo
:
AudioCapturerInfo
}
await
get
Info
(
"
capture_CB_js-44100-2C-16B.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-16B.pcm
"
);
var
resultFlag
=
await
recCallBack
(
AudioCapturerOptions
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -1903,7 +1897,7 @@ describe('audioCapturer', function () {
capturerInfo
:
AudioCapturerInfo
}
await
get
Info
(
"
capture_CB_js-44100-2C-16B.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-16B.pcm
"
);
var
resultFlag
=
await
recCallBack
(
AudioCapturerOptions
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -1940,7 +1934,7 @@ describe('audioCapturer', function () {
capturerInfo
:
AudioCapturerInfo
}
await
get
Info
(
"
capture_js-44100-2C-16B.pcm
"
);
await
get
Fd
(
"
capture_js-44100-2C-16B.pcm
"
);
var
resultFlag
=
await
recPromise
(
AudioCapturerOptions
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -1979,7 +1973,7 @@ describe('audioCapturer', function () {
capturerInfo
:
AudioCapturerInfo
}
await
get
Info
(
"
capture_js-44100-2C-16B.pcm
"
);
await
get
Fd
(
"
capture_js-44100-2C-16B.pcm
"
);
var
resultFlag
=
await
recPromise
(
AudioCapturerOptions
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2014,7 +2008,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo44100
,
}
await
get
Info
(
"
capture_js-44100-1C-16LE.pcm
"
);
await
get
Fd
(
"
capture_js-44100-1C-16LE.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions44100
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2049,7 +2043,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo44100
,
}
await
get
Info
(
"
capture_js-44100-1C-16LE.pcm
"
);
await
get
Fd
(
"
capture_js-44100-1C-16LE.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions44100
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
...
...
@@ -2084,7 +2078,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo96000
,
}
await
get
Info
(
"
capture_js-96000-1C-S24LE.pcm
"
);
await
get
Fd
(
"
capture_js-96000-1C-S24LE.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions96000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2118,7 +2112,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo96000
,
}
await
get
Info
(
"
capture_js-96000-1C-S24LE.pcm
"
);
await
get
Fd
(
"
capture_js-96000-1C-S24LE.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions96000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2152,7 +2146,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo48000
,
}
await
get
Info
(
"
capture_js-48000-2C-1S32LE.pcm
"
);
await
get
Fd
(
"
capture_js-48000-2C-1S32LE.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions48000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2186,7 +2180,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo48000
,
}
await
get
Info
(
"
capture_js-48000-2C-1S32LE.pcm
"
);
await
get
Fd
(
"
capture_js-48000-2C-1S32LE.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions48000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2220,7 +2214,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo8000
,
}
await
get
Info
(
"
capture_js-8000-1C-8B.pcm
"
);
await
get
Fd
(
"
capture_js-8000-1C-8B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions8000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2254,7 +2248,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo8000
,
}
await
get
Info
(
"
capture_js-8000-1C-8B.pcm
"
);
await
get
Fd
(
"
capture_js-8000-1C-8B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions8000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2288,7 +2282,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo11025
,
}
await
get
Info
(
"
capture_js-11025-2C-16B.pcm
"
);
await
get
Fd
(
"
capture_js-11025-2C-16B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions11025
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2322,7 +2316,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo11025
,
}
await
get
Info
(
"
capture_js-11025-2C-16B.pcm
"
);
await
get
Fd
(
"
capture_js-11025-2C-16B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions11025
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
...
...
@@ -2357,7 +2351,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo12000
,
}
await
get
Info
(
"
capture_js-12000-1C-24B.pcm
"
);
await
get
Fd
(
"
capture_js-12000-1C-24B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions12000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2391,7 +2385,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo12000
,
}
await
get
Info
(
"
capture_js-12000-1C-24B.pcm
"
);
await
get
Fd
(
"
capture_js-12000-1C-24B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions12000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2425,7 +2419,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo16000
,
}
await
get
Info
(
"
capture_js-16000-2C-32B.pcm
"
);
await
get
Fd
(
"
capture_js-16000-2C-32B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions16000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2459,7 +2453,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo16000
,
}
await
get
Info
(
"
capture_js-16000-2C-32B.pcm
"
);
await
get
Fd
(
"
capture_js-16000-2C-32B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions16000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2493,7 +2487,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo22050
,
}
await
get
Info
(
"
capture_js-22050-1C-8B.pcm
"
);
await
get
Fd
(
"
capture_js-22050-1C-8B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions22050
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
console
.
info
(
'
AudioFrameworkRenderLog: resultFlag :
'
+
resultFlag
);
...
...
@@ -2527,7 +2521,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo22050
,
}
await
get
Info
(
"
capture_js-22050-1C-8B.pcm
"
);
await
get
Fd
(
"
capture_js-22050-1C-8B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions22050
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
...
...
@@ -2562,7 +2556,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo24000
,
}
await
get
Info
(
"
capture_js-24000-2C-16B.pcm
"
);
await
get
Fd
(
"
capture_js-24000-2C-16B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions24000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
...
...
@@ -2597,7 +2591,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo24000
,
}
await
get
Info
(
"
capture_js-24000-2C-16B.pcm
"
);
await
get
Fd
(
"
capture_js-24000-2C-16B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions24000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
...
...
@@ -2632,7 +2626,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo32000
,
}
await
get
Info
(
"
capture_js-32000-1C-24B.pcm
"
);
await
get
Fd
(
"
capture_js-32000-1C-24B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions32000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
...
...
@@ -2667,7 +2661,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo32000
,
}
await
get
Info
(
"
capture_js-32000-1C-24B.pcm
"
);
await
get
Fd
(
"
capture_js-32000-1C-24B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions32000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
...
...
@@ -2706,7 +2700,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo64000
,
}
await
get
Info
(
"
capture_js-64000-2C-32B.pcm
"
);
await
get
Fd
(
"
capture_js-64000-2C-32B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions64000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
...
...
@@ -2743,7 +2737,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo64000
,
}
await
get
Info
(
"
capture_js-64000-2C-32B.pcm
"
);
await
get
Fd
(
"
capture_js-64000-2C-32B.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions64000
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_VOICE_CHAT
);
await
sleep
(
100
);
...
...
@@ -2779,7 +2773,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo44100
,
}
await
get
Info
(
"
capture_js-44100-1C-16LE.pcm
"
);
await
get
Fd
(
"
capture_js-44100-1C-16LE.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions44100
,
dirPath
,
audio
.
AudioScene
.
AUDIO_SCENE_DEFAULT
);
await
sleep
(
100
);
...
...
@@ -2815,7 +2809,7 @@ describe('audioCapturer', function () {
capturerInfo
:
audioCapturerInfo44100
,
}
await
get
Info
(
"
capture_js-44100-1C-16LE.pcm
"
);
await
get
Fd
(
"
capture_js-44100-1C-16LE.pcm
"
);
var
resultFlag
=
await
recPromise
(
audioCapturerOptions44100
,
dirPath
,
0
);
await
sleep
(
100
);
...
...
@@ -2837,7 +2831,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_PROMISE_GET_AUDIO_TIME_AFTER_START_055
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -2936,7 +2930,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_PROMISE_GET_AUDIO_TIME_AFTER_READ_WRITE_056
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -2994,7 +2988,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -3002,7 +2996,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -3087,7 +3081,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_PROMISE_GET_AUDIO_TIME_AFTER_STOP_057
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -3145,7 +3139,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -3153,7 +3147,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -4585,7 +4579,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_MARK_5000_REACH_075
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -4644,7 +4638,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -4652,7 +4646,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -4723,7 +4717,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_MARK_1000_REACH_076
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -4782,7 +4776,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -4790,7 +4784,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -4855,7 +4849,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_MARK_10000_REACH_077
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -4914,7 +4908,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -4922,7 +4916,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -4988,7 +4982,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_MARK_100_REACH_078
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -5047,7 +5041,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -5055,7 +5049,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -5121,7 +5115,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_MARK_1_REACH_079
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -5180,7 +5174,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -5188,7 +5182,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -5255,7 +5249,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_MARK_0_REACH_080
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -5314,7 +5308,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -5322,7 +5316,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -5389,7 +5383,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_MARK_LARGEVALUE_REACH_081
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -5448,7 +5442,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -5456,7 +5450,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -5522,7 +5516,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_MARK_NEGATIVEVALUE_REACH_082
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -5581,7 +5575,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -5589,7 +5583,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -5655,7 +5649,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_PERIOD_REACH_1000_084
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -5712,7 +5706,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -5720,7 +5714,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -5810,7 +5804,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_PERIOD_REACH_1_085
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -5867,7 +5861,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -5875,7 +5869,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -5965,7 +5959,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_PERIOD_REACH_NEGATIVE_086
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -6022,7 +6016,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -6030,7 +6024,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
@@ -6121,7 +6115,7 @@ describe('audioCapturer', function () {
it
(
'
SUB_AUDIO_VOIP_CAP_CB_READ_BUFFER_PERIOD_REACH_223750_087
'
,
0
,
async
function
(
done
)
{
var
stateFlag
;
await
get
AbilityInfo
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
await
get
Fd
(
"
capture_CB_js-44100-2C-S16LE-checkcbreadbuffer.pcm
"
);
var
AudioStreamInfo
=
{
samplingRate
:
audio
.
AudioSamplingRate
.
SAMPLE_RATE_44100
,
channels
:
audio
.
AudioChannel
.
CHANNEL_2
,
...
...
@@ -6178,7 +6172,7 @@ describe('audioCapturer', function () {
console
.
info
(
'
AudioFrameworkRecLog: buffer size:
'
+
bufferSize
);
await
sleep
(
1000
);
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE---------
'
);
var
fd
=
fileio
.
openSync
(
fp
ath
,
0o102
,
0o777
);
var
fd
=
fileio
.
openSync
(
dirP
ath
,
0o102
,
0o777
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd created
'
);
}
else
{
...
...
@@ -6186,7 +6180,7 @@ describe('audioCapturer', function () {
stateFlag
=
false
;
}
console
.
info
(
'
AudioFrameworkRecLog: ---------OPEN FILE IN APPEND MODE---------
'
);
fd
=
fileio
.
openSync
(
fp
ath
,
0o2002
,
0o666
);
fd
=
fileio
.
openSync
(
dirP
ath
,
0o2002
,
0o666
);
if
(
fd
!==
null
)
{
console
.
info
(
'
AudioFrameworkRecLog: file fd opened : Append Mode :PASS
'
);
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录