未验证 提交 cc6a1df1 编写于 作者: F FULIZHONG 提交者: Gitee

modify audioRecorder parameter Signed-off-by: FULIZHONG<fulizhong1@huawei.com>

上级 7c25dd14
...@@ -28,21 +28,17 @@ describe('RecorderLocalTestAudioAPI', function () { ...@@ -28,21 +28,17 @@ describe('RecorderLocalTestAudioAPI', function () {
const RESET_STATE = 6; const RESET_STATE = 6;
const RELEASE_STATE = 7; const RELEASE_STATE = 7;
const ERROR_STATE = 8; const ERROR_STATE = 8;
const FORMAT_M4A = 6;
const SOURCE_TYPE = 1;
const ENCORDER_AACLC = 3;
const CHANNEL_TWO = 2; const CHANNEL_TWO = 2;
const RECORDER_TIME = 1000; const RECORDER_TIME = 1000;
let fdPath; let fdPath;
let fileAsset; let fileAsset;
let fdNumber; let fdNumber;
let audioConfig = { let audioConfig = {
audioSourceType : SOURCE_TYPE, audioEncoder : media.AudioEncoder.AAC_LC,
audioEncoder : ENCORDER_AACLC,
audioEncodeBitRate : 22050, audioEncodeBitRate : 22050,
audioSampleRate : 22050, audioSampleRate : 22050,
numberOfChannels : CHANNEL_TWO, numberOfChannels : CHANNEL_TWO,
format : FORMAT_M4A, format : media.AudioOutputFormat.AAC_ADTS,
uri : 'file:///data/accounts/account_0/appdata/recorder/testAPI.m4a', uri : 'file:///data/accounts/account_0/appdata/recorder/testAPI.m4a',
location : { latitude : 1, longitude : 1 }, location : { latitude : 1, longitude : 1 },
} }
......
...@@ -21,7 +21,6 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from ' ...@@ -21,7 +21,6 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe('RecorderLocalTestAudioFUNC', function () { describe('RecorderLocalTestAudioFUNC', function () {
let audioRecorder = media.createAudioRecorder(); let audioRecorder = media.createAudioRecorder();
const BASIC_PATH = 'file:///data/accounts/account_0/appdata/recorder/'
const END_STATE = 0; const END_STATE = 0;
const PRE_STATE = 1; const PRE_STATE = 1;
const START_STATE = 2; const START_STATE = 2;
...@@ -34,15 +33,13 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -34,15 +33,13 @@ describe('RecorderLocalTestAudioFUNC', function () {
const RECORDER_TIME = 1000; const RECORDER_TIME = 1000;
const CHANNEL_ONE = 1; const CHANNEL_ONE = 1;
const CHANNEL_TWO = 2; const CHANNEL_TWO = 2;
const FORMAT_MP4 = 2; const FORMAT_MP4 = media.AudioOutputFormat.MPEG_4;
const FORMAT_M4A = 6; const FORMAT_M4A = media.AudioOutputFormat.AAC_ADTS;
const SOURCE_TYPE = 1; const ENCORDER_AACLC = media.AudioEncoder.AAC_LC;
const ENCORDER_AACLC = 3;
let fdPath; let fdPath;
let fileAsset; let fileAsset;
let fdNumber; let fdNumber;
let audioConfig = { let audioConfig = {
audioSourceType : SOURCE_TYPE,
audioEncoder : ENCORDER_AACLC, audioEncoder : ENCORDER_AACLC,
audioEncodeBitRate : 22050, audioEncodeBitRate : 22050,
audioSampleRate : 22050, audioSampleRate : 22050,
...@@ -784,7 +781,6 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -784,7 +781,6 @@ describe('RecorderLocalTestAudioFUNC', function () {
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1400', 0, async function (done) { it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1400', 0, async function (done) {
await getFd('test28.mp4'); await getFd('test28.mp4');
let newAudioConfig = { let newAudioConfig = {
audioSourceType : SOURCE_TYPE,
audioEncodeBitRate : 22050, audioEncodeBitRate : 22050,
audioSampleRate : 22050, audioSampleRate : 22050,
numberOfChannels : CHANNEL_TWO, numberOfChannels : CHANNEL_TWO,
...@@ -812,7 +808,6 @@ describe('RecorderLocalTestAudioFUNC', function () { ...@@ -812,7 +808,6 @@ describe('RecorderLocalTestAudioFUNC', function () {
it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1500', 0, async function (done) { it('SUB_MEDIA_RECORDER_AUDIO_FUNCTION_06_1500', 0, async function (done) {
await getFd('test29.mp4'); await getFd('test29.mp4');
let newAudioConfig = { let newAudioConfig = {
audioSourceType : SOURCE_TYPE,
audioEncodeBitRate : 22050, audioEncodeBitRate : 22050,
audioSampleRate : 22050, audioSampleRate : 22050,
numberOfChannels : CHANNEL_TWO, numberOfChannels : CHANNEL_TWO,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册