nw::snd::SoundAmbientParam Structure

Header file: nw/snd/snd_BasicSound.h

Syntax

struct SoundAmbientParam
{
   f32 volume;
   f32 pitch;
   f32 pan;
   f32 span;
   f32 fxSend;
   f32 lpf;
   f32 biquadFilterValue;
   int biquadFilterType;
   int priority;
   u32 userData;
};

Description

Ambient parameter structure.

When 3D sounds are used, you can use this structure to reference the previous 3D sound calculation results, as well as to store the calculation results of the 3D sound engine class. For details, see the reference for the Sound3DEngine::UpdateAmbientParam function.

The biquad filter is set according to the priority given below rather than using overlapping settings for multiple locations. If parameter settings with higher priority have been made for a location, all settings for locations with lower priority are overwritten.

・Sound handle settings
・Sound player settings
・Current ambient parameter structure settings
・Sequence data settings

The amount of effects sent, fxSend, is reflected in the send volume to AUX bus A. The send value to AUX Bus B must be set under SoundMaker and in sequence data using functions like SoundHandle::SetFxSend.

Member Variables

volume f32 Multiplication factor for the sound volume. If 0.0 is specified, no sound is output.
pitch f32 Frequency factor for the sound pitch. Pitch does not change when 1.0 is specified. When 2.0 is specified, the frequency to be reproduced is doubled, and the pitch is one octave higher.
pan f32 Amount of relative change in the pan (right/left location) of the sound. Pitch does not change when 0.0 is specified. When 1.0 is specified, a sound located at the center will be located at the far right, and when -1.0 is specified, a sound that located at the center will be located at the far left.
span f32 Amount of relative change in the pan (front/rear location) of the sound. Pitch does not change when 0.0 is specified. If 1.0 is specified, a sound located in the center is relocated to the front. If 2.0 is specified, a sound located in the center is relocated to the back. Specify a negative number if you wish to move the location toward the front.
fxSend f32 Amount of relative change in the sound effect send. In other words, the send volume is unchanged when 0.0 is specified. When 1.0 is specified, sound that was not be sent to the AUX bus will be sent at the maximum send volume.
lpf f32 Amount of relative change in the cutoff of the low pass filter used with the sound. When 0.0 is specified, the cutoff value is unchanged. When -1.0 is specified, the cutoff frequency changes from applying no filter to applying the maximum filter (the cutoff frequency goes down).
biquadFilterValue f32 Degree to which the biquad filter for the sound is applied. The meaning of this value varies depending on the type of coefficient used by the filter.
biquadFilterType int Biquad filter type for the sound. Use the value of BiquadFilterType. In addition to preset filter types, this parameter can take the value of filter types registered by the user.
priority int Amount of relative change in the player priority of the sound. This value is added to the original player priority.
userData u32 The user can freely use this parameter. It is reset to 0 when the sound is played.

Member Functions

SoundAmbientParam Constructor.

See Also

Sound3DEngine::UpdateAmbientParam
SoundHandle::SetFxSend

Revision History

2010/12/17
Added descriptions of span, fxsend, lpf, biquadFilterValue, and biquadFilterType.
2010/04/08
Deleted the VoiceOutParam member to increase the speed.
2010/03/12
Initial version.

CONFIDENTIAL