diff --git a/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js b/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js index 30b9509f99dce0e2748dc39f8caf1fc7c6f89982..7de6bbaf8b320f69eaa87bf1a04b4ebc176fcb32 100644 --- a/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js +++ b/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioRenderer.test.js @@ -7523,417 +7523,6 @@ describe('audioRenderer', function () { done(); }) - /* * - * @tc.number : SUB_AUDIO_RENDERER_Play_audio_082 - * @tc.name : AudioRenderer-Set11-Media - CALLBACK - * @tc.desc : AudioRenderer with parameter set 11 - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_RENDERER_Play_audio_082', 0,async function (done) { - var AudioStreamInfo = { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_48000, - channels: audio.AudioChannel.CHANNEL_2, - sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE, - encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW - } - - var AudioRendererInfo = { - content: audio.ContentType.CONTENT_TYPE_SPEECH, - usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, - rendererFlags: 1 - } - - var AudioRendererOptions = { - streamInfo: AudioStreamInfo, - rendererInfo: AudioRendererInfo - } - - readpath='StarWars10s-2C-48000-4SW.wav' - await getFdRead(readpath, done) - var resultFlag = await playbackCB(AudioRendererOptions, readpath); - console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag); - await sleep(9000); - expect(resultFlag).assertTrue(); - await closeFileDescriptor(readpath); - done(); - }) - - /* * - * @tc.number : SUB_AUDIO_RENDERER_Play_audio_083 - * @tc.name : AudioRenderer-Set1-Media - CALLBACK - * @tc.desc : AudioRenderer with parameter set 1 - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_RENDERER_Play_audio_083', 0, async function (done) { - - var AudioStreamInfo = { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_44100, - channels: audio.AudioChannel.CHANNEL_1, - sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S16LE, - encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW - } - - var AudioRendererInfo = { - content: audio.ContentType.CONTENT_TYPE_SPEECH, - usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, - rendererFlags: 1 - } - - var AudioRendererOptions = { - streamInfo: AudioStreamInfo, - rendererInfo: AudioRendererInfo - } - - readpath='StarWars10s-1C-44100-2SW.wav' - await getFdRead(readpath, done) - var resultFlag = await playbackCB(AudioRendererOptions, readpath); - console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag); - await sleep(5000); - expect(resultFlag).assertTrue(); - await closeFileDescriptor(readpath); - done(); - }) - - /* * - * @tc.number : SUB_AUDIO_RENDERER_Play_audio_084 - * @tc.name : AudioRenderer-Set2-Media - CALLBACK - * @tc.desc : AudioRenderer with parameter set 2 - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_RENDERER_Play_audio_084', 0,async function (done) { - var AudioStreamInfo = { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_8000, - channels: audio.AudioChannel.CHANNEL_1, - sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S16LE, - encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW - } - - var AudioRendererInfo = { - content: audio.ContentType.CONTENT_TYPE_SPEECH, - usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, - rendererFlags: 1 - } - - var AudioRendererOptions = { - streamInfo: AudioStreamInfo, - rendererInfo: AudioRendererInfo - } - - readpath='StarWars10s-1C-8000-2SW.wav' - await getFdRead(readpath, done) - var resultFlag = await playbackCB(AudioRendererOptions, readpath); - await sleep(100); - console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag); - expect(resultFlag).assertTrue(); - await closeFileDescriptor(readpath); - done(); - }) - - /* * - * @tc.number : SUB_AUDIO_RENDERER_Play_audio_085 - * @tc.name : AudioRenderer-Set3-Media - CALLBACK - * @tc.desc : AudioRenderer with parameter set 3 - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_RENDERER_Play_audio_085', 0,async function (done) { - var AudioStreamInfo = { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_32000, - channels: audio.AudioChannel.CHANNEL_1, - sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_U8, - encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW - } - - var AudioRendererInfo = { - content: audio.ContentType.CONTENT_TYPE_SPEECH, - usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, - rendererFlags: 1 - } - - var AudioRendererOptions = { - streamInfo: AudioStreamInfo, - rendererInfo: AudioRendererInfo - } - - readpath='StarWars10s-1C-32000-1SW.wav' - await getFdRead(readpath, done) - var resultFlag = await playbackCB(AudioRendererOptions, readpath); - await sleep(100); - console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag); - expect(resultFlag).assertTrue(); - await closeFileDescriptor(readpath); - done(); - }) - - /* * - * @tc.number : SUB_AUDIO_RENDERER_Play_audio_086 - * @tc.name : AudioRenderer-Set4-Media - CALLBACK - * @tc.desc : AudioRenderer with parameter set 4 - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_RENDERER_Play_audio_086', 0,async function (done) { - var AudioStreamInfo = { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_64000, - channels: audio.AudioChannel.CHANNEL_1, - sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S24LE, - encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW - } - - var AudioRendererInfo = { - content: audio.ContentType.CONTENT_TYPE_SPEECH, - usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, - rendererFlags: 1 - } - - var AudioRendererOptions = { - streamInfo: AudioStreamInfo, - rendererInfo: AudioRendererInfo - } - - readpath='StarWars10s-1C-64000-3SW.wav' - await getFdRead(readpath, done) - var resultFlag = await playbackCB(AudioRendererOptions, readpath); - await sleep(100); - console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag); - expect(resultFlag).assertTrue(); - await closeFileDescriptor(readpath); - done(); - }) - - /* * - * @tc.number : SUB_AUDIO_RENDERER_Play_audio_087 - * @tc.name : AudioRenderer-Set5-Media - CALLBACK - * @tc.desc : AudioRenderer with parameter set 5 - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_RENDERER_Play_audio_087', 0,async function (done) { - var AudioStreamInfo = { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_96000, - channels: audio.AudioChannel.CHANNEL_1, - sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S32LE, - encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW - } - - var AudioRendererInfo = { - content: audio.ContentType.CONTENT_TYPE_SPEECH, - usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, - rendererFlags: 1 - } - - var AudioRendererOptions = { - streamInfo: AudioStreamInfo, - rendererInfo: AudioRendererInfo - } - - readpath='StarWars10s-1C-96000-4SW.wav' - await getFdRead(readpath, done) - var resultFlag = await playbackCB(AudioRendererOptions, readpath); - await sleep(100); - console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag); - expect(resultFlag).assertTrue(); - await closeFileDescriptor(readpath); - done(); - }) - - /* * - * @tc.number : SUB_AUDIO_RENDERER_Play_audio_088 - * @tc.name : AudioRenderer-Set6-Media - CALLBACK - * @tc.desc : AudioRenderer with parameter set 6 - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_RENDERER_Play_audio_088', 0,async function (done) { - var AudioStreamInfo = { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_11025, - channels: audio.AudioChannel.CHANNEL_2, - sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_U8, - encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW - } - - var AudioRendererInfo = { - content: audio.ContentType.CONTENT_TYPE_SPEECH, - usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, - rendererFlags: 1 - } - - var AudioRendererOptions = { - streamInfo: AudioStreamInfo, - rendererInfo: AudioRendererInfo - } - - readpath='StarWars10s-2C-11025-1SW.wav' - await getFdRead(readpath, done) - var resultFlag = await playbackCB(AudioRendererOptions, readpath); - await sleep(100); - console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag); - expect(resultFlag).assertTrue(); - await closeFileDescriptor(readpath); - done(); - }) - - /* * - * @tc.number : SUB_AUDIO_RENDERER_Play_audio_089 - * @tc.name : AudioRenderer-Set7-Media - CALLBACK - * @tc.desc : AudioRenderer with parameter set 7 - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_RENDERER_Play_audio_089', 0,async function (done) { - var AudioStreamInfo = { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_12000, - channels: audio.AudioChannel.CHANNEL_2, - sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S16LE, - encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW - } - - var AudioRendererInfo = { - content: audio.ContentType.CONTENT_TYPE_SPEECH, - usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, - rendererFlags: 1 - } - - var AudioRendererOptions = { - streamInfo: AudioStreamInfo, - rendererInfo: AudioRendererInfo - } - - readpath='StarWars10s-2C-12000-2SW.wav' - await getFdRead(readpath, done) - var resultFlag = await playbackCB(AudioRendererOptions, readpath); - await sleep(100); - console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag); - expect(resultFlag).assertTrue(); - await closeFileDescriptor(readpath); - done(); - }) - - /* * - * @tc.number : SUB_AUDIO_RENDERER_Play_audio_090 - * @tc.name : AudioRenderer-Set8-Media - CALLBACK - * @tc.desc : AudioRenderer with parameter set 8 - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_RENDERER_Play_audio_090', 0,async function (done) { - var AudioStreamInfo = { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_16000, - channels: audio.AudioChannel.CHANNEL_2, - sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S24LE, - encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW - } - - var AudioRendererInfo = { - content: audio.ContentType.CONTENT_TYPE_SPEECH, - usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, - rendererFlags: 1 - } - - var AudioRendererOptions = { - streamInfo: AudioStreamInfo, - rendererInfo: AudioRendererInfo - } - - readpath='StarWars10s-2C-16000-3SW.wav' - await getFdRead(readpath, done) - var resultFlag = await playbackCB(AudioRendererOptions, readpath); - await sleep(100); - console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag); - expect(resultFlag).assertTrue(); - await closeFileDescriptor(readpath); - done(); - - }) - - /* * - * @tc.number : SUB_AUDIO_RENDERER_Play_audio_091 - * @tc.name : AudioRenderer-Set9-Media - CALLBACK - * @tc.desc : AudioRenderer with parameter set 9 - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_RENDERER_Play_audio_091', 0,async function (done) { - - var AudioStreamInfo = { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_22050, - channels: audio.AudioChannel.CHANNEL_2, - sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S16LE, - encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW - } - - var AudioRendererInfo = { - content: audio.ContentType.CONTENT_TYPE_SPEECH, - usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, - rendererFlags: 1 - } - - var AudioRendererOptions = { - streamInfo: AudioStreamInfo, - rendererInfo: AudioRendererInfo - } - - readpath='StarWars10s-2C-22050-2SW.wav' - await getFdRead(readpath, done) - var resultFlag = await playbackCB(AudioRendererOptions, readpath); - await sleep(100); - console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag); - expect(resultFlag).assertTrue(); - await closeFileDescriptor(readpath); - done(); - }) - - /* * - * @tc.number : SUB_AUDIO_RENDERER_Play_audio_092 - * @tc.name : AudioRenderer-Set10-Media - CALLBACK - * @tc.desc : AudioRenderer with parameter set 10 - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ - it('SUB_AUDIO_RENDERER_Play_audio_092', 0,async function (done) { - - var AudioStreamInfo = { - samplingRate: audio.AudioSamplingRate.SAMPLE_RATE_24000, - channels: audio.AudioChannel.CHANNEL_2, - sampleFormat: audio.AudioSampleFormat.SAMPLE_FORMAT_S24LE, - encodingType: audio.AudioEncodingType.ENCODING_TYPE_RAW - } - - var AudioRendererInfo = { - content: audio.ContentType.CONTENT_TYPE_SPEECH, - usage: audio.StreamUsage.STREAM_USAGE_VOICE_COMMUNICATION, - rendererFlags: 1 - } - - var AudioRendererOptions = { - streamInfo: AudioStreamInfo, - rendererInfo: AudioRendererInfo - } - - readpath='StarWars10s-2C-24000-3SW.wav' - await getFdRead(readpath, done) - var resultFlag = await playbackCB(AudioRendererOptions, readpath); - await sleep(100); - console.info('AudioFrameworkRenderLog: resultFlag : '+resultFlag); - expect(resultFlag).assertTrue(); - await closeFileDescriptor(readpath); - done(); - }) - /* * @tc.name:SetInterruptMode_001 * @tc.desc:SetInterruptMode mode 0 callback,is public share mode