Skip to main content
Version: 2.x

UOdinCloneEffect

Codec-Effect for the odin audio pipeline. The effect will invoke Callback function with a copy of samples buffer and if bound to the delegate, a clone of that buffer. Callback will be called on the GameThread by default.

Declaration
UCLASS(ClassGroup = Odin)
class ODIN_API UOdinCloneEffect : public UOdinCustomEffect

Overview​

Functions​

NameDescription
CallbackCallback function on copy of samples in GameThread
ConstructCloneEffectCreates a Clone Effect that is not part of a pipeline yet; add it with Insert Custom Effect.

Properties​

NameDescription
SampleRateSample rate of the cloned audio.
StereoTrue if the cloned audio is interleaved stereo.
UserData

Events​

NameDescription
OnDispatchCloneCallbackBPRaised on the game thread with a copy of the audio samples that passed through the effect.
PostResponseDeclared for effects derived from the Clone Effect; the built-in effect does not raise it.

Functions​

Callback​

Virtual · Const

Callback function on copy of samples in GameThread

virtual void Callback(Audio::TSampleBuffer<float> Buffer) const;
ParameterTypeDescription
BufferAudio::TSampleBuffer<float>the buffer copy of samples

ConstructCloneEffect​

Static · Blueprint: Construct Clone Effect

Creates a Clone Effect that is not part of a pipeline yet; add it with Insert Custom Effect. It copies the audio passing through it to On Dispatch Clone Callback on the game thread. Create Clone Effect on a pipeline does both steps.

UFUNCTION(BlueprintCallable, Category = "Odin|Audio Pipeline|Effects")
static UOdinCloneEffect* ConstructCloneEffect(UObject* WorldContextObject);
ParameterTypeDescription
WorldContextObjectUObject*

Returns UOdinCloneEffect*

Properties​

SampleRate​

Blueprint: Get/Set

Sample rate of the cloned audio.

UPROPERTY(BlueprintReadWrite, Category = "Odin|Effect")
int32 SampleRate = 48000;

Stereo​

Blueprint: Get/Set

True if the cloned audio is interleaved stereo.

UPROPERTY(BlueprintReadWrite, Category = "Odin|Effect")
bool Stereo = false;

UserData​

TOdinCustomEffectUserData<UOdinCloneEffect> UserData;

Events​

OnDispatchCloneCallbackBP​

Blueprint: On Dispatch Clone Callback

Raised on the game thread with a copy of the audio samples that passed through the effect.

UPROPERTY(BlueprintAssignable, Category = "Odin|Audio Pipeline|Events")
FOdinDispatchCloneCallbackDelegate OnDispatchCloneCallbackBP;

Signature: FOdinDispatchCloneCallbackDelegate void(const TArray<float>& SampleData) (multicast)

PostResponse​

Blueprint: Post Response (Clone Effect)

Declared for effects derived from the Clone Effect; the built-in effect does not raise it.

UPROPERTY(BlueprintAssignable, Category = "Odin|Events")
FOdinCloneEffectResponse PostResponse;

Signature: FOdinCloneEffectResponse void(FString response) (multicast)