struct SHAPE_PCM_CONTEXT {
UINT32 bufferStart : 32;
UINT32 bufferLength : 21;
UINT32 reserved0 : 11;
UINT32 loopCount : 8;
UINT32 reserved1 : 8;
UINT32 full : 1;
UINT32 reserved2 : 15;
UINT32 readPointer : 21;
UINT32 reserved3 : 11;
UINT32 loopStartWritePointer : 21;
UINT32 reserved4 : 11;
UINT32 loopEnd : 21;
UINT32 reserved5 : 11;
UINT32 mode : 1;
UINT32 reserved6 : 15;
UINT32 format : 2;
UINT32 reserved7 : 14;
UINT32 reserved8;
};
bufferStart
Write: Memory byte address of the audio buffer. For circular buffers this value must be frame (128-sample) aligned. For linear buffers this value must be sample aligned.
bufferLength
Write: Length of audio buffer in samples. This value is not frame aligned.
reserved0
Reserved.
loopCount
Read/write: The loop count. This will be decremented each time a loop is completed, unless this value is 0xFF which indicates infinite looping. This value can be zero.
reserved1
Reserved.
full
Write: Only valid for circular buffers. 1 == full buffer, 0 == empty or partially filled buffer.
reserved2
Reserved.
readPointer
Read/write: Frame aligned (128 sample) offset in samples from the beginning of audio buffer (lower 7 bits are ignored). For example, if a PCM stream consists of 4096 stereo samples (so 16,348 bytes in length) a readPointer value of 32 will point to an offset of 128 bytes into the buffer.
reserved3
Reserved.
loopStartWritePointer
Write: Non-frame aligned sample offset from the beginning the audio buffer indicating the loop start (for linear buffers, or the write pointer for circular buffers). The pointer units are in samples (the same as readPointer), so, for example, two stereo 16 bit samples are treated as a single 32 bit sample.
reserved4
Reserved.
loopEnd
Write: Non-frame aligned sample offset from the beginning of the audio buffer indicating the loop end. Minimum loop size if 128 samples.
reserved5
Reserved.
mode
Write: Refer to SHAPE_PCM_MODE.
reserved6
Reserved.
format
Write: Refer to SHAPE_PCM_FORMAT.
reserved7
Reserved.
reserved8
Pad to 32 bytes.
The fields marked as Read: are written to by the ACP library and should only be read by your application. The fields marked Write: are set by your application and not changed by the ACP library. The fields marked Read:write are set by your application but can be changed by the ACP library.
The size of a PCM buffer depends on the PCM buffer format (refer to the remarks for SHAPE_PCM_FORMAT).
Header: Declared in shapepcmcontext.h.
Library: Use acphal.lib.