1
0
This commit is contained in:
2020-12-13 18:01:13 +03:00
commit dd42f84140
3764 changed files with 596895 additions and 0 deletions

View File

@ -0,0 +1,21 @@
class ActorFactoryAkAmbientSound extends ActorFactory
config(Editor)
collapsecategories
hidecategories(Object)
native;
cpptext
{
virtual AActor* CreateActor(const FVector* const Location, const FRotator* const Rotation, const class USeqAct_ActorFactory* const ActorFactoryData);
virtual UBOOL CanCreateActor(FString& OutErrorMsg, UBOOL bFromAssetOnly = FALSE);
virtual void AutoFillFields(class USelection* Selection);
virtual FString GetMenuName();
}
var() AKEvent AmbientEvent;
defaultproperties
{
MenuName="Add AkAmbientSound"
NewActorClass=class'AKAudio.AKAmbientSound'
}

View File

@ -0,0 +1,51 @@
//=============================================================================
// Ambient sound, sits there and emits its sound.
// Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
//=============================================================================
class AkAmbientSound extends Keypoint native;
/** Should the audio component automatically play on load? */
//var() bool bAutoPlay; Not showing this parameter to user since it is not working properly yet.
var bool bAutoPlay;
/** Audio component to play */
var() AkEvent PlayEvent;
var() bool StopWhenOwnerIsDestroyed;
/** Is the audio component currently playing? */
var transient private bool bIsPlaying;
cpptext
{
public:
/**
* Start and stop the ambience playback
*/
virtual void StartPlayback();
virtual void StopPlayback();
/** Used by the component to flag the ambient sound as not playing */
void Playing( UBOOL in_IsPlaying );
virtual void FinishDestroy();
protected:
/**
* Starts audio playback if wanted.
*/
virtual void UpdateComponentsInternal(UBOOL bCollisionUpdate = FALSE);
}
defaultproperties
{
Begin Object NAME=Sprite
Sprite=Texture2D'AkResources.Wwise'
End Object
bAutoPlay=TRUE
StopWhenOwnerIsDestroyed=TRUE
bIsPlaying=FALSE
RemoteRole=ROLE_None
}

View File

@ -0,0 +1,96 @@
class AkComponent extends ActorComponent
native
collapsecategories
hidecategories(Object)
hidecategories(ActorComponent)
editinlinenew;
var() Name BoneName;
var AkEvent AutoPlayEvent;
/** Stop sound when owner is destroyed */
var bool bStopWhenOwnerDestroyed;
`if(`__TW_WWISE_)
/** Whether this component is part of the audio device component pool (set to true in UAkAudioDevice::GetPooledAkComponent) */
var transient const bool bPooled;
/** Whether this component is ready to be returned to pool. Gets set on the audio thread, while component actually gets returned on the main thread. */
var transient const bool bWaitingToReturnToPool;
/** Whether sound should follow owner position */
var transient const bool bFollowOwnerPosition;
/** Whether events being played are modified based on listener distance */
var transient bool bUpdateDistanceToListener;
/** Whether events being played are modified based on relative velocity to listener (e.g. for Doppler) */
var transient bool bUpdateRelativeVelocityToListener;
/** Whether this component is forced to use its own OcclusionUpdateInterval (set in defaultproperties) or can adopt a posted event's interval */
var bool bForceOcclusionUpdateInterval; // JDR: can't be transient because we set this in default properties
/** How often to update occlusion or obstruction. Zero means never update. Is set per posted event unless bForceOcclusionUpdateInterval is true. */
var float OcclusionUpdateInterval; // JDR: can't be transient because we set this in default properties
/** last time we updated occlusion */
var transient float LastOcclusionUpdateTime;
/** whether we were occluded the last time we checked */
var transient bool bWasOccluded;
/** Maximum attenuation value of all events played on this component (gets reset when/if component is returned to component pool)*/
var transient float MaxAttenuationValue;
/** The specific location to play this sound. Bone locations specified in BoneName will override this. If not specified plays from the attached actor's location */
var transient vector Location;
/** The relative location to play this sound on based on the location of the actor this component is attached to. Directly setting the location will override this */
var transient vector RelativeLocation;
/** AK::SoundEngine::Query calls (such as GetPosition (of game object)) can take milliseconds (bad).
* Instead, just cache each game object's (AkComponent) position at the same time that it's passed off to the SoundEngine (in SetObjectPosition).
*/
var transient vector CachedObjectPosition;
/** AkEvent to play when this AKComponent stops playing */
var transient AkEvent StopPlayEvent;
/** Filled by AkEvents when they're posted. Reset when/if component is returned to pool */
var transient array<name> CustomRTPCNames;
/** Stops all events being played on this component */
native function StopEvents();
/** Play the given event directly on this component (doesn't go through PlaySoundBase, requires custom replication if desired) */
native function PlayEvent( AkEvent in_Event, optional bool bIsSpatialized, optional bool bIsOccluded, optional bool bDoNotCheckOcclusion );
/** Sets a real-time parameter control on this component */
native function SetRTPCValue( string RTPCString, float RTPCValue );
/** Checks if this component is playing any event, or a specific event if one is provided */
native function bool IsPlaying( optional AkEvent Event );
`endif // __TW_WWISE_
cpptext
{
// Object interface.
virtual void Serialize(FArchive& Ar);
virtual void Attach();
virtual void Detach( UBOOL bWillReattach = FALSE );
virtual void FinishDestroy();
virtual void ShutdownAfterError();
// Methods
void UnregisterGameObject();
void Stop();
#if __TW_WWISE_
// determines if this component should check occlusion
virtual bool ShouldUpdateOcclusion();
// determines if the listener is witin the max attenuation range of the component
virtual bool ListenerWithinMaxRange( INT ListenerIndex = 0 );
// checks occlusion (AudioComponent::CheckOcclusion)
virtual void UpdateOcclusion( INT ListenerIndex = 0);
#endif // __TW_WWISE_
}
defaultproperties
{
`if(`__TW_WWISE_)
bFollowOwnerPosition=True
`endif
}

