Browse Source

fix wwise lib copy, preload bank, add wav sample

Signed-off-by: Alex Peterson <[email protected]>
Alex Peterson 1 year ago
parent
commit
c648d35f5f

+ 1 - 1
Gems/AudioEngineWwise/Code/CMakeLists.txt

@@ -246,7 +246,7 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS)
         if (NOT EXISTS ${audio_atl_path})
             message(STATUS "Copying default ATL libraries to ${audio_atl_path}")
             cmake_path(SET audio_atl_path_source "${CMAKE_CURRENT_SOURCE_DIR}/../External/libs")
-            file(COPY ${audio_atl_path_source} DESTINATION ${audio_atl_path})
+            file(COPY ${audio_atl_path_source} DESTINATION ${project_path})
         endif()
     endforeach()
 

+ 21 - 5
Gems/AudioEngineWwise/External/Sounds/wwise/SoundbanksInfo.xml

@@ -1,20 +1,36 @@
 <?xml version="1.0" encoding="utf-8"?>
 <SoundBanksInfo Platform="Windows" BasePlatform="Windows" SchemaVersion="12" SoundbankVersion="140">
 	<RootPaths>
-		<ProjectRoot>C:\o3de\project\Sounds\wwise_project\</ProjectRoot>
-		<SourceFilesRoot>C:\o3de\project\Sounds\wwise_project\.cache\Windows\</SourceFilesRoot>
-		<SoundBanksRoot>C:\o3de\project\Sounds\wwise\</SoundBanksRoot>
+		<ProjectRoot>C:\O3DE\project\Sounds\wwise_project\</ProjectRoot>
+		<SourceFilesRoot>C:\O3DE\project\Sounds\wwise_project\.cache\Windows\</SourceFilesRoot>
+		<SoundBanksRoot>C:\O3DE\project\gg\Sounds\wwise\</SoundBanksRoot>
 		<ExternalSourcesInputFile></ExternalSourcesInputFile>
-		<ExternalSourcesOutputRoot>C:\o3de\project\Sounds\wwise_project\GeneratedSoundBanks\Windows</ExternalSourcesOutputRoot>
+		<ExternalSourcesOutputRoot>C:\O3DE\project\Sounds\wwise_project\GeneratedSoundBanks\Windows</ExternalSourcesOutputRoot>
 	</RootPaths>
 	<DialogueEvents/>
 	<StreamedFiles/>
 	<MediaFilesNotInAnyBank/>
 	<SoundBanks>
-		<SoundBank Id="782826392" Language="SFX" Hash="1898844233">
+		<SoundBank Id="782826392" Language="SFX" Hash="3283667599">
 			<ObjectPath>\SoundBanks\Default Work Unit\default</ObjectPath>
 			<ShortName>default</ShortName>
 			<Path>default.bnk</Path>
+			<IncludedEvents>
+				<Event Id="3057162532" Name="Play_Blaster_Shot" ObjectPath="\Events\Default Work Unit\Play_Blaster_Shot">
+					<IncludedMemoryFiles>
+						<File Id="228546115" Language="SFX">
+							<ShortName>gun_blaster_no_trigger_shot_1.wav</ShortName>
+							<Path>SFX\gun_blaster_no_trigger_shot_1_10C4C929.wem</Path>
+						</File>
+					</IncludedMemoryFiles>
+				</Event>
+			</IncludedEvents>
+			<IncludedMemoryFiles>
+				<File Id="228546115" Language="SFX">
+					<ShortName>gun_blaster_no_trigger_shot_1.wav</ShortName>
+					<Path>SFX\gun_blaster_no_trigger_shot_1_10C4C929.wem</Path>
+				</File>
+			</IncludedMemoryFiles>
 		</SoundBank>
 		<SoundBank Id="1355168291" Language="SFX" Hash="3690994985">
 			<ObjectPath>Init</ObjectPath>

+ 10 - 0
Gems/AudioEngineWwise/External/Sounds/wwise/default.bankdeps

@@ -0,0 +1,10 @@
+{
+    "version": "1.0",
+    "bankName": "default.bnk",
+    "dependencies": [
+        "Init.bnk"
+    ],
+    "includedEvents": [
+        "Play_Blaster_Shot"
+    ]
+}

