提交 2e083012 编写于 作者: Q qinliwen

<audio xts整改>

Signed-off-by: Nqinliwen <qinliwen3@huawei.com>
上级 489fe22c
......@@ -1313,17 +1313,29 @@ describe('audioRenderer', function () {
console.info('AudioFrameworkRenderLog: CALLBACK : Audio Playback Function');
var audioRen;
let isPass = false;
audio.createAudioRenderer(AudioRendererOptions, (err, data) => {
if (err) {
console.error(`AudioFrameworkRenderLog: AudioRender Created : Error: ${err.message}`);
resultFlag = false;
LE24 = audio.AudioSampleFormat.SAMPLE_FORMAT_S24LE;
LE32 = audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE;
let sampleFormat = AudioRendererOptions.streamInfo.sampleFormat;
if ((sampleFormat == LE24 || sampleFormat == LE32) && err.code == 202) {
isPass = true;
return;
}
resultFlag = false
}
else {
console.info('AudioFrameworkRenderLog: AudioRender Created : Success : SUCCESS');
audioRen = data;
}
});
console.log(`isPass: ${isPass}`);
if (isPass) {
resultFlag = true;
return resultFlag;
}
if (resultFlag == false) {
console.info('AudioFrameworkRenderLog: resultFlag : ' + resultFlag);
return resultFlag;
......@@ -7388,7 +7400,7 @@ describe('audioRenderer', function () {
var AudioStreamInfo = {
samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000,
channels: audio.AudioChannel.CHANNEL_2,
sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S16LE,
sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
}
......@@ -7537,7 +7549,7 @@ describe('audioRenderer', function () {
var AudioStreamInfo = {
samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_64000,
channels: audio.AudioChannel.CHANNEL_1,
sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S16LE,
sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S24LE,
encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
}
......@@ -7574,7 +7586,7 @@ describe('audioRenderer', function () {
var AudioStreamInfo = {
samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_96000,
channels: audio.AudioChannel.CHANNEL_1,
sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S16LE,
sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE,
encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
}
......@@ -7685,7 +7697,7 @@ describe('audioRenderer', function () {
var AudioStreamInfo = {
samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_16000,
channels: audio.AudioChannel.CHANNEL_2,
sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S16LE,
sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S24LE,
encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
}
......@@ -7762,7 +7774,7 @@ describe('audioRenderer', function () {
var AudioStreamInfo = {
samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_24000,
channels: audio.AudioChannel.CHANNEL_2,
sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S16LE,
sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S24LE,
encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册