View File

@ -0,0 +1,44 @@
class InterpTrackAkEvent extends InterpTrack
native;
cpptext
{
// InterpTrack interface
virtual INT GetNumKeyframes() const;
virtual void GetTimeRange(FLOAT& StartTime, FLOAT& EndTime) const;
virtual FLOAT GetKeyframeTime(INT KeyIndex) const;
virtual INT AddKeyframe(FLOAT Time, UInterpTrackInst* TrInst, EInterpCurveMode InitInterpMode);
virtual INT SetKeyframeTime(INT KeyIndex, FLOAT NewKeyTime, UBOOL bUpdateOrder=true);
virtual void RemoveKeyframe(INT KeyIndex);
virtual INT DuplicateKeyframe(INT KeyIndex, FLOAT NewKeyTime);
virtual UBOOL GetClosestSnapPosition(FLOAT InPosition, TArray<INT> &IgnoreKeys, FLOAT& OutPosition);
virtual void PreviewUpdateTrack(FLOAT NewPosition, UInterpTrackInst* TrInst);
virtual void UpdateTrack(FLOAT NewPosition, UInterpTrackInst* TrInst, UBOOL bJump);
/** Get the name of the class used to help out when adding tracks, keys, etc. in UnrealEd.
* @return String name of the helper class.*/
virtual const FString GetEdHelperClassName() const;
virtual class UMaterial* GetTrackIcon() const;
virtual void DrawTrack( FCanvas* Canvas, UInterpGroup* Group, const FInterpTrackDrawParams& Params );
// InterpTrackAkEvent interface
UAkEvent* GetAkEventAtPosition(FLOAT InPosition);
}
/** Information for one sound in the track. */
struct native AkEventTrackKey
{
var float Time;
var() AkEvent Event;
};
/** Array of sounds to play at specific times. */
var array<AkEventTrackKey> AkEvents;
defaultproperties
{
TrackInstClass=class'AkAudio.InterpTrackInstAkEvent'
TrackTitle="AkEvent"
}

View File

@ -0,0 +1,26 @@
class InterpTrackAkRTPC extends InterpTrackFloatBase
native;
cpptext
{
// InterpTrack interface
virtual INT AddKeyframe(FLOAT Time, UInterpTrackInst* TrInst, EInterpCurveMode InitInterpMode);
virtual void UpdateKeyframe(INT KeyIndex, UInterpTrackInst* TrInst);
virtual void PreviewUpdateTrack(FLOAT NewPosition, UInterpTrackInst* TrInst);
virtual void UpdateTrack(FLOAT NewPosition, UInterpTrackInst* TrInst, UBOOL bJump);
/** Get the name of the class used to help out when adding tracks, keys, etc. in UnrealEd.
* @return String name of the helper class.*/
virtual const FString GetEdHelperClassName() const;
virtual class UMaterial* GetTrackIcon() const;
}
/** Name of game parameter */
var() string Param;
defaultproperties
{
TrackInstClass=class'AkAudio.InterpTrackInstAkRTPC'
TrackTitle="AkRTPC"
}

View File

@ -0,0 +1,14 @@
class InterpTrackInstAkEvent extends InterpTrackInst
native;
cpptext
{
virtual void InitTrackInst(UInterpTrack* Track);
virtual void TermTrackInst(UInterpTrack* Track);
}
var float LastUpdatePosition;
defaultproperties
{
}

View File

@ -0,0 +1,12 @@
class InterpTrackInstAkRTPC extends InterpTrackInst
native;
cpptext
{
virtual void InitTrackInst(UInterpTrack* Track);
virtual void TermTrackInst(UInterpTrack* Track);
}
defaultproperties
{
}

