Miles Sound System SDK 7.2a

AIL_set_sample_3D_cone

The function AIL_set_sample_3D_cone sets the sound emission cone on a sample.

void AIL_set_sample_3D_cone(
  HSAMPLE S,
  F32 inner_angle,
  F32 outer_angle,
  F32 outer_volume
);

In Parameters

S
indicates the sample handle to control.
inner_angle
is the inner angle of the sound cone in degrees (0 to 360). If the listener is within this angle of this sample, then the sound is at its normal volume (based on its initial volume, distance, occlusion, etc).
outer_angle
is the outer angle of the sound cone in degrees (0 to 360). If the listener is outside the inner angle but still inside the outer angle, then the volume is scaled linearly from no scaling (when close to the inner angle) to the outer volume scale (when close or greater than the outer angle).
outer_volume
is the amount to scale the normal volume to when outside the outer angle. A value of 0 means the normal volume is scaled all the way to zero. A volume of 1.0 means that the normal volume isn't scaled at all (and you wouldn't hear the difference when inside or outside of the cone).

Discussion

By default, every sound is omni-directional - the inner and outer angles are 360 degrees and the outer volume is 1.0.

The inner angle should always be smaller than the outer angle.

Example files that use this function: examms.cpp


Group: Digital Audio Services
Related Functions: AIL_calculate_3D_channel_levels, AIL_sample_3D_cone, AIL_set_sample_3D_distances, AIL_set_sample_3D_position
Related Basic Types: F32, HSAMPLE, void
Related FAQs: How do I use multi-channel sound output in Miles?

For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.