+ 2 - 2
Gems/AudioEngineWwise/External/Sounds/wwise/default.bnk

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:f93c0c1eb50ecf73371c76607aa7e5b0d550148b76e719663e24c9d8a214d7b0
-size 32
+oid sha256:a2121d01945a993691d3bc6c1a8e8075950107a7967b98792f86506e15bc497e
+size 204371

+ 6 - 0
Gems/AudioEngineWwise/External/Sounds/wwise/default.txt

@@ -0,0 +1,6 @@
+Event	ID	Name			Wwise Object Path	Notes
+	3057162532	Play_Blaster_Shot			\Default Work Unit\Play_Blaster_Shot	
+
+In Memory Audio	ID	Name	Audio source file		Wwise Object Path	Notes	Data Size
+	228546115	gun_blaster_no_trigger_shot_1	D:\git\test-projects\gg\Sounds\wwise_project\.cache\Windows\SFX\gun_blaster_no_trigger_shot_1_10C4C929.wem		\Actor-Mixer Hierarchy\Default Work Unit\gun_blaster_no_trigger_shot_1		204144
+

+ 82 - 1
Gems/AudioEngineWwise/External/Sounds/wwise_project/Actor-Mixer Hierarchy/Default Work Unit.wwu

@@ -1,6 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
 <WwiseDocument Type="WorkUnit" ID="{7458331F-AEA0-4860-9FFF-D3D504856040}" SchemaVersion="103">
 	<AudioObjects>
-		<WorkUnit Name="Default Work Unit" ID="{7458331F-AEA0-4860-9FFF-D3D504856040}" PersistMode="Standalone"/>
+		<WorkUnit Name="Default Work Unit" ID="{7458331F-AEA0-4860-9FFF-D3D504856040}" PersistMode="Standalone">
+			<ChildrenList>
+				<Sound Name="gun_blaster_no_trigger_shot_1" ID="{9D598E92-B93A-416E-AC49-228104A021BA}" ShortID="720718547">
+					<PropertyList>
+						<Property Name="3DSpatialization" Type="int16" Value="1"/>
+						<Property Name="Volume" Type="Real64">
+							<ValueList>
+								<Value>1</Value>
+							</ValueList>
+						</Property>
+					</PropertyList>
+					<ReferenceList>
+						<Reference Name="Attenuation">
+							<Custom>
+								<Attenuation Name="Attenuation (Custom)" ID="{9C3D38B6-F961-40FA-B5A3-6F97ABD43737}" ShortID="966929652">
+									<CurveUsageInfoList>
+										<VolumeDryUsage>
+											<CurveUsageInfo Platform="Linked" CurveToUse="Custom">
+												<Curve Name="VolumeDry" ID="{CF16D10D-C396-4BC9-AAA3-4546850B5F2F}">
+													<PropertyList>
+														<Property Name="Flags" Type="int32" Value="3"/>
+													</PropertyList>
+													<PointList>
+														<Point>
+															<XPos>0</XPos>
+															<YPos>0</YPos>
+															<Flags>5</Flags>
+														</Point>
+														<Point>
+															<XPos>100</XPos>
+															<YPos>-200</YPos>
+															<Flags>37</Flags>
+														</Point>
+													</PointList>
+												</Curve>
+											</CurveUsageInfo>
+										</VolumeDryUsage>
+										<VolumeWetGameUsage>
+											<CurveUsageInfo Platform="Linked" CurveToUse="UseVolumeDry"/>
+										</VolumeWetGameUsage>
+										<VolumeWetUserUsage>
+											<CurveUsageInfo Platform="Linked" CurveToUse="UseVolumeDry"/>
+										</VolumeWetUserUsage>
+										<LowPassFilterUsage>
+											<CurveUsageInfo Platform="Linked" CurveToUse="None"/>
+										</LowPassFilterUsage>
+										<HighPassFilterUsage>
+											<CurveUsageInfo Platform="Linked" CurveToUse="None"/>
+										</HighPassFilterUsage>
+										<SpreadUsage>
+											<CurveUsageInfo Platform="Linked" CurveToUse="None"/>
+										</SpreadUsage>
+										<FocusUsage>
+											<CurveUsageInfo Platform="Linked" CurveToUse="None"/>
+										</FocusUsage>
+									</CurveUsageInfoList>
+								</Attenuation>
+							</Custom>
+						</Reference>
+						<Reference Name="Conversion">
+							<ObjectRef Name="Default Conversion Settings" ID="{6D1B890C-9826-4384-BF07-C15223E9FB56}" WorkUnitID="{056B7778-B670-42D4-A5C0-17C7DB6BEE5E}"/>
+						</Reference>
+						<Reference Name="OutputBus">
+							<ObjectRef Name="Master Audio Bus" ID="{1514A4D8-1DA6-412A-A17E-75CA0C2149F3}" WorkUnitID="{C805CA09-4FBD-4A75-8519-F03C7F13FF6D}"/>
+						</Reference>
+					</ReferenceList>
+					<ChildrenList>
+						<AudioFileSource Name="gun_blaster_no_trigger_shot_1" ID="{607C855B-787A-42BF-A3FD-4226155EAC27}">
+							<Language>SFX</Language>
+							<AudioFile>gun_blaster_no_trigger_shot_1.wav</AudioFile>
+							<MediaIDList>
+								<MediaID ID="228546115"/>
+							</MediaIDList>
+						</AudioFileSource>
+					</ChildrenList>
+					<ObjectLists/>
+					<ActiveSourceList>
+						<ActiveSource Name="gun_blaster_no_trigger_shot_1" ID="{607C855B-787A-42BF-A3FD-4226155EAC27}" Platform="Linked"/>
+					</ActiveSourceList>
+				</Sound>
+			</ChildrenList>
+		</WorkUnit>
 	</AudioObjects>
 </WwiseDocument>

