nw::snd::Sound3DParam Structure

Header file: nw/snd/snd_Sound3DManager.h

Syntax

struct Sound3DParam
{
   math::VEC3 position;
   math::VEC3 velocity;
   u32 ctrlFlag;
   u32 actorUserParam;
   u32 soundUserParam;
   f32 decayRatio;
   u8 decayCurve;
   u8 dopplerFactor;
};

Description

These are 3D sound parameters.

3D sound is calculated using these parameters.

Values set for each sound using SoundMaker are assigned to ctrlFlag, decayCurve, decayRatio, dopplerFactor and soundUserParam.

actorUserParam is assigned the value set for Sound3DActor::SetUserParam.

dopplerFactor represents the application of the Doppler effect. Sound does not change when 0. The later the value, the greater the change.

Member Variables

position math::VEC3 The 3D sound actor's current position.
velocity math::VEC3 The 3D sound actor's velocity.
ctrlFlag u32 Parameter control flag Used internally by the sound library.
actorUserParam u32 The user parameter set for the actor.
soundUserParam u32 The user parameter set for the sound.
decayRatio f32 The attenuation rate of the sound when the actor and listener are separated by one volume attenuation unit of distance.
decayCurve u8 The type of the volume attenuation curve. Sets the value of DecayCurve.
dopplerFactor u8 The Doppler factor.

Member Functions

Sound3DParam Constructor.

See Also

Sound3DEngine::UpdateAmbientParam
Sound3DActor::SetUserParam
DecayCurve
nw::math::VEC3

Revision History

2010/03/12
Initial version.

CONFIDENTIAL