#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "AudioImporterLib.generated.h"

class USoundWaveProcedural;

UCLASS()
class AUDIOTESTPROJECT02_API UAudioImporterLib : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

public:
	UFUNCTION(BlueprintCallable, Category = "Custom Audio Importer")
	static USoundWaveProcedural* ImportMp3FromFile(const FString& FilePath);

	UFUNCTION(BlueprintCallable, Category = "Custom Audio Importer")
	static USoundWaveProcedural* ImportMp3FromBuffer(const TArray<uint8>& Buffer);

	UFUNCTION(BlueprintCallable, Category = "Custom Audio Importer", meta = (DisplayName = "Import PCM as Sound Wave"))
	static USoundWaveProcedural* ImportPcmAsSoundWave(const TArray<uint8>& PcmData, int32 SampleRate = 24000, int32 NumChannels = 1);

	UFUNCTION(BlueprintCallable, Category = "Custom Audio Importer")
	static TArray<uint8> DecodeBase64(const FString& Base64String);
}

MAD PIXELS

MAD PIXELS

MAD PIXELS

©2025 Mad Pixels DESIGN

Go Back To Top

©2025 Mad Pixels DESIGN

Go Back To Top