The ACM uses stream functions to support data format conversion. Converters in the ACM change the format, but not the data type. For example, a converter module can change 44-kHz, 16-bit data to 44-kHz, 8-bit data.
The following ACM functions support data format conversion. They are listed in the order in which you would typically use them.
When converting data, first identify the source format, then choose the destination format. The easiest way to do this is by using the acmFormatChoose function, which displays a format-selection dialog box and returns the user's format choice.
When you know the source and destination formats, you can use acmStreamOpen to open a conversion stream. Then you can use the acmStreamSize function to determine the appropriate buffer sizes.
The next step is to prepare the buffers to be used in the conversion by using acmStreamPrepareHeader.
To perform the conversion, use acmStreamConvert until all the buffers have been processed. When the conversion is complete, use acmStreamUnprepareHeader to clean up the buffers and then use acmStreamClose to close the conversion stream.