+ 11 - 0
Gems/AudioEngineWwise/External/Sounds/wwise_project/Events/Default Work Unit.wwu

@@ -60,6 +60,17 @@
 						</Action>
 					</ChildrenList>
 				</Event>
+				<Event Name="Play_Blaster_Shot" ID="{7B05EAAD-4DEC-43E8-B397-1217E376F3B7}">
+					<ChildrenList>
+						<Action Name="" ID="{1C51545A-AC75-462E-BC8C-0EA920E32F34}" ShortID="748674742">
+							<ReferenceList>
+								<Reference Name="Target">
+									<ObjectRef Name="gun_blaster_no_trigger_shot_1" ID="{9D598E92-B93A-416E-AC49-228104A021BA}" WorkUnitID="{7458331F-AEA0-4860-9FFF-D3D504856040}"/>
+								</Reference>
+							</ReferenceList>
+						</Action>
+					</ChildrenList>
+				</Event>
 			</ChildrenList>
 		</WorkUnit>
 	</Events>

+ 3 - 0
Gems/AudioEngineWwise/External/Sounds/wwise_project/Originals/SFX/gun_blaster_no_trigger_shot_1.wav

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4d38df733c4e9d75ae3e1aae7af888e9b565c25b4b63d68868d4f988d1add329
+size 307580

+ 4 - 1
Gems/AudioEngineWwise/External/Sounds/wwise_project/SoundBanks/Default Work Unit.wwu

@@ -4,7 +4,10 @@
 		<WorkUnit Name="Default Work Unit" ID="{C05CA78C-87B3-4E38-88D1-E3E79CD4BED8}" PersistMode="Standalone">
 			<ChildrenList>
 				<SoundBank Name="default" ID="{244C7441-076F-4AE5-8BA5-90D15C057F81}">
-					<ObjectInclusionList/>
+					<ObjectInclusionList>
+						<ObjectRef Name="gun_blaster_no_trigger_shot_1" ID="{9D598E92-B93A-416E-AC49-228104A021BA}" WorkUnitID="{7458331F-AEA0-4860-9FFF-D3D504856040}" Origin="Manual" Filter="7"/>
+						<ObjectRef Name="Play_Blaster_Shot" ID="{7B05EAAD-4DEC-43E8-B397-1217E376F3B7}" WorkUnitID="{A42623DF-F587-47CD-B8B0-D38A3A2DB704}" Origin="Manual" Filter="7"/>
+					</ObjectInclusionList>
 					<ObjectExclusionList/>
 					<GameSyncExclusionList/>
 				</SoundBank>

