mirror of
https://github.com/storytold/RuntimeAudioImporter.git
synced 2026-10-15 00:04:13 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c7341dc429 | |||
| 5c885db771 |
@@ -0,0 +1,87 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28315.86
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{94A6C6F3-99B3-346E-9557-ABF9D4064DBD}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Games", "Games", "{8E2F6A87-1826-34F4-940C-CC23A48F9FE4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioImporterTest", "Intermediate\ProjectFiles\AudioImporterTest.vcxproj", "{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UE4", "Intermediate\ProjectFiles\UE4.vcxproj", "{41DC5BBD-56BC-4896-8D8D-5C13F4636397}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizers", "Visualizers", "{1CCEC849-CC72-4C59-8C36-2F7C38706D4C}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
D:\UE4\UE_4.26\Engine\Extras\VisualStudioDebugging\UE4.natvis = D:\UE4\UE_4.26\Engine\Extras\VisualStudioDebugging\UE4.natvis
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
DebugGame Editor|Android = DebugGame Editor|Android
|
||||
DebugGame Editor|Win32 = DebugGame Editor|Win32
|
||||
DebugGame Editor|Win64 = DebugGame Editor|Win64
|
||||
DebugGame|Android = DebugGame|Android
|
||||
DebugGame|Win32 = DebugGame|Win32
|
||||
DebugGame|Win64 = DebugGame|Win64
|
||||
Development Editor|Android = Development Editor|Android
|
||||
Development Editor|Win32 = Development Editor|Win32
|
||||
Development Editor|Win64 = Development Editor|Win64
|
||||
Development|Android = Development|Android
|
||||
Development|Win32 = Development|Win32
|
||||
Development|Win64 = Development|Win64
|
||||
Shipping|Android = Shipping|Android
|
||||
Shipping|Win32 = Shipping|Win32
|
||||
Shipping|Win64 = Shipping|Win64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.DebugGame Editor|Android.ActiveCfg = Invalid|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.DebugGame Editor|Win32.ActiveCfg = Invalid|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.DebugGame Editor|Win64.ActiveCfg = DebugGame_Editor|x64
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.DebugGame Editor|Win64.Build.0 = DebugGame_Editor|x64
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.DebugGame|Android.ActiveCfg = Android_DebugGame|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.DebugGame|Android.Build.0 = Android_DebugGame|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.DebugGame|Win32.ActiveCfg = DebugGame|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.DebugGame|Win32.Build.0 = DebugGame|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.DebugGame|Win64.ActiveCfg = DebugGame|x64
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.DebugGame|Win64.Build.0 = DebugGame|x64
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Development Editor|Android.ActiveCfg = Invalid|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Development Editor|Win32.ActiveCfg = Invalid|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Development Editor|Win64.ActiveCfg = Development_Editor|x64
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Development Editor|Win64.Build.0 = Development_Editor|x64
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Development|Android.ActiveCfg = Android_Development|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Development|Android.Build.0 = Android_Development|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Development|Win32.ActiveCfg = Development|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Development|Win32.Build.0 = Development|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Development|Win64.ActiveCfg = Development|x64
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Development|Win64.Build.0 = Development|x64
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Shipping|Android.ActiveCfg = Android_Shipping|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Shipping|Android.Build.0 = Android_Shipping|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Shipping|Win32.ActiveCfg = Shipping|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Shipping|Win32.Build.0 = Shipping|Win32
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Shipping|Win64.ActiveCfg = Shipping|x64
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F}.Shipping|Win64.Build.0 = Shipping|x64
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.DebugGame Editor|Android.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.DebugGame Editor|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.DebugGame Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.DebugGame|Android.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.DebugGame|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.DebugGame|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.Development Editor|Android.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.Development Editor|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.Development Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.Development|Android.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.Development|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.Development|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.Shipping|Android.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.Shipping|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397}.Shipping|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{41DC5BBD-56BC-4896-8D8D-5C13F4636397} = {94A6C6F3-99B3-346E-9557-ABF9D4064DBD}
|
||||
{05EAA636-D8E0-4E88-B98A-0396DD9D9A1F} = {8E2F6A87-1826-34F4-940C-CC23A48F9FE4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"FileVersion": 3,
|
||||
"EngineAssociation": "4.26",
|
||||
"Category": "",
|
||||
"Description": "",
|
||||
"Modules": [
|
||||
{
|
||||
"Name": "AudioImporterTest",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default"
|
||||
}
|
||||
],
|
||||
"Plugins": [
|
||||
{
|
||||
"Name": "RuntimeAudioImporter",
|
||||
"Enabled": true,
|
||||
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/81fd278e318e4235a028d3fdf46bf036"
|
||||
},
|
||||
{
|
||||
"Name": "AndroidMedia",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "AndroidMoviePlayer",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "AvfMedia",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "MediaCompositing",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "ImgMedia",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "WindowsMoviePlayer",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "MediaPlayerEditor",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "MagicLeapMedia",
|
||||
"Enabled": false,
|
||||
"SupportedTargetPlatforms": [
|
||||
"Lumin"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "WmfMedia",
|
||||
"Enabled": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
|
||||
|
||||
[/Script/EngineSettings.GameMapsSettings]
|
||||
EditorStartupMap=/Game/MainLevelTest.MainLevelTest
|
||||
LocalMapOptions=
|
||||
TransitionMap=None
|
||||
bUseSplitscreen=False
|
||||
TwoPlayerSplitscreenLayout=Horizontal
|
||||
ThreePlayerSplitscreenLayout=FavorTop
|
||||
FourPlayerSplitscreenLayout=Grid
|
||||
bOffsetPlayerGamepadIds=False
|
||||
GameInstanceClass=/Script/Engine.GameInstance
|
||||
GameDefaultMap=/Game/MainLevelTest.MainLevelTest
|
||||
ServerDefaultMap=/Engine/Maps/Entry.Entry
|
||||
GlobalDefaultGameMode=/Script/Engine.GameModeBase
|
||||
GlobalDefaultServerGameMode=None
|
||||
|
||||
[/Script/HardwareTargeting.HardwareTargetingSettings]
|
||||
TargetedHardwareClass=Mobile
|
||||
AppliedTargetedHardwareClass=Mobile
|
||||
DefaultGraphicsPerformance=Maximum
|
||||
AppliedDefaultGraphicsPerformance=Maximum
|
||||
|
||||
[/Script/Engine.Engine]
|
||||
+ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/AudioImporterTest")
|
||||
+ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/AudioImporterTest")
|
||||
+ActiveClassRedirects=(OldClassName="TP_BlankGameModeBase",NewClassName="AudioImporterTestGameModeBase")
|
||||
|
||||
[/Script/Engine.RendererSettings]
|
||||
r.Mobile.DisableVertexFog=True
|
||||
r.Shadow.CSM.MaxMobileCascades=2
|
||||
r.MobileMSAA=1
|
||||
r.Mobile.AllowDitheredLODTransition=False
|
||||
r.Mobile.AllowSoftwareOcclusion=False
|
||||
r.Mobile.VirtualTextures=False
|
||||
r.DiscardUnusedQuality=False
|
||||
r.AllowOcclusionQueries=True
|
||||
r.MinScreenRadiusForLights=0.030000
|
||||
r.MinScreenRadiusForDepthPrepass=0.030000
|
||||
r.MinScreenRadiusForCSMDepth=0.010000
|
||||
r.PrecomputedVisibilityWarning=False
|
||||
r.TextureStreaming=True
|
||||
Compat.UseDXT5NormalMaps=False
|
||||
r.VirtualTextures=False
|
||||
r.VirtualTexturedLightmaps=False
|
||||
r.VT.TileSize=128
|
||||
r.VT.TileBorderSize=4
|
||||
r.vt.FeedbackFactor=16
|
||||
r.VT.EnableCompressZlib=True
|
||||
r.VT.EnableCompressCrunch=False
|
||||
r.ClearCoatNormal=False
|
||||
r.ReflectionCaptureResolution=128
|
||||
r.Mobile.ReflectionCaptureCompression=False
|
||||
r.ReflectionEnvironmentLightmapMixBasedOnRoughness=True
|
||||
r.ForwardShading=False
|
||||
r.VertexFoggingForOpaque=True
|
||||
r.AllowStaticLighting=True
|
||||
r.NormalMapsForStaticLighting=False
|
||||
r.GenerateMeshDistanceFields=False
|
||||
r.DistanceFieldBuild.EightBit=False
|
||||
r.GenerateLandscapeGIData=False
|
||||
r.DistanceFieldBuild.Compress=False
|
||||
r.TessellationAdaptivePixelsPerTriangle=48.000000
|
||||
r.SeparateTranslucency=False
|
||||
r.TranslucentSortPolicy=0
|
||||
TranslucentSortAxis=(X=0.000000,Y=-1.000000,Z=0.000000)
|
||||
r.CustomDepth=1
|
||||
r.CustomDepthTemporalAAJitter=True
|
||||
r.PostProcessing.PropagateAlpha=0
|
||||
r.DefaultFeature.Bloom=True
|
||||
r.DefaultFeature.AmbientOcclusion=False
|
||||
r.DefaultFeature.AmbientOcclusionStaticFraction=True
|
||||
r.DefaultFeature.AutoExposure=False
|
||||
r.DefaultFeature.AutoExposure.Method=0
|
||||
r.DefaultFeature.AutoExposure.Bias=1.000000
|
||||
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=False
|
||||
r.UsePreExposure=True
|
||||
r.EyeAdaptation.EditorOnly=False
|
||||
r.DefaultFeature.MotionBlur=False
|
||||
r.DefaultFeature.LensFlare=False
|
||||
r.TemporalAA.Upsampling=False
|
||||
r.SSGI.Enable=False
|
||||
r.DefaultFeature.AntiAliasing=0
|
||||
r.DefaultFeature.LightUnits=1
|
||||
r.DefaultBackBufferPixelFormat=4
|
||||
r.Shadow.UnbuiltPreviewInGame=True
|
||||
r.StencilForLODDither=False
|
||||
r.EarlyZPass=3
|
||||
r.EarlyZPassOnlyMaterialMasking=False
|
||||
r.DBuffer=True
|
||||
r.ClearSceneMethod=1
|
||||
r.BasePassOutputsVelocity=False
|
||||
r.VertexDeformationOutputsVelocity=False
|
||||
r.SelectiveBasePassOutputs=False
|
||||
bDefaultParticleCutouts=False
|
||||
fx.GPUSimulationTextureSizeX=1024
|
||||
fx.GPUSimulationTextureSizeY=1024
|
||||
r.AllowGlobalClipPlane=False
|
||||
r.GBufferFormat=1
|
||||
r.MorphTarget.Mode=True
|
||||
r.GPUCrashDebugging=False
|
||||
vr.InstancedStereo=False
|
||||
r.MobileHDR=True
|
||||
vr.MobileMultiView=False
|
||||
r.Mobile.UseHWsRGBEncoding=False
|
||||
vr.RoundRobinOcclusion=False
|
||||
vr.ODSCapture=False
|
||||
r.MeshStreaming=False
|
||||
r.WireframeCullThreshold=5.000000
|
||||
r.RayTracing=False
|
||||
r.RayTracing.UseTextureLod=False
|
||||
r.SupportStationarySkylight=True
|
||||
r.SupportLowQualityLightmaps=True
|
||||
r.SupportPointLightWholeSceneShadows=True
|
||||
r.SupportAtmosphericFog=True
|
||||
r.SupportSkyAtmosphere=True
|
||||
r.SupportSkyAtmosphereAffectsHeightFog=False
|
||||
r.SkinCache.CompileShaders=False
|
||||
r.SkinCache.DefaultBehavior=1
|
||||
r.SkinCache.SceneMemoryLimitInMB=128.000000
|
||||
r.Mobile.EnableStaticAndCSMShadowReceivers=True
|
||||
r.Mobile.EnableMovableLightCSMShaderCulling=True
|
||||
r.Mobile.AllowDistanceFieldShadows=True
|
||||
r.Mobile.AllowMovableDirectionalLights=True
|
||||
r.MobileNumDynamicPointLights=4
|
||||
r.MobileDynamicPointLightsUseStaticBranch=True
|
||||
r.Mobile.EnableMovableSpotlights=False
|
||||
r.Mobile.EnableMovableSpotlightsShadow=False
|
||||
r.GPUSkin.Support16BitBoneIndex=False
|
||||
r.GPUSkin.Limit2BoneInfluences=False
|
||||
r.SupportDepthOnlyIndexBuffers=True
|
||||
r.SupportReversedIndexBuffers=True
|
||||
r.LightPropagationVolume=False
|
||||
r.Mobile.AmbientOcclusion=False
|
||||
r.GPUSkin.UnlimitedBoneInfluences=False
|
||||
r.GPUSkin.UnlimitedBoneInfluencesThreshold=8
|
||||
r.Mobile.PlanarReflectionMode=0
|
||||
bStreamSkeletalMeshLODs=(Default=False,PerPlatform=())
|
||||
bDiscardSkeletalMeshOptionalLODs=(Default=False,PerPlatform=())
|
||||
VisualizeCalibrationColorMaterialPath=None
|
||||
VisualizeCalibrationCustomMaterialPath=None
|
||||
VisualizeCalibrationGrayscaleMaterialPath=None
|
||||
|
||||
[/Script/Slate.SlateSettings]
|
||||
bExplicitCanvasChildZOrder=True
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
[/Script/EngineSettings.GeneralProjectSettings]
|
||||
ProjectID=E5F8CB474977D102BC3EC9B00A5B7D1C
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Respirant
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
+1
-1
@@ -14,7 +14,7 @@
|
||||
"IsBetaVersion": false,
|
||||
"IsExperimentalVersion": false,
|
||||
"Installed": true,
|
||||
"EngineVersion": "4.25.0",
|
||||
"EngineVersion": "4.26.0",
|
||||
"Modules": [
|
||||
{
|
||||
"Name": "RuntimeAudioImporter",
|
||||
+25
-74
@@ -11,23 +11,11 @@
|
||||
#include "OpusCompressor.h"
|
||||
#include "AdvancedPCMCompressor.h"
|
||||
|
||||
#include "PreimportedSoundAsset.h"
|
||||
|
||||
#include "Misc/FileHelper.h"
|
||||
|
||||
|
||||
URuntimeAudioImporterLibrary* URuntimeAudioImporterLibrary::CreateRuntimeAudioImporter()
|
||||
{
|
||||
URuntimeAudioImporterLibrary* Importer = NewObject<URuntimeAudioImporterLibrary>();
|
||||
Importer->bUseOfAdvancedBuffersInfo = false;
|
||||
return Importer;
|
||||
}
|
||||
|
||||
URuntimeAudioImporterLibrary* URuntimeAudioImporterLibrary::CreateAdvancedRuntimeAudioImporter(
|
||||
const bool UseOfAdvancedBufferInfo)
|
||||
{
|
||||
URuntimeAudioImporterLibrary* Importer = NewObject<URuntimeAudioImporterLibrary>();
|
||||
Importer->bUseOfAdvancedBuffersInfo = UseOfAdvancedBufferInfo;
|
||||
Importer->AddToRoot();
|
||||
return Importer;
|
||||
}
|
||||
|
||||
@@ -36,6 +24,9 @@ void URuntimeAudioImporterLibrary::ImportAudioFromFile(
|
||||
{
|
||||
if (!FPaths::FileExists(FilePath))
|
||||
{
|
||||
// Trying to get a file inside packaged build
|
||||
IPlatformFile& FileManager = FPlatformFileManager::Get().GetPlatformFile();
|
||||
|
||||
OnResult_Internal(nullptr, ETranscodingStatus::AudioDoesNotExist);
|
||||
return;
|
||||
}
|
||||
@@ -56,7 +47,6 @@ void URuntimeAudioImporterLibrary::ImportAudioFromFile(
|
||||
ImportAudioFromBuffer(AudioBuffer, Format, BuffersDetails);
|
||||
}
|
||||
|
||||
|
||||
void URuntimeAudioImporterLibrary::ImportAudioFromPreimportedSound(UPreimportedSoundAsset* PreimportedSoundAssetRef,
|
||||
const FBuffersDetailsStruct& BuffersDetails)
|
||||
{
|
||||
@@ -155,8 +145,7 @@ USoundWave* URuntimeAudioImporterLibrary::DefineSoundWave()
|
||||
OnProgress_Internal(45);
|
||||
|
||||
// Whether to fill the compressed buffer or not. If not filled, it is necessary to fill Raw (Wave) data so that the engine will automatically generate compressed data.
|
||||
if (BuffersDetailsInfo.CompressionFormat == ECompressionFormat::RawData || (bUseOfAdvancedBuffersInfo &&
|
||||
AdvancedBuffersInfo.FillRawData))
|
||||
if (BuffersDetailsInfo.CompressionFormat == ECompressionFormat::RawData)
|
||||
{
|
||||
// Callback Dispatcher OnProgress
|
||||
OnProgress_Internal(60);
|
||||
@@ -168,11 +157,8 @@ USoundWave* URuntimeAudioImporterLibrary::DefineSoundWave()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!bUseOfAdvancedBuffersInfo || (bUseOfAdvancedBuffersInfo && !AdvancedBuffersInfo.FillPCMData))
|
||||
{
|
||||
// free unneeded PCM Data
|
||||
FMemory::Free(TranscodingFillInfo.PCMInfo.RawPCMData);
|
||||
}
|
||||
// free unneeded PCM Data
|
||||
FMemory::Free(TranscodingFillInfo.PCMInfo.RawPCMData);
|
||||
|
||||
// Callback Dispatcher OnProgress
|
||||
OnProgress_Internal(75);
|
||||
@@ -180,18 +166,16 @@ USoundWave* URuntimeAudioImporterLibrary::DefineSoundWave()
|
||||
// Fill Raw (Wave) Data
|
||||
FillRawWaveData(SoundWaveRef);
|
||||
|
||||
// Fill PCM Data if needed
|
||||
if (bUseOfAdvancedBuffersInfo && AdvancedBuffersInfo.FillPCMData)
|
||||
{
|
||||
FillPCMData(SoundWaveRef);
|
||||
}
|
||||
|
||||
// Callback Dispatcher OnProgress
|
||||
OnProgress_Internal(95);
|
||||
|
||||
return SoundWaveRef;
|
||||
}
|
||||
|
||||
/* We don't need to fill RawPCMData buffer since it is not used at runtime during audio playback. But in case you want to fill this buffer - uncomment the code below (you should also remove some RawPCMData cleanups in code before it is executed)
|
||||
sw->RawPCMData = static_cast<uint8*>(FMemory::Malloc(sw->RawPCMDataSize));
|
||||
FMemory::Memmove(sw->RawPCMData, TranscodingFillInfo.PCMInfo.RawPCMData, sw->RawPCMDataSize);
|
||||
*/
|
||||
|
||||
// Set a new sound compression quality
|
||||
SoundWaveRef->CompressionQuality = BuffersDetailsInfo.SoundCompressionQuality;
|
||||
@@ -202,30 +186,20 @@ USoundWave* URuntimeAudioImporterLibrary::DefineSoundWave()
|
||||
// Callback Dispatcher OnProgress
|
||||
OnProgress_Internal(60);
|
||||
|
||||
if (!bUseOfAdvancedBuffersInfo || (bUseOfAdvancedBuffersInfo && AdvancedBuffersInfo.FillCompressedData &&
|
||||
AdvancedBuffersInfo.CompressionFormat != ECompressionFormat::RawData))
|
||||
// Transcode Raw PCM data to Compressed data
|
||||
if (!TranscodePCMToCompressedData(SoundWaveRef))
|
||||
{
|
||||
// Transcode Raw PCM data to Compressed data
|
||||
if (!TranscodePCMToCompressedData(SoundWaveRef))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Callback Dispatcher OnProgress
|
||||
OnProgress_Internal(75);
|
||||
|
||||
SoundWaveRef->SetPrecacheState(ESoundWavePrecacheState::NotStarted);
|
||||
|
||||
// Fill the compressed data
|
||||
FillCompressedData(SoundWaveRef);
|
||||
|
||||
// Fill PCM Data if needed
|
||||
if (bUseOfAdvancedBuffersInfo && AdvancedBuffersInfo.FillPCMData)
|
||||
{
|
||||
FillPCMData(SoundWaveRef);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Callback Dispatcher OnProgress
|
||||
OnProgress_Internal(75);
|
||||
|
||||
SoundWaveRef->SetPrecacheState(ESoundWavePrecacheState::NotStarted);
|
||||
|
||||
// Fill the compressed data
|
||||
FillCompressedData(SoundWaveRef);
|
||||
|
||||
// Callback Dispatcher OnProgress
|
||||
OnProgress_Internal(95);
|
||||
|
||||
@@ -253,9 +227,6 @@ void URuntimeAudioImporterLibrary::FillRawWaveData(USoundWave* SoundWaveRef) con
|
||||
FMemory::Memmove(SoundWaveRef->RawData.Realloc(TranscodingFillInfo.WAVInfo.WaveDataSize),
|
||||
TranscodingFillInfo.WAVInfo.WaveData, TranscodingFillInfo.WAVInfo.WaveDataSize);
|
||||
SoundWaveRef->RawData.Unlock();
|
||||
|
||||
UE_LOG(LogTemp, Warning, TEXT("RawData has been filled successfully, Raw data size: %d"),
|
||||
TranscodingFillInfo.WAVInfo.WaveDataSize);
|
||||
}
|
||||
|
||||
void URuntimeAudioImporterLibrary::FillCompressedData(USoundWave* SoundWaveRef)
|
||||
@@ -276,18 +247,6 @@ void URuntimeAudioImporterLibrary::FillCompressedData(USoundWave* SoundWaveRef)
|
||||
CompressedBulkData->Unlock();
|
||||
|
||||
SoundWaveRef->SetPrecacheState(ESoundWavePrecacheState::Done);
|
||||
|
||||
UE_LOG(LogTemp, Warning, TEXT("Compressed data has been filled successfully, Cmpressed data size: %d"),
|
||||
TranscodingFillInfo.CompressedInfo.CompressedFormatData.Num());
|
||||
}
|
||||
|
||||
void URuntimeAudioImporterLibrary::FillPCMData(USoundWave* SoundWaveRef)
|
||||
{
|
||||
SoundWaveRef->RawPCMData = static_cast<uint8*>(FMemory::Malloc(SoundWaveRef->RawPCMDataSize));
|
||||
FMemory::Memmove(SoundWaveRef->RawPCMData, TranscodingFillInfo.PCMInfo.RawPCMData,
|
||||
SoundWaveRef->RawPCMDataSize);
|
||||
UE_LOG(LogTemp, Warning, TEXT("PCM Data has been filled successfully, PCMData size: %d"),
|
||||
TranscodingFillInfo.PCMInfo.RawPCMDataSize);
|
||||
}
|
||||
|
||||
bool URuntimeAudioImporterLibrary::TranscodePCMToCompressedData(USoundWave* SoundWaveToGetData)
|
||||
@@ -299,11 +258,6 @@ bool URuntimeAudioImporterLibrary::TranscodePCMToCompressedData(USoundWave* Soun
|
||||
// Sound quality information for compression purposes
|
||||
FSoundQualityInfo SoundQualityInfo = GenerateSoundQualityInfo(SoundWaveToGetData);
|
||||
|
||||
if (bUseOfAdvancedBuffersInfo)
|
||||
{
|
||||
BuffersDetailsInfo.CompressionFormat = AdvancedBuffersInfo.CompressionFormat;
|
||||
}
|
||||
|
||||
switch (BuffersDetailsInfo.CompressionFormat)
|
||||
{
|
||||
case OggVorbis:
|
||||
@@ -361,12 +315,9 @@ bool URuntimeAudioImporterLibrary::TranscodePCMToCompressedData(USoundWave* Soun
|
||||
}
|
||||
}
|
||||
|
||||
if (!bUseOfAdvancedBuffersInfo || (bUseOfAdvancedBuffersInfo && !AdvancedBuffersInfo.FillPCMData))
|
||||
{
|
||||
// When the compressed data is generated, RawPCMData is no longer needed
|
||||
RawPCMArray.Empty();
|
||||
FMemory::Free(TranscodingFillInfo.PCMInfo.RawPCMData);
|
||||
}
|
||||
// When the compressed data is generated, RawPCMData is no longer needed.
|
||||
RawPCMArray.Empty();
|
||||
FMemory::Free(TranscodingFillInfo.PCMInfo.RawPCMData);
|
||||
|
||||
// Callback Dispatcher OnProgress
|
||||
OnProgress_Internal(85);
|
||||
+7
-43
@@ -5,6 +5,8 @@
|
||||
#include "Sound/SoundWave.h"
|
||||
#include "Async/Async.h"
|
||||
|
||||
#include "PreimportedSoundAsset.h"
|
||||
|
||||
#include "RuntimeAudioImporterLibrary.generated.h"
|
||||
|
||||
/** Possible audio importing results */
|
||||
@@ -77,7 +79,7 @@ enum ECompressionFormat
|
||||
};
|
||||
|
||||
/** Information about which buffers to fill */
|
||||
USTRUCT(BlueprintType, Category = "RuntimeAudioImporter")
|
||||
USTRUCT(BlueprintType)
|
||||
struct FBuffersDetailsStruct
|
||||
{
|
||||
GENERATED_BODY()
|
||||
@@ -153,34 +155,15 @@ struct FTranscodingFillStruct
|
||||
FCompressedStruct CompressedInfo;
|
||||
};
|
||||
|
||||
/** Advanced CPP only structure which contains information about which buffers to fill */
|
||||
struct FAdvancedBuffersStruct
|
||||
{
|
||||
/** Needed compression format. Do not select RawData here! If you want to fill Raw (Wav) Data, check the "FillRawData" parameter */
|
||||
TEnumAsByte<ECompressionFormat> CompressionFormat;
|
||||
|
||||
/** Whether to fill the compressed data or not */
|
||||
bool FillCompressedData = false;
|
||||
|
||||
/** Whether to fill PCM Data or not */
|
||||
bool FillPCMData = false;
|
||||
|
||||
/** Whether to fill Raw (Wav) data */
|
||||
bool FillRawData = false;
|
||||
};
|
||||
|
||||
// Forward declaration of the FSoundQualityInfo structure
|
||||
struct FSoundQualityInfo;
|
||||
|
||||
// Forward declaration of the UPreimportedSoundAsset class
|
||||
class UPreimportedSoundAsset;
|
||||
|
||||
/**
|
||||
* Declare delegate which will be called during the transcoding process
|
||||
*
|
||||
* @param Percentage Percentage of importing completed (0-100%)
|
||||
*/
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAudioProgress, const int32, Percentage);
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnProgress, const int32, Percentage);
|
||||
|
||||
/**
|
||||
* Declare a delegate that will be called on the transcoding result
|
||||
@@ -189,7 +172,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAudioProgress, const int32, Perce
|
||||
* @param ReadySoundWave Ready SoundWave object reference
|
||||
* @param Status TranscodingStatus Enum in case an error occurs
|
||||
*/
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnAudioResult, class URuntimeAudioImporterLibrary*,
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnResult, class URuntimeAudioImporterLibrary*,
|
||||
RuntimeAudioImporterObjectRef,
|
||||
const USoundWave*, SoundWaveRef,
|
||||
const TEnumAsByte < ETranscodingStatus >&, Status);
|
||||
@@ -206,11 +189,11 @@ public:
|
||||
|
||||
/** Bind to know when the transcoding is on progress */
|
||||
UPROPERTY(BlueprintAssignable, Category = "RuntimeAudioImporter")
|
||||
FOnAudioProgress OnProgress;
|
||||
FOnProgress OnProgress;
|
||||
|
||||
/** Bind to know when the transcoding is complete (even if it fails) */
|
||||
UPROPERTY(BlueprintAssignable, Category = "RuntimeAudioImporter")
|
||||
FOnAudioResult OnResult;
|
||||
FOnResult OnResult;
|
||||
|
||||
/** Transcoding fill info. CPP use only */
|
||||
FTranscodingFillStruct TranscodingFillInfo = FTranscodingFillStruct();
|
||||
@@ -218,10 +201,6 @@ public:
|
||||
/** Buffers details info. CPP use only */
|
||||
FBuffersDetailsStruct BuffersDetailsInfo = FBuffersDetailsStruct();
|
||||
|
||||
/** Advanced buffer details info. CPP use only (even as an input parameter) */
|
||||
FAdvancedBuffersStruct AdvancedBuffersInfo = FAdvancedBuffersStruct();
|
||||
bool bUseOfAdvancedBuffersInfo = false;
|
||||
|
||||
/**
|
||||
* Instantiates a RuntimeAudioImporter object
|
||||
*
|
||||
@@ -232,14 +211,6 @@ public:
|
||||
"RuntimeAudioImporter")
|
||||
static URuntimeAudioImporterLibrary* CreateRuntimeAudioImporter();
|
||||
|
||||
/**
|
||||
* If you want to select a separate formats to fill (using of "FAdvancedBuffersStruct"), then use this method in CPP
|
||||
*
|
||||
* @param UseOfAdvancedBufferInfo Whether to use the advanced buffer info or not
|
||||
*/
|
||||
UFUNCTION()
|
||||
static URuntimeAudioImporterLibrary* CreateAdvancedRuntimeAudioImporter(const bool UseOfAdvancedBufferInfo);
|
||||
|
||||
/**
|
||||
* Transcode audio file to SoundWave object
|
||||
*
|
||||
@@ -325,13 +296,6 @@ private:
|
||||
*/
|
||||
void FillCompressedData(USoundWave* SoundWaveRef);
|
||||
|
||||
/**
|
||||
* Fill SoundWave PCM data buffer
|
||||
*
|
||||
* @param SoundWaveRef SoundWave object reference
|
||||
*/
|
||||
void FillPCMData(USoundWave* SoundWaveRef);
|
||||
|
||||
/**
|
||||
* Transcode Audio from PCM to 16-bit WAV data
|
||||
*
|
||||
@@ -1,27 +0,0 @@
|
||||

|
||||
# RuntimeAudioImporter
|
||||
Open-source plugin to import audio files of MP3, WAV and FLAC formats into the game at runtime. It's easy to use in both C++ and Blueprints.
|
||||
Plugin does not require any static libraries and external dependencies.
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
- Low library size (≈ 1 mb)
|
||||
- Fast transcoding speed (≈ 200-900 ms)
|
||||
- Supported for major audio formats: MP3, WAV and FLAC
|
||||
- Automatic detection of audio format (by extension)
|
||||
- System for obtaining transcoding status for error detection
|
||||
- No any static libraries and external dependencies
|
||||
- Support for all available devices (tested on Windows and Android, but there are no restrictions to work on other devices)
|
||||
|
||||
## Documentation
|
||||
Click on the following link to view the documentation - https://unreal.blog/runtime-audio-importer
|
||||
|
||||
## Additional information
|
||||
The in-memory audio transcoding operation is based on [dr_libs](https://github.com/mackron/dr_libs).
|
||||
|
||||
## Legal info
|
||||
|
||||
Unreal® is a trademark or registered trademark of Epic Games, Inc. in the United States of America and elsewhere.
|
||||
|
||||
Unreal® Engine, Copyright 1998 – 2021, Epic Games, Inc. All rights reserved.
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
using UnrealBuildTool;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class AudioImporterTestTarget : TargetRules
|
||||
{
|
||||
public AudioImporterTestTarget( TargetInfo Target) : base(Target)
|
||||
{
|
||||
Type = TargetType.Game;
|
||||
DefaultBuildSettings = BuildSettingsVersion.V2;
|
||||
ExtraModuleNames.AddRange( new string[] { "AudioImporterTest" } );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
using UnrealBuildTool;
|
||||
|
||||
public class AudioImporterTest : ModuleRules
|
||||
{
|
||||
public AudioImporterTest(ReadOnlyTargetRules Target) : base(Target)
|
||||
{
|
||||
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(new string[] { });
|
||||
|
||||
// Uncomment if you are using Slate UI
|
||||
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
|
||||
|
||||
// Uncomment if you are using online features
|
||||
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
|
||||
|
||||
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#include "AudioImporterTest.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, AudioImporterTest, "AudioImporterTest" );
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
|
||||
#include "AudioImporterTestGameModeBase.h"
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/GameModeBase.h"
|
||||
#include "AudioImporterTestGameModeBase.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class AUDIOIMPORTERTEST_API AAudioImporterTestGameModeBase : public AGameModeBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
using UnrealBuildTool;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class AudioImporterTestEditorTarget : TargetRules
|
||||
{
|
||||
public AudioImporterTestEditorTarget( TargetInfo Target) : base(Target)
|
||||
{
|
||||
Type = TargetType.Editor;
|
||||
DefaultBuildSettings = BuildSettingsVersion.V2;
|
||||
ExtraModuleNames.AddRange( new string[] { "AudioImporterTest" } );
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 86 KiB |
Reference in New Issue
Block a user