Microsoft DirectX 8.1 (Visual Basic)

DirectSound3DBuffer8.SetMaxDistance

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

Syntax

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