+ 45 - 11
Gems/AudioEngineWwise/External/libs/gameaudio/wwise/default_controls.xml

@@ -1,13 +1,47 @@
 <ATLConfig atl_name="default_controls">
- <AudioTriggers>
-  <ATLTrigger atl_name="get_focus"/>
-  <ATLTrigger atl_name="lose_focus"/>
-  <ATLTrigger atl_name="mute_all"/>
-  <ATLTrigger atl_name="unmute_all"/>
-  <ATLTrigger atl_name="do_nothing"/>
- </AudioTriggers>
- <AudioRtpcs>
- </AudioRtpcs>
- <AudioSwitches>
- </AudioSwitches>
+	<AudioTriggers>
+		<ATLTrigger atl_name="Play_Blaster_Shot">
+			<WwiseEvent wwise_name="Play_Blaster_Shot"/>
+		</ATLTrigger>
+		<ATLTrigger atl_name="get_focus"/>
+		<ATLTrigger atl_name="lose_focus"/>
+		<ATLTrigger atl_name="mute_all"/>
+		<ATLTrigger atl_name="unmute_all"/>
+		<ATLTrigger atl_name="do_nothing"/>
+	</AudioTriggers>
+	<AudioRtpcs>
+		<ATLRtpc atl_name="object_speed"/>
+	</AudioRtpcs>
+	<AudioSwitches>
+		<ATLSwitch atl_name="ObstructionOcclusionCalculationType">
+			<ATLSwitchState atl_name="Ignore">
+				<ATLSwitchRequest atl_name="ObstructionOcclusionCalculationType">
+					<ATLValue atl_name="Ignore"/>
+				</ATLSwitchRequest>
+			</ATLSwitchState>
+			<ATLSwitchState atl_name="SingleRay">
+				<ATLSwitchRequest atl_name="ObstructionOcclusionCalculationType">
+					<ATLValue atl_name="SingleRay"/>
+				</ATLSwitchRequest>
+			</ATLSwitchState>
+			<ATLSwitchState atl_name="MultiRay">
+				<ATLSwitchRequest atl_name="ObstructionOcclusionCalculationType">
+					<ATLValue atl_name="MultiRay"/>
+				</ATLSwitchRequest>
+			</ATLSwitchState>
+		</ATLSwitch>
+		<ATLSwitch atl_name="object_velocity_tracking">
+			<ATLSwitchState atl_name="on">
+				<ATLSwitchRequest atl_name="object_velocity_tracking">
+					<ATLValue atl_name="on"/>
+				</ATLSwitchRequest>
+			</ATLSwitchState>
+			<ATLSwitchState atl_name="off">
+				<ATLSwitchRequest atl_name="object_velocity_tracking">
+					<ATLValue atl_name="off"/>
+				</ATLSwitchRequest>
+			</ATLSwitchState>
+		</ATLSwitch>
+	</AudioSwitches>
 </ATLConfig>
+

+ 19 - 0
Gems/AudioEngineWwise/External/libs/gameaudio/wwise/global.xml

@@ -0,0 +1,19 @@
+<ATLConfig atl_name="global">
+ <AudioTriggers>
+ </AudioTriggers>
+ <AudioPreloads>
+  <ATLPreloadRequest atl_name="default" atl_type="AutoLoad">
+   <ATLPlatforms>
+    <Platform atl_name="windows" atl_config_group_name="default"/>
+    <Platform atl_name="mac" atl_config_group_name="default"/>
+    <Platform atl_name="linux" atl_config_group_name="default"/>
+    <Platform atl_name="android" atl_config_group_name="default"/>
+    <Platform atl_name="ios" atl_config_group_name="default"/>
+    <Platform atl_name="provo" atl_config_group_name="default"/>
+   </ATLPlatforms>
+   <ATLConfigGroup atl_name="default">
+    <WwiseFile wwise_name="default.bnk"/>
+   </ATLConfigGroup>
+  </ATLPreloadRequest>
+ </AudioPreloads>
+</ATLConfig>