Microsoft DirectX 8.1 (Visual Basic) |
Creates a force-feedback effect consisting of a series of constant forces of fixed duration.
object.CreateCustomEffect(effectinfo As DIEFFECT, _ channels As Long, samplePeriod As Long, _ nSamples As Long, sampledata() As Long) _ As DirectInputEffect
If there is only a single channel, then the effect will be rotated in the direction specified by the x member of the DIEFFECT type. Not all devices support rotation of custom effects.
If there is more than one channel, the first channel is applied to the x-axis and the second to the y-axis. Rotation is not allowed.
In theory, samplePeriod is the length of time for which each magnitude in sampledata is valid, whereas DIEFFECT.lSamplePeriod is the length of time between samplings of the data (and the minimum time between changes in magnitude). Since each element in the array needs to be sampled exactly once on each iteration through the array, and some drivers ignore samplePeriod in any case, it is best to make the values of lSamplePeriod and samplePeriod identical.