View File

@ -0,0 +1,17 @@
class SeqAct_AkClearBanks extends SequenceAction
native;
cpptext
{
void Activated();
};
defaultproperties
{
ObjName="AkClearBanks"
ObjCategory="AkAudio"
VariableLinks.Empty
InputLinks(0)=(LinkDesc="ClearBanks")
}

View File

@ -0,0 +1,33 @@
class SeqAct_AkLoadBank extends SeqAct_Latent
native;
var() bool Async; // Asynchronous loading
var() AkBank Bank; // Bank to be loaded / unloaded
var transient int Signal; // signal (event) used during async load
var transient bool bWaitingCallback;// true if the ojbect must cancel a cookie on destroy.
cpptext
{
void Activated();
UBOOL UpdateOp(FLOAT deltaTime);
virtual void BeginDestroy();
};
defaultproperties
{
ObjName="AkLoadBank"
ObjCategory="AkAudio"
VariableLinks.Empty
OutputLinks.Empty
Async = TRUE
bWaitingCallback = FALSE
InputLinks(0)=(LinkDesc="Load")
InputLinks(1)=(LinkDesc="Unload")
OutputLinks(0)=(LinkDesc="Finished")
}

View File

@ -0,0 +1,32 @@
class SeqAct_AkPostEvent extends SeqAct_Latent
native;
var transient int Signal; // signal (event) used for EndOfEvent
`if(`__TW_WWISE_)
/** If TRUE, will use PlayAkEvent() instead of the audio device to trigger the AkEvent on clients */
var() bool bReplicateToClients;
`endif
cpptext
{
virtual void FinishDestroy();
void Activated();
UBOOL UpdateOp(FLOAT deltaTime);
private:
void PlayEventOnTargets();
};
/** Event to post on the targeted actor(s) */
var() AkEvent Event;
defaultproperties
{
ObjName="AkPostEvent"
ObjCategory="AkAudio"
OutputLinks.Empty
InputLinks(0)=(LinkDesc="Post")
OutputLinks(0)=(LinkDesc="Finished")
}

View File

@ -0,0 +1,17 @@
class SeqAct_AkPostTrigger extends SequenceAction
native;
cpptext
{
void Activated();
};
var() string Trigger;
defaultproperties
{
ObjName="AkPostTrigger"
ObjCategory="AkAudio"
InputLinks(0)=(LinkDesc="Post")
}

View File

@ -0,0 +1,33 @@
class SeqAct_AkSetRTPCValue extends SeqAct_Latent
native;
cpptext
{
void Activated();
UBOOL UpdateOp(FLOAT deltaTime);
private:
void SetRTPCValue();
};
/** Name of game parameter */
var() string Param;
/** Value of game parameter, default value used if no variable linked */
var() float Value;
/** True when sending RTPC signal */
var transient bool Running;
defaultproperties
{
ObjName="AkSetRTPCValue"
ObjCategory="AkAudio"
OutputLinks.Empty
InputLinks(0)=(LinkDesc="Start")
InputLinks(1)=(LinkDesc="Stop")
VariableLinks(1)=(ExpectedType=class'SeqVar_Float',LinkDesc="Value",PropertyName=Value)
OutputLinks(0)=(LinkDesc="Finished")
}

View File

@ -0,0 +1,20 @@
class SeqAct_AkSetState extends SequenceAction
native;
cpptext
{
void Activated();
};
var() string StateGroup;
var() string State;
defaultproperties
{
ObjName="AkSetState"
ObjCategory="AkAudio"
VariableLinks.Empty
InputLinks(0)=(LinkDesc="Set")
}

View File

@ -0,0 +1,18 @@
class SeqAct_AkSetSwitch extends SequenceAction
native;
cpptext
{
void Activated();
};
var() string SwitchGroup;
var() string Switch;
defaultproperties
{
ObjName="AkSetSwitch"
ObjCategory="AkAudio"
InputLinks(0)=(LinkDesc="Set")
}

View File

@ -0,0 +1,18 @@
class SeqAct_AkStartAmbientSound extends SequenceAction
native;
cpptext
{
void Activated();
};
defaultproperties
{
ObjName="AkStartAmbientSound"
ObjCategory="AkAudio"
InputLinks(0)=(LinkDesc="Start All")
InputLinks(1)=(LinkDesc="Stop All")
InputLinks(2)=(LinkDesc="Start Target(s)")
InputLinks(3)=(LinkDesc="Stop Targets(s)")
}

View File

@ -0,0 +1,17 @@
class SeqAct_AkStopAll extends SequenceAction
native;
cpptext
{
void Activated();
};
defaultproperties
{
ObjName="AkStopAll"
ObjCategory="AkAudio"
VariableLinks.Empty
InputLinks(0)=(LinkDesc="StopAll")
}