-
Notifications
You must be signed in to change notification settings - Fork 0
/
AkOdinInputComponent.h
39 lines (27 loc) · 1.16 KB
/
AkOdinInputComponent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#pragma once
#include "CoreMinimal.h"
#include "AkAudioInputComponent.h"
#include "AkOdinInputComponent.generated.h"
class OdinMediaSoundGenerator;
class UOdinPlaybackMedia;
UCLASS(BlueprintType, Blueprintable, meta = (BlueprintSpawnableComponent))
class ODINTESTPROJECT_API UAkOdinInputComponent : public UAkAudioInputComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UAkOdinInputComponent(const class FObjectInitializer& ObjectInitializer);
virtual void DestroyComponent(bool bPromoteChildren) override;
UFUNCTION(BlueprintCallable, Category = "Odin|Sound")
void AssignOdinMedia(UPARAM(ref) UOdinPlaybackMedia*& Media);
virtual void GetChannelConfig(AkAudioFormat& AudioFormat) override;
virtual bool FillSamplesBuffer(uint32 NumChannels, uint32 NumSamples, float** BufferToFill) override;
protected:
UPROPERTY(BlueprintReadOnly, Category = "Odin|Sound")
UOdinPlaybackMedia* PlaybackMedia = nullptr;
TSharedPtr<OdinMediaSoundGenerator, ESPMode::ThreadSafe> SoundGenerator;
float* Buffer = nullptr;
int32 BufferSize = 0;
};