[LAU] sox (or other): Microsoft PCM

Erik de Castro Lopo mle+la at mega-nerd.com
Sun Jul 31 22:57:09 UTC 2011


Atte André Jensen wrote:

> On 07/31/2011 10:30 PM, Erik de Castro Lopo wrote:
> 
> > Would I be able to get a copy of those two files (assuming they're
> > small)? Or at least send me the sndfile-info output on bot files?
> 
> I just sent them to you, offlist...

Thanks.

The one that you say is:

   RIFF (little-endian) data, WAVE audio, mono 44100 Hz

is a plain WAV file that conforms to the original WAV spec. sndfile-info
says:

    File : m.wav
    Length : 93164
    RIFF : 93156
    WAVE
    fmt  : 16
      Format        : 0x1 => WAVE_FORMAT_PCM
      Channels      : 1
      Sample Rate   : 44100
      Block Align   : 2
      Bit Width     : 16
      Bytes/sec     : 88200
    data : 93120

This one on the other hand:

    RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 44100 Hz

conforms to a more recent spec and uses Microsoft's WAVE_FORMAT_EXTENSIBLE
layout. sndfile-info says:

    File : f.wav
    Length : 992330
    RIFF : 992322
    WAVE
    fmt  : 40
      Format        : 0xFFFE => WAVE_FORMAT_EXTENSIBLE
      Channels      : 1
      Sample Rate   : 44100
      Block Align   : 3
      Bit Width     : 24
      Bytes/sec     : 132300
      Valid Bits    : 24
      Channel Mask  : 0x4
      Subformat
        esf_field1 : 0x1
        esf_field2 : 0x0
        esf_field3 : 0x10
        esf_field4 : 0x80 0x0 0x0 0xAA 0x0 0x38 0x9B 0x71 
        format : pcm
    fact : 4
      frames  : 330750
    data : 992250

If you wish to generate one of these using libsndfile, use the SF_FORMAT_WAVEX
subformat instead of SF_FORMAT_WAV.

HTH,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the Linux-audio-user mailing list