다음을 통해 공유


Samples per Block (Windows CE 5.0)

Send Feedback

ACM codecs must handle multiples of the value in the wSamplesPerBlock member of the WAVEFORMATEX structure. This field is characteristic of the codec and should not be modified.

Internally, an ACM codec knows the number of blocks to encode or decode by the input size.

The ACM driver uses the wSamplesPerBlock member for format validation.

The wSamplesPerBlock member is read by casting a WAVEFORMATEX structure to one of the following structures:

  • WAVEFORMATEXTENSIBLE, defined in Mmreg.h
  • WAVEFORMATEX_PLUGG, defined by the Real-time Communications (RTC) Client API
  • Any locally defined structure that defines wSamplesPerBlock as the next WORD that follows immediately after the WAVEFORMATEX structure

The following code example shows a typical definition for a WAVEFORMATEX structure being used to convey samples per block.

typedef struct _WAVEFORMATEX_G711
{
   /* Generic WAVEFORMATEX fields */
   WAVEFORMATEX     WaveFormatEx;

   /* Number of samples per block */
   WORD             wSamplesPerBlock;
} WAVEFORMATEX_G711;

See Also

Pluggable Codec Requirements

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.