I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

UE3:AudioComponent (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 06:37, 17 January 2010 by Wormbo (Talk | contribs) (1 revision: class descriptions for UDK January update (part 1))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> Component >> ActorComponent >> AudioComponent
Package: 
Engine
Direct subclass:
UTAmbientSoundComponent
This class in other games:
UT3


Properties[edit]

Property group 'AudioComponent'[edit]

HighFrequencyGainMultiplier[edit]

Type: float


Default value: 1.0

InstanceParameters[edit]

Type: array<AudioComponentParam>

Modifiers: editinline

Array of per-instance parameters for this AudioComponent.

PitchMultiplier[edit]

Type: float


Default value: 1.0

SoundCue[edit]

Type: SoundCue


VolumeMultiplier[edit]

Type: float


Default value: 1.0

Internal variables[edit]

See AudioComponent internal variables.

Structs[edit]

AudioComponentParam[edit]

Modifiers: native

Struct used for storing one per-instance named paramter for this AudioComponent. Certain nodes in the SoundCue may reference parameters by name so they can be adjusted per-instance.

name ParamName 
float FloatParam 
SoundNodeWave WaveParam 

Delegates[edit]

OnAudioFinished[edit]

delegate OnAudioFinished (AudioComponent AC)

called when we finish playing audio, either because it played to completion or because a Stop() call turned it off early

OnQueueSubtitles[edit]

delegate OnQueueSubtitles (array<EngineTypes.SubtitleCueSubtitles, float CueDuration)

Called when subtitles are sent to the SubtitleManager. Set this delegate if you want to hijack the subtitles for other purposes

Functions[edit]

Native functions[edit]

AdjustVolume[edit]

native final function AdjustVolume (float AdjustVolumeDuration, float AdjustVolumeLevel)

This will allow one to adjust the volume of an AudioComponent on the fly

FadeIn[edit]

native final function FadeIn (float FadeInDuration, float FadeVolumeLevel)

This is called in place of "play". So you will say AudioComponent->FadeIn(). This is useful for fading in music or some constant playing sound.

If FadeTime is 0.0, this is the same as calling Play() but just modifying the volume by FadeVolumeLevel. (e.g. you will play instantly but the FadeVolumeLevel will affect the AudioComponent)

If FadeTime is > 0.0, this will call Play(), and then increase the volume level of this AudioCompoenent to the passed in FadeVolumeLevel over FadeInTime seconds.

The VolumeLevel is MODIFYING the AudioComponent's "base" volume. (e.g. if you have an AudioComponent that is volume 1000 and you pass in .5 as your VolumeLevel then you will fade to 500 )

Parameters:

  • FadeInDuration - how long it should take to reach the FadeVolumeLevel
  • FadeVolumeLevel - the percentage of the AudioComponents's calculated volume in which to fade to

FadeOut[edit]

native final function FadeOut (float FadeOutDuration, float FadeVolumeLevel)

This is called in place of "stop". So you will say AudioComponent->FadeOut(). This is useful for fading out music or some constant playing sound.

If FadeTime is 0.0, this is the same as calling Stop().

If FadeTime is > 0.0, this will decrease the volume level of this AudioCompoenent to the passed in FadeVolumeLevel over FadeInTime seconds.

The VolumeLevel is MODIFYING the AudioComponent's "base" volume. (e.g. if you have an AudioComponent that is volume 1000 and you pass in .5 as your VolumeLevel then you will fade to 500 )

Parameters:

  • FadeOutDuration - how long it should take to reach the FadeVolumeLevel
  • FadeVolumeLevel - the percentage of the AudioComponents's calculated volume in which to fade to

IsPlaying[edit]

native final function bool IsPlaying ()

Returns TRUE if this component is currently playing a SoundCue.

Play[edit]

native final function Play ()


ResetToDefaults[edit]

native final function ResetToDefaults ()

stops the audio (if playing), detaches the component, and resets the component's properties to the values of its template

SetFloatParameter[edit]

native final function SetFloatParameter (name InName, float InFloat)


SetWaveParameter[edit]

native final function SetWaveParameter (name InName, SoundNodeWave InWave)


Stop[edit]

native final function Stop ()


Events[edit]

OcclusionChanged[edit]

event OcclusionChanged (bool bNowOccluded)

called when OcclusionCheckInterval > 0.0 and the occlusion status changes