mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 03:49:42 +00:00
Bug 1917579 - Add a test for flac decoding. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D221655
This commit is contained in:
parent
e9bccbd55a
commit
ecdd12844e
@ -120,6 +120,12 @@ sox -n -r 48000 sfx.wav synth 1 sine 480
|
|||||||
ffmpeg -i sfx.wav -frames:a 10 -acodec libmp3lame -b:a 96K sfx.mp3
|
ffmpeg -i sfx.wav -frames:a 10 -acodec libmp3lame -b:a 96K sfx.mp3
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### sfx.flac
|
||||||
|
```
|
||||||
|
sox -n -r 48000 sfx.wav synth 1 sine 480
|
||||||
|
ffmpeg -i sfx.wav -frames:a 10 sfx.flac
|
||||||
|
```
|
||||||
|
|
||||||
### sfx-aac.mp4
|
### sfx-aac.mp4
|
||||||
```
|
```
|
||||||
sox -n -r 48000 sfx.wav synth 1 sine 480
|
sox -n -r 48000 sfx.wav synth 1 sine 480
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// META: variant=?pcm_s24
|
// META: variant=?pcm_s24
|
||||||
// META: variant=?pcm_s32
|
// META: variant=?pcm_s32
|
||||||
// META: variant=?pcm_f32
|
// META: variant=?pcm_f32
|
||||||
|
// META: variant=?flac
|
||||||
|
|
||||||
const ADTS_AAC_DATA = {
|
const ADTS_AAC_DATA = {
|
||||||
src: 'sfx.adts',
|
src: 'sfx.adts',
|
||||||
@ -87,6 +88,22 @@ const OPUS_DATA = {
|
|||||||
duration: 20000
|
duration: 20000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const FLAC_DATA = {
|
||||||
|
src: 'sfx.flac',
|
||||||
|
config: {
|
||||||
|
codec: 'flac',
|
||||||
|
sampleRate: 48000,
|
||||||
|
numberOfChannels: 1,
|
||||||
|
description: { offset: 0, size: 8287 }
|
||||||
|
},
|
||||||
|
chunks: [
|
||||||
|
{ offset: 8288, size: 2276 },
|
||||||
|
{ offset: 10564, size: 2038 },
|
||||||
|
{ offset: 12602, size: 521 },
|
||||||
|
],
|
||||||
|
duration: 20000
|
||||||
|
};
|
||||||
|
|
||||||
function pcm(codec, dataOffset) {
|
function pcm(codec, dataOffset) {
|
||||||
return {
|
return {
|
||||||
src: `sfx-${codec}.wav`,
|
src: `sfx-${codec}.wav`,
|
||||||
@ -153,6 +170,7 @@ promise_setup(async () => {
|
|||||||
'?pcm_s24': PCM_S24_DATA,
|
'?pcm_s24': PCM_S24_DATA,
|
||||||
'?pcm_s32': PCM_S32_DATA,
|
'?pcm_s32': PCM_S32_DATA,
|
||||||
'?pcm_f32': PCM_F32_DATA,
|
'?pcm_f32': PCM_F32_DATA,
|
||||||
|
'?flac': FLAC_DATA,
|
||||||
}[location.search];
|
}[location.search];
|
||||||
|
|
||||||
// Don't run any tests if the codec is not supported.
|
// Don't run any tests if the codec is not supported.
|
||||||
|
0
testing/web-platform/tests/webcodecs/sfx.flac
Normal file
0
testing/web-platform/tests/webcodecs/sfx.flac
Normal file
Loading…
x
Reference in New Issue
Block a user