WAVEFORMATEX: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
(link fix)
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:
* [[Microsoft Audio/Video Interleaved]]
* [[Microsoft Audio/Video Interleaved]]
* [[Microsoft Advanced Streaming Format]]
* [[Microsoft Advanced Streaming Format]]
* [[Microsoft xWMA]]
* [[QuickTime container]]
* [[QuickTime container]]
Spec: http://msdn.microsoft.com/en-us/library/dd390970(v=vs.85).aspx


Since the format originated on Windows/Intel computers, the defined, multi-byte numbers are stored in little endian format, even if the data structure appears in QuickTime files.
Since the format originated on Windows/Intel computers, the defined, multi-byte numbers are stored in little endian format, even if the data structure appears in QuickTime files.
Line 15: Line 18:
  bytes 14-15  wBitsPerSample
  bytes 14-15  wBitsPerSample
  bytes 16-17  cbSize
  bytes 16-17  cbSize
  bytes 18..  extradata
  bytes 18..  extradata [actual number of bytes is determined by cbSize field]
 
It is an extension of the WAVEFORMAT data structure, which is exactly 16 bytes long and omits the cbSize field and the associated extradata.
 
It is a subset of the [[WAVEFORMATEXTENSIBLE]] structure, which is typically used for data with more than two channels. A WAVEFORMATEXTENSIBLE structure can be recognized by wFormat being equal to 0xfffe.


[[Category:Multimedia APIs]]
[[Category:Multimedia APIs]]

Latest revision as of 13:06, 22 September 2011

The WAVEFORMATEX data structure defines common properties of an audio stream and occurs in a variety of multimedia file formats, including:

Spec: http://msdn.microsoft.com/en-us/library/dd390970(v=vs.85).aspx

Since the format originated on Windows/Intel computers, the defined, multi-byte numbers are stored in little endian format, even if the data structure appears in QuickTime files.

bytes 0-1    wFormat
bytes 2-3    nChannels
bytes 4-7    nSamplesPerSec
bytes 8-11   nAvgBytesPerSec
bytes 12-13  nBlockAlign
bytes 14-15  wBitsPerSample
bytes 16-17  cbSize
bytes 18..   extradata [actual number of bytes is determined by cbSize field]

It is an extension of the WAVEFORMAT data structure, which is exactly 16 bytes long and omits the cbSize field and the associated extradata.

It is a subset of the WAVEFORMATEXTENSIBLE structure, which is typically used for data with more than two channels. A WAVEFORMATEXTENSIBLE structure can be recognized by wFormat being equal to 0xfffe.