SHAPE_PCM_FORMAT
Specifies the enumeration of PCM formats.Syntax
enum SHAPE_PCM_FORMAT
{
SHAPE_PCM_FORMAT_16_BIT_MONO,
SHAPE_PCM_FORMAT_16_BIT_STEREO,
SHAPE_PCM_FORMAT_32_BIT_MONO,
SHAPE_PCM_FORMAT_32_BIT_FLOAT
}
Constants
| Constant | Description |
|---|---|
| SHAPE_PCM_FORMAT_16_BIT_MONO | 16-bit mono. Buffer size is numSamples * sizeof(INT16). |
| SHAPE_PCM_FORMAT_16_BIT_STEREO | 16-bit stereo. Treated as a single 32-bit sample for read and write pointers. Buffer size is numSamples * 2 * sizeof(INT16). |
| SHAPE_PCM_FORMAT_32_BIT_MONO | 24-bit or 32-bit integer mono. Either 24-bit left-justified, or 32-bit with lower 8 bits masked off. Buffer size is numSamples * sizeof(INT32). |
| SHAPE_PCM_FORMAT_32_BIT_FLOAT | 32-bit float mono. Buffer size is numSamples * sizeof(FLOAT32). |
Remarks
| Function | Description |
|---|---|
| Non-looping linear PCM | Start the voice using the SHAPE_SRC_COMMAND_TYPE_START constant for the Sample Rate Convertor (SRC). Let the voice play to the end, or optionally stop it short of the end using the SHAPE_SRC_COMMAND_TYPE_STOP_IMMEDIATE constant. For more information, see the SHAPE_SRC_COMMAND_TYPE enumeration. |
| Infinite looping linear PCM | Set the Pulse Code Modulation (PCM) context loop count loopCount to the SHAPE_PCM_INFINITE_LOOP_COUNT constant. Start the voice using SHAPE_SRC_COMMAND_TYPE_START for the SRC. Let the voice play until you want to stop, either at the end of a loop using SHAPE_SRC_COMMAND_TYPE_STOP_END and let the voice play out, or immediately by using SHAPE_SRC_COMMAND_TYPE_STOP_IMMEDIATE. |
| Finite looping linear PCM | Set the PCM context loop count loopCount to the end, or optionally stop it at the end of a loop using SHAPE_SRC_COMMAND_TYPE_STOP_END and let the voice play out, or stop it immediately by using SHAPE_SRC_COMMAND_TYPE_STOP_IMMEDIATE. |
| Circular PCM | Start the voice using SHAPE_SRC_COMMAND_TYPE_START for the SRC. Keep streaming data, updating the PCM context write pointer, until you want to stop. Use SHAPE_SRC_COMMAND_TYPE_STOP_END to let the SRC play to the current PCM write pointer loopStartWritePointer, or SHAPE_SRC_COMMAND_TYPE_STOP_IMMEDIATE to stop it immediately. |
Requirements
Header: shapepcmcontext.h Supported platforms: XBOX One family consoles and XBOX Series consolesSee also
Overview of ACPOverview of Shape
shapepcmcontext
