Microsoft DirectX 8.0 (Visual Basic)

DirectSound3DBuffer8.SetMaxDistance

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)

Parts

object
Resolves to a DirectSound3DBuffer8 object.
maxDistance
Maximum distance value.
applyFlag
Value that specifies when the setting should be applied. 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

DirectSound3DBuffer8.GetMaxDistance, DirectSound3DBuffer8.SetMinDistance, Minimum and Maximum Distances