Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 |
/** * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. */ class AudioComponent extends ActorComponent native noexport collapsecategories hidecategories(Object) hidecategories(ActorComponent) editinlinenew; var() SoundCue SoundCue; var native const SoundNode CueFirstNode; // This is just a pointer to the root node in SoundCue. /** * 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. */ struct native AudioComponentParam { var() name ParamName; var() float FloatParam; var() SoundNodeWave WaveParam; }; /** Array of per-instance parameters for this AudioComponent. */ var() editinline array<AudioComponentParam> InstanceParameters; /** Spatialise to the owner's coordinates */ var bool bUseOwnerLocation; /** Auto start this component on creation */ var bool bAutoPlay; /** Auto destroy this component on completion */ var bool bAutoDestroy; /** Stop sound when owner is destroyed */ var bool bStopWhenOwnerDestroyed; /** Whether the wave instances should remain active if they're dropped by the prioritization code. Useful for e.g. vehicle sounds that shouldn't cut out. */ var bool bShouldRemainActiveIfDropped; /** whether we were occluded the last time we checked */ var bool bWasOccluded; /** If true, subtitles in the sound data will be ignored. */ var transient bool bSuppressSubtitles; /** Set to true when the component has resources that need cleanup */ var transient bool bWasPlaying; /** Whether audio effects are applied */ var native const bool bApplyEffects; /** Whether to artificially prioritise the component to play */ var native bool bAlwaysPlay; /** Is this audio component allowed to be spatialized? */ var bool bAllowSpatialization; /** Whether or not this sound plays when the game is paused in the UI */ var bool bIsUISound; /** Whether or not this audio component is a music clip */ var transient bool bIsMusic; /** Whether or not the audio component should be excluded from reverb EQ processing */ var transient bool bNoReverb; /** Whether the current component has finished playing */ var transient bool bFinished; /** If TRUE, this sound will not be stopped when flushing the audio device. */ var transient bool bIgnoreForFlushing; var duplicatetransient native const array<pointer> WaveInstances{struct FWaveInstance}; var duplicatetransient native const array<byte> SoundNodeData; /** * We explicitly disregard SoundNodeOffsetMap/WaveMap/ResetWaveMap for GC as all references are already * handled elsewhere and we can't NULL references anyways. */ var duplicatetransient native const Map{USoundNode*,UINT} SoundNodeOffsetMap; var duplicatetransient native const multimap_mirror SoundNodeResetWaveMap{TMultiMap<USoundNode*,FWaveInstance*>}; var duplicatetransient native const pointer Listener{struct FListener}; var duplicatetransient native const float PlaybackTime; var duplicatetransient native const PortalVolume PortalVolume; var duplicatetransient native vector Location; var duplicatetransient native const vector ComponentLocation; /** Used by the subtitle manager to prioritize subtitles wave instances spawned by this component. */ var native float SubtitlePriority; var float FadeInStartTime; var float FadeInStopTime; /** This is the volume level we are fading to **/ var float FadeInTargetVolume; var float FadeOutStartTime; var float FadeOutStopTime; /** This is the volume level we are fading to **/ var float FadeOutTargetVolume; var float AdjustVolumeStartTime; var float AdjustVolumeStopTime; /** This is the volume level we are adjusting to **/ var float AdjustVolumeTargetVolume; var float CurrAdjustVolumeTargetVolume; // Temporary variables for node traversal. var native const SoundNode CurrentNotifyBufferFinishedHook; var native const vector CurrentLocation; var native const float CurrentVolume; var native const float CurrentPitch; var native const float CurrentHighFrequencyGain; var native const int CurrentUseSpatialization; var native const int CurrentUseSeamlessLooping; // Multipliers used before propagation to WaveInstance var native const float CurrentVolumeMultiplier; var native const float CurrentPitchMultiplier; var native const float CurrentVoiceCenterChannelVolume; var native const float CurrentVoiceRadioVolume; // Serialized multipliers used to e.g. override volume for ambient sound actors. var() float VolumeMultiplier; var() float PitchMultiplier; /** while playing, this component will check for occlusion from its closest listener every this many seconds * and call OcclusionChanged() if the status changes */ var float OcclusionCheckInterval; /** last time we checked for occlusion */ var transient float LastOcclusionCheckTime; var const DrawSoundRadiusComponent PreviewSoundRadius; native final function Play(); native final function Stop(); /** Returns TRUE if this component is currently playing a SoundCue. */ native final function bool IsPlaying(); /** * 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 ) * * @param FadeInDuration how long it should take to reach the FadeVolumeLevel * @param FadeVolumeLevel the percentage of the AudioComponents's calculated volume in which to fade to **/ native final function FadeIn( FLOAT FadeInDuration, 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 ) * * @param FadeOutDuration how long it should take to reach the FadeVolumeLevel * @param FadeVolumeLevel the percentage of the AudioComponents's calculated volume in which to fade to **/ native final function FadeOut( FLOAT FadeOutDuration, FLOAT FadeVolumeLevel ); /** * This will allow one to adjust the volume of an AudioComponent on the fly **/ native final function AdjustVolume( FLOAT AdjustVolumeDuration, FLOAT AdjustVolumeLevel ); native final function SetFloatParameter(name InName, float InFloat); native final function SetWaveParameter(name InName, SoundNodeWave InWave); /** stops the audio (if playing), detaches the component, and resets the component's properties to the values of its template */ native final function ResetToDefaults(); /** called when we finish playing audio, either because it played to completion or because a Stop() call turned it off early */ delegate OnAudioFinished(AudioComponent AC); /** called when OcclusionCheckInterval > 0.0 and the occlusion status changes */ event OcclusionChanged(bool bNowOccluded) { VolumeMultiplier *= bNowOccluded ? 0.5 : 2.0; } defaultproperties { bUseOwnerLocation=True bAllowSpatialization=True FadeInStopTime=-1.000000 FadeInTargetVolume=1.000000 FadeOutStopTime=-1.000000 FadeOutTargetVolume=1.000000 AdjustVolumeStopTime=-1.000000 AdjustVolumeTargetVolume=1.000000 CurrAdjustVolumeTargetVolume=1.000000 VolumeMultiplier=1.000000 PitchMultiplier=1.000000 Name="Default__AudioComponent" ObjectArchetype=ActorComponent'Engine.Default__ActorComponent' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |