Skip to main content

Topic: WAV header (Read 1822 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • poochi
  • [*]
  • Banned
WAV header
how is the wreserved field in set in the wav header while decoding .Flac files using flac 1.2.1 win32 exe  ?
ie If i decode a flac file using flac-1.2.1.exe few files have wreserved field to be 0x10 and few others 0x18 .. but http://msdn.microsoft.com/en-us/library/wi...1(v=vs.85).aspx says i need to make it 0 what exactly is happening ?

Thank you



  • nu774
  • [*][*][*][*][*]
  • Developer
WAV header
Reply #1
Samples field of WAVEFORMATEXTENSIBLE is a discriminated union, and only one of wValidBitsPerSample, wSamplesPerBlock, and wReserved are valid / used, depending on the context.
For detail, read http://msdn.microsoft.com/en-us/library/wi...e/gg463006.aspx

In your case, this field is used not as wReserved, but as wValidBitsPerSample. Therefore, 0x10 means bits per sample is 16, and 0x18 means 24.

  • poochi
  • [*]
  • Banned
WAV header
Reply #2
Thank you it was very helpful