changeset 14833:78385a72a8bb

Add support for 32-bit float WAV files and support for extended WAV files with 4, 6, 8, ... channels of audio.
author ivo
date Sat, 26 Feb 2005 23:02:09 +0000
parents 9fa18cfd4f2d
children 2d919650990a
files etc/codecs.conf libmpcodecs/ad_pcm.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/etc/codecs.conf	Sat Feb 26 14:38:37 2005 +0000
+++ b/etc/codecs.conf	Sat Feb 26 23:02:09 2005 +0000
@@ -2171,6 +2171,8 @@
   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)
--- a/libmpcodecs/ad_pcm.c	Sat Feb 26 14:38:37 2005 +0000
+++ b/libmpcodecs/ad_pcm.c	Sat Feb 26 23:02:09 2005 +0000
@@ -28,6 +28,7 @@
   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 @@
          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;