diff --git a/RuntimeAudioImporter/Resources/Icon128.png b/RuntimeAudioImporter/Resources/Icon128.png index 85ce4f5..d9393a7 100644 Binary files a/RuntimeAudioImporter/Resources/Icon128.png and b/RuntimeAudioImporter/Resources/Icon128.png differ diff --git a/RuntimeAudioImporter/RuntimeAudioImporter.uplugin b/RuntimeAudioImporter/RuntimeAudioImporter.uplugin index 094ec1b..7802180 100644 --- a/RuntimeAudioImporter/RuntimeAudioImporter.uplugin +++ b/RuntimeAudioImporter/RuntimeAudioImporter.uplugin @@ -4,21 +4,37 @@ "VersionName": "1.0", "FriendlyName": "RuntimeAudioImporter", "Description": "Runtime Audio Importer plugin for Unreal Engine 4. Supports mp3, wav and flac formats.", - "Category": "Audio", + "Category": "Code Plugins", "CreatedBy": "Respirant", "CreatedByURL": "https://github.com/Respirant/RuntimeAudioImporter", "DocsURL": "https://github.com/Respirant/RuntimeAudioImporter", - "MarketplaceURL": "", + "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/81fd278e318e4235a028d3fdf46bf036", "SupportURL": "https://telegram.me/Respirant", "CanContainContent": false, "IsBetaVersion": false, "IsExperimentalVersion": false, "Installed": true, + "EngineVersion": "4.26.0", "Modules": [ { "Name": "RuntimeAudioImporter", "Type": "Runtime", - "LoadingPhase": "Default" + "LoadingPhase": "Default", + "WhitelistPlatforms": [ + "Win64", + "Win32", + "Mac", + "Android", + "IOS", + "Linux" + ], + "BlacklistPlatforms": [ + "XboxOne", + "PS4", + "HTML5", + "TVOS", + "Switch" + ] } ] -} \ No newline at end of file +} diff --git a/RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/RuntimeAudioImporter.cpp b/RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/RuntimeAudioImporter.cpp index a24d23f..6818d63 100644 --- a/RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/RuntimeAudioImporter.cpp +++ b/RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/RuntimeAudioImporter.cpp @@ -1,4 +1,4 @@ -// Copyright Epic Games, Inc. All Rights Reserved. +// Respirant 2020. #include "RuntimeAudioImporter.h" diff --git a/RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/RuntimeAudioImporterBPLibrary.cpp b/RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/RuntimeAudioImporterBPLibrary.cpp index 361b166..ad6d72a 100644 --- a/RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/RuntimeAudioImporterBPLibrary.cpp +++ b/RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/RuntimeAudioImporterBPLibrary.cpp @@ -1,4 +1,4 @@ -// Copyright Epic Games, Inc. All Rights Reserved. +// Respirant 2020. #include "RuntimeAudioImporterBPLibrary.h" #include "RuntimeAudioImporter.h" @@ -9,9 +9,6 @@ URuntimeAudioImporterBPLibrary::URuntimeAudioImporterBPLibrary(const FObjectInit } - - - /* Transcode audio file to USoundWave static object */ class USoundWave* URuntimeAudioImporterBPLibrary::GetSoundWaveFromAudioFile(const FString& filePath, TEnumAsByte < AudioFormat > Format, TEnumAsByte < TranscodingStatus >& status, bool DefineFormatAutomatically) { @@ -82,15 +79,11 @@ class USoundWave* URuntimeAudioImporterBPLibrary::GetSoundWaveObject(const uint8 return sw; } -#define DR_WAV_IMPLEMENTATION -#include "dr_libs/dr_wav.h" +#include "ThirdParty/dr_wav.h" -#define DR_MP3_IMPLEMENTATION -#include "dr_libs/dr_mp3.h" - -#define DR_FLAC_IMPLEMENTATION -#include "dr_libs/dr_flac.h" +#include "ThirdParty/dr_mp3.h" +#include "ThirdParty/dr_flac.h" /* Main internal get USoundWave from audio file */ class USoundWave* URuntimeAudioImporterBPLibrary::GetUSoundWaveFromAudioFile_Internal(const FString& filePath, TEnumAsByte < AudioFormat > Format, TEnumAsByte < TranscodingStatus >& status, bool DefineFormatAutomatically) @@ -136,9 +129,8 @@ class USoundWave* URuntimeAudioImporterBPLibrary::GetUSoundWaveFromAudioFile_Int return ReadyUSoundWave; } - /* Automatically get audio format. Internal use only recommended */ -TEnumAsByte URuntimeAudioImporterBPLibrary::GetAudioFormat(const FString & filePath) { +TEnumAsByte URuntimeAudioImporterBPLibrary::GetAudioFormat(const FString& filePath) { if (FPaths::GetExtension(filePath, false).Equals(TEXT("mp3"), ESearchCase::IgnoreCase)) { return AudioFormat::MP3; } @@ -154,7 +146,7 @@ TEnumAsByte URuntimeAudioImporterBPLibrary::GetAudioFormat(const FS } /* Transcode Audio to Wave Data */ -bool URuntimeAudioImporterBPLibrary::TranscodeAudioToWaveData(const char* filePath, TEnumAsByte Format, TEnumAsByte& status, uint64& framesToWrite, int16_t*&pSampleData, uint32& channels, uint32& sampleRate) { +bool URuntimeAudioImporterBPLibrary::TranscodeAudioToWaveData(const char* filePath, TEnumAsByte Format, TEnumAsByte& status, uint64& framesToWrite, int16_t*& pSampleData, uint32& channels, uint32& sampleRate) { switch (Format) { case AudioFormat::MP3: diff --git a/RuntimeAudioImporter/Source/RuntimeAudioImporter/Public/RuntimeAudioImporter.h b/RuntimeAudioImporter/Source/RuntimeAudioImporter/Public/RuntimeAudioImporter.h index dec9530..e409f10 100644 --- a/RuntimeAudioImporter/Source/RuntimeAudioImporter/Public/RuntimeAudioImporter.h +++ b/RuntimeAudioImporter/Source/RuntimeAudioImporter/Public/RuntimeAudioImporter.h @@ -1,4 +1,4 @@ -// Copyright Epic Games, Inc. All Rights Reserved. +// Respirant 2020. #pragma once diff --git a/RuntimeAudioImporter/Source/RuntimeAudioImporter/Public/RuntimeAudioImporterBPLibrary.h b/RuntimeAudioImporter/Source/RuntimeAudioImporter/Public/RuntimeAudioImporterBPLibrary.h index bb991e0..f1fa1af 100644 --- a/RuntimeAudioImporter/Source/RuntimeAudioImporter/Public/RuntimeAudioImporterBPLibrary.h +++ b/RuntimeAudioImporter/Source/RuntimeAudioImporter/Public/RuntimeAudioImporterBPLibrary.h @@ -1,4 +1,4 @@ -// Copyright Epic Games, Inc. All Rights Reserved. +// Respirant 2020. #pragma once @@ -11,8 +11,6 @@ #include "RuntimeAudioImporterBPLibrary.generated.h" - - UENUM(BlueprintType) enum TranscodingStatus { @@ -30,7 +28,6 @@ enum TranscodingStatus ZeroDurationError UMETA(DisplayName = "Transcoded audio has zero length") }; - UENUM(BlueprintType) enum AudioFormat { @@ -40,7 +37,6 @@ enum AudioFormat INVALID UMETA(DisplayName = "invalid (not defined format, internal use only)", Hidden) }; - UCLASS() class RUNTIMEAUDIOIMPORTER_API URuntimeAudioImporterBPLibrary : public UBlueprintFunctionLibrary { diff --git a/RuntimeAudioImporter/Source/RuntimeAudioImporter/RuntimeAudioImporter.Build.cs b/RuntimeAudioImporter/Source/RuntimeAudioImporter/RuntimeAudioImporter.Build.cs index 0b10d84..9ba4232 100644 --- a/RuntimeAudioImporter/Source/RuntimeAudioImporter/RuntimeAudioImporter.Build.cs +++ b/RuntimeAudioImporter/Source/RuntimeAudioImporter/RuntimeAudioImporter.Build.cs @@ -1,53 +1,59 @@ -// Some copyright should be here... +// Respirant 2020. +using System; +using System.IO; using UnrealBuildTool; public class RuntimeAudioImporter : ModuleRules { - public RuntimeAudioImporter(ReadOnlyTargetRules Target) : base(Target) - { - PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; - - PublicIncludePaths.AddRange( - new string[] { - // ... add public include paths required here ... - } - ); - - - PrivateIncludePaths.AddRange( - new string[] { + public RuntimeAudioImporter(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + + PublicDefinitions.AddRange( + new string[] { + "DR_WAV_IMPLEMENTATION=1", + "DR_MP3_IMPLEMENTATION=1", + "DR_FLAC_IMPLEMENTATION=1" + } + ); + + PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "ThirdParty")); + + PrivateIncludePaths.AddRange( + new string[] { // ... add other private include paths required here ... } - ); - - - PublicDependencyModuleNames.AddRange( - new string[] - { - "Core", + ); + + + PublicDependencyModuleNames.AddRange( + new string[] + { + "Core", // ... add other public dependencies that you statically link with here ... } - ); - - - PrivateDependencyModuleNames.AddRange( - new string[] - { - "CoreUObject", - "Engine", - "Slate", - "SlateCore", + ); + + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "CoreUObject", + "Engine", + "Slate", + "SlateCore", // ... add private dependencies that you statically link with here ... } - ); - - - DynamicallyLoadedModuleNames.AddRange( - new string[] - { + ); + + + DynamicallyLoadedModuleNames.AddRange( + new string[] + { // ... add any modules that your module loads dynamically here ... } - ); - } + ); + } } diff --git a/RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/dr_libs/dr_flac.h b/RuntimeAudioImporter/Source/ThirdParty/dr_flac.h similarity index 100% rename from RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/dr_libs/dr_flac.h rename to RuntimeAudioImporter/Source/ThirdParty/dr_flac.h diff --git a/RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/dr_libs/dr_mp3.h b/RuntimeAudioImporter/Source/ThirdParty/dr_mp3.h similarity index 100% rename from RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/dr_libs/dr_mp3.h rename to RuntimeAudioImporter/Source/ThirdParty/dr_mp3.h diff --git a/RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/dr_libs/dr_wav.h b/RuntimeAudioImporter/Source/ThirdParty/dr_wav.h similarity index 100% rename from RuntimeAudioImporter/Source/RuntimeAudioImporter/Private/dr_libs/dr_wav.h rename to RuntimeAudioImporter/Source/ThirdParty/dr_wav.h diff --git a/image/runtimeaudioimporter.png b/image/runtimeaudioimporter.png index f806af7..92b9fa9 100644 Binary files a/image/runtimeaudioimporter.png and b/image/runtimeaudioimporter.png differ