mirror of
https://github.com/mpv-player/mpv
synced 2024-10-30 04:46:41 +01:00
Add support for 32-bit float WAV files and support for extended WAV files
with 4, 6, 8, ... channels of audio. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14834 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
177a1f03f5
commit
15bb88b706
@ -2171,6 +2171,8 @@ audiocodec pcm
|
||||
status working
|
||||
format 0x0
|
||||
format 0x1
|
||||
format 0x3 ; IEEE float
|
||||
format 0xfffe ; Extended
|
||||
format 0x20776172 ; "raw " (MOV files)
|
||||
format 0x736f7774 ; "twos" (MOV files)
|
||||
format 0x74776f73 ; "sowt" (MOV files)
|
||||
|
@ -28,6 +28,7 @@ static int init(sh_audio_t *sh_audio)
|
||||
switch(sh_audio->format){ /* hardware formats: */
|
||||
case 0x0:
|
||||
case 0x1: // Microsoft PCM
|
||||
case 0xfffe: // Extended
|
||||
switch (sh_audio->samplesize) {
|
||||
case 1: sh_audio->sample_format=AF_FORMAT_U8; break;
|
||||
case 2: sh_audio->sample_format=AF_FORMAT_S16_LE; break;
|
||||
@ -35,6 +36,9 @@ static int init(sh_audio_t *sh_audio)
|
||||
case 4: sh_audio->sample_format=AF_FORMAT_S32_LE; break;
|
||||
}
|
||||
break;
|
||||
case 0x3: // IEEE float
|
||||
sh_audio->sample_format=AF_FORMAT_FLOAT_LE;
|
||||
break;
|
||||
case 0x6: sh_audio->sample_format=AF_FORMAT_A_LAW;break;
|
||||
case 0x7: sh_audio->sample_format=AF_FORMAT_MU_LAW;break;
|
||||
case 0x11: sh_audio->sample_format=AF_FORMAT_IMA_ADPCM;break;
|
||||
|
Loading…
Reference in New Issue
Block a user