Microsoft DirectX 9.0

Envelope Segments

A parameter curve consists of one or more envelope segments, defined using the MP_ENVELOPE_SEGMENT structure. This structure contains the following information:

The client adds envelope segments to a parameter by calling the IMediaParams::AddEnvelope method and passing in an array of MP_ENVELOPE_SEGMENT structures. The client should sort the segments into ascending time order before calling the method. As the DMO processes data, you can imagine the parameter traveling over each envelope segment, like a car driving over a series of hills. The IMediaParams::GetParam method returns the most recent value.

Two adjacent segments can have a gap between them. During gaps, the parameter retains its previous value, as follows:

You can alter a segment by setting either of the following flags:

You can think of these flags as grabbing the starting point of the segment and moving it up or down, while the ending value remains fixed. The segment will "stretch" accordingly.