Platform SDK: DirectX

DirectSound3DBuffer.SetMaxDistance

The DirectSound3DBuffer.SetMaxDistance method sets the maximum distance for the buffer, which is the distance beyond which the sound is no longer attenuated.

object.SetMaxDistance(maxDistance As Single, _
    applyFlag As CONST_DS3DAPPLYFLAGS)

Parameters

object
Object expression that resolves to a DirectSound3DBuffer object.
maxDistance
Maximum distance value.
applyFlag
Value that indicates when the setting should be applied. This value must be one of the constants of the CONST_DS3DAPPLYFLAGS enumeration.

Error Codes

If the method fails, an error is raised and Err.Number may be DSERR_INVALIDPARAM.

Remarks

The default maximum distance, defined as DS3D_DEFAULTMAXDISTANCE, is effectively infinite.

See Also

DirectSound3DBuffer.GetMaxDistance, DirectSound3DBuffer.SetMinDistance