Initial Wwise Integration

Created wwise project
Integrated inventory UI sounds
Improved projectile weapon behavior (randomized start position, stopped them from self-destructing at target range when airburst is disabled)
This commit is contained in:
Reinier Vens 2021-02-27 20:53:36 +00:00
commit db8c3c7779
1019 changed files with 76372 additions and 110 deletions

View file

@ -0,0 +1,34 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkAcousticSurfaceArray : AkBaseArray<AkAcousticSurface>
{
public AkAcousticSurfaceArray(int count) : base(count)
{
}
protected override int StructureSize
{
get { return AkSoundEnginePINVOKE.CSharp_AkAcousticSurface_GetSizeOf(); }
}
protected override void DefaultConstructAtIntPtr(System.IntPtr address)
{
AkSoundEnginePINVOKE.CSharp_AkAcousticSurface_Clear(address);
}
protected override AkAcousticSurface CreateNewReferenceFromIntPtr(System.IntPtr address)
{
return new AkAcousticSurface(address, false);
}
protected override void CloneIntoReferenceFromIntPtr(System.IntPtr address, AkAcousticSurface other)
{
AkSoundEnginePINVOKE.CSharp_AkAcousticSurface_Clone(address, AkAcousticSurface.getCPtr(other));
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a78ad22743298314cb4f9124cece8d7d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,137 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkAuxSendArray : System.IDisposable
{
private const int MAX_COUNT = AkEnvironment.MAX_NB_ENVIRONMENTS;
private readonly int SIZE_OF_AKAUXSENDVALUE = AkSoundEnginePINVOKE.CSharp_AkAuxSendValue_GetSizeOf();
private System.IntPtr m_Buffer;
private int m_Count;
public AkAuxSendArray()
{
m_Buffer = System.Runtime.InteropServices.Marshal.AllocHGlobal(MAX_COUNT * SIZE_OF_AKAUXSENDVALUE);
m_Count = 0;
}
public AkAuxSendValue this[int index]
{
get
{
if (index >= m_Count)
throw new System.IndexOutOfRangeException("Out of range access in AkAuxSendArray");
return new AkAuxSendValue(GetObjectPtr(index), false);
}
}
public bool isFull
{
get { return m_Count >= MAX_COUNT || m_Buffer == System.IntPtr.Zero; }
}
public void Dispose()
{
if (m_Buffer != System.IntPtr.Zero)
{
System.Runtime.InteropServices.Marshal.FreeHGlobal(m_Buffer);
m_Buffer = System.IntPtr.Zero;
m_Count = 0;
}
}
~AkAuxSendArray()
{
Dispose();
}
public void Reset()
{
m_Count = 0;
}
public bool Add(UnityEngine.GameObject in_listenerGameObj, uint in_AuxBusID, float in_fValue)
{
if (isFull)
return false;
AkSoundEnginePINVOKE.CSharp_AkAuxSendValue_Set(GetObjectPtr(m_Count),
AkSoundEngine.GetAkGameObjectID(in_listenerGameObj), in_AuxBusID, in_fValue);
m_Count++;
return true;
}
public bool Add(uint in_AuxBusID, float in_fValue)
{
if (isFull)
return false;
AkSoundEnginePINVOKE.CSharp_AkAuxSendValue_Set(GetObjectPtr(m_Count), AkSoundEngine.AK_INVALID_GAME_OBJECT,
in_AuxBusID, in_fValue);
m_Count++;
return true;
}
public bool Contains(UnityEngine.GameObject in_listenerGameObj, uint in_AuxBusID)
{
if (m_Buffer == System.IntPtr.Zero)
return false;
for (var i = 0; i < m_Count; i++)
{
if (AkSoundEnginePINVOKE.CSharp_AkAuxSendValue_IsSame(GetObjectPtr(i),
AkSoundEngine.GetAkGameObjectID(in_listenerGameObj), in_AuxBusID))
return true;
}
return false;
}
public bool Contains(uint in_AuxBusID)
{
if (m_Buffer == System.IntPtr.Zero)
return false;
for (var i = 0; i < m_Count; i++)
{
if (AkSoundEnginePINVOKE.CSharp_AkAuxSendValue_IsSame(GetObjectPtr(i), AkSoundEngine.AK_INVALID_GAME_OBJECT, in_AuxBusID))
return true;
}
return false;
}
public AKRESULT SetValues(UnityEngine.GameObject gameObject)
{
return (AKRESULT) AkSoundEnginePINVOKE.CSharp_SetGameObjectAuxSendValues(AkSoundEngine.GetAkGameObjectID(gameObject), m_Buffer, (uint) m_Count);
}
public AKRESULT GetValues(UnityEngine.GameObject gameObject)
{
uint count = MAX_COUNT;
var res = (AKRESULT) AkSoundEnginePINVOKE.CSharp_GetGameObjectAuxSendValues(AkSoundEngine.GetAkGameObjectID(gameObject), m_Buffer, ref count);
m_Count = (int) count;
return res;
}
public System.IntPtr GetBuffer()
{
return m_Buffer;
}
public int Count()
{
return m_Count;
}
private System.IntPtr GetObjectPtr(int index)
{
return (System.IntPtr) (m_Buffer.ToInt64() + SIZE_OF_AKAUXSENDVALUE * index);
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3d3e766880bd0c54ca592daa80206013
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,77 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public abstract class AkBaseArray<T> : System.IDisposable
{
public AkBaseArray(int capacity)
{
m_Buffer = System.Runtime.InteropServices.Marshal.AllocHGlobal(capacity * StructureSize);
if (m_Buffer != System.IntPtr.Zero)
{
Capacity = capacity;
for (var index = 0; index < capacity; ++index)
DefaultConstructAtIntPtr(GetObjectPtr(index));
}
}
public void Dispose()
{
if (m_Buffer != System.IntPtr.Zero)
{
for (var index = 0; index < Capacity; ++index)
ReleaseAllocatedMemoryFromReferenceAtIntPtr(GetObjectPtr(index));
System.Runtime.InteropServices.Marshal.FreeHGlobal(m_Buffer);
m_Buffer = System.IntPtr.Zero;
Capacity = 0;
}
}
~AkBaseArray() { Dispose(); }
public int Capacity { get; private set; }
public virtual int Count() { return Capacity; }
protected abstract int StructureSize { get; }
/// <summary>
/// This method is called for each element of the array when the array is constructed. It should be used to clear the memory associated with an element so that it will be seen as if it had been default constructed.
/// </summary>
/// <param name="address">The address of the element</param>
protected virtual void DefaultConstructAtIntPtr(System.IntPtr address) { }
/// <summary>
/// This method is called for each element of the array when the array is disposed. It should be used to delete memory allocated by elements.
/// </summary>
/// <param name="address">The address of the element</param>
protected virtual void ReleaseAllocatedMemoryFromReferenceAtIntPtr(System.IntPtr address) { }
protected abstract T CreateNewReferenceFromIntPtr(System.IntPtr address);
protected abstract void CloneIntoReferenceFromIntPtr(System.IntPtr address, T other);
public T this[int index]
{
get { return CreateNewReferenceFromIntPtr(GetObjectPtr(index)); }
set { CloneIntoReferenceFromIntPtr(GetObjectPtr(index), value); }
}
public System.IntPtr GetBuffer() { return m_Buffer; }
private System.IntPtr m_Buffer;
protected System.IntPtr GetObjectPtr(int index)
{
if (index >= Capacity)
throw new System.IndexOutOfRangeException("Out of range access in " + GetType().Name);
return (System.IntPtr)(m_Buffer.ToInt64() + StructureSize * index);
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a1e092f59a070584f9661e187233192d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,86 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkChannelEmitterArray : System.IDisposable
{
public System.IntPtr m_Buffer;
private System.IntPtr m_Current;
private uint m_MaxCount;
public AkChannelEmitterArray(uint in_Count)
{
// Three vectors of 3 floats, plus a mask
m_Buffer = System.Runtime.InteropServices.Marshal.AllocHGlobal((int) in_Count * (sizeof(float) * 9 + sizeof(uint)));
m_Current = m_Buffer;
m_MaxCount = in_Count;
Count = 0;
}
public uint Count { get; private set; }
public void Dispose()
{
if (m_Buffer != System.IntPtr.Zero)
{
System.Runtime.InteropServices.Marshal.FreeHGlobal(m_Buffer);
m_Buffer = System.IntPtr.Zero;
m_MaxCount = 0;
}
}
~AkChannelEmitterArray()
{
Dispose();
}
public void Reset()
{
m_Current = m_Buffer;
Count = 0;
}
public void Add(UnityEngine.Vector3 in_Pos, UnityEngine.Vector3 in_Forward, UnityEngine.Vector3 in_Top,
uint in_ChannelMask)
{
if (Count >= m_MaxCount)
throw new System.IndexOutOfRangeException("Out of range access in AkChannelEmitterArray");
//Marshal doesn't do floats. So copy the bytes themselves. Grrr.
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Forward.x), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Forward.y), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Forward.z), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Top.x), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Top.y), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Top.z), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Pos.x), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Pos.y), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Pos.z), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current, (int) in_ChannelMask);
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(uint));
Count++;
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 19c0f3d1cde4f884b8938e2e6e006327
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,34 @@
#if !(UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2019 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkDeviceDescriptionArray : AkBaseArray<AkDeviceDescription>
{
public AkDeviceDescriptionArray(int count) : base(count)
{
}
protected override int StructureSize
{
get { return AkSoundEnginePINVOKE.CSharp_AkDeviceDescription_GetSizeOf(); }
}
protected override void DefaultConstructAtIntPtr(System.IntPtr address)
{
AkSoundEnginePINVOKE.CSharp_AkDeviceDescription_Clear(address);
}
protected override AkDeviceDescription CreateNewReferenceFromIntPtr(System.IntPtr address)
{
return new AkDeviceDescription(address, false);
}
protected override void CloneIntoReferenceFromIntPtr(System.IntPtr address, AkDeviceDescription other)
{
AkSoundEnginePINVOKE.CSharp_AkDeviceDescription_Clone(address, AkDeviceDescription.getCPtr(other));
}
}
#endif

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1727ae0e45f8ab644a08048fa14e1e3f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,29 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkDiffractionPathInfoArray : AkBaseArray<AkDiffractionPathInfo>
{
public AkDiffractionPathInfoArray(int count) : base(count)
{
}
protected override int StructureSize
{
get { return AkSoundEnginePINVOKE.CSharp_AkDiffractionPathInfo_GetSizeOf(); }
}
protected override AkDiffractionPathInfo CreateNewReferenceFromIntPtr(System.IntPtr address)
{
return new AkDiffractionPathInfo(address, false);
}
protected override void CloneIntoReferenceFromIntPtr(System.IntPtr address, AkDiffractionPathInfo other)
{
AkSoundEnginePINVOKE.CSharp_AkDiffractionPathInfo_Clone(address, AkDiffractionPathInfo.getCPtr(other));
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 983c486ff8e310e4ba335b963a8cb0fc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,39 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2019 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkExternalSourceInfoArray : AkBaseArray<AkExternalSourceInfo>
{
public AkExternalSourceInfoArray(int count) : base(count)
{
}
protected override int StructureSize
{
get { return AkSoundEnginePINVOKE.CSharp_AkExternalSourceInfo_GetSizeOf(); }
}
protected override void DefaultConstructAtIntPtr(System.IntPtr address)
{
AkSoundEnginePINVOKE.CSharp_AkExternalSourceInfo_Clear(address);
}
protected override void ReleaseAllocatedMemoryFromReferenceAtIntPtr(System.IntPtr address)
{
AkSoundEnginePINVOKE.CSharp_AkExternalSourceInfo_szFile_set(address, null);
}
protected override AkExternalSourceInfo CreateNewReferenceFromIntPtr(System.IntPtr address)
{
return new AkExternalSourceInfo(address, false);
}
protected override void CloneIntoReferenceFromIntPtr(System.IntPtr address, AkExternalSourceInfo other)
{
AkSoundEnginePINVOKE.CSharp_AkExternalSourceInfo_Clone(address, AkExternalSourceInfo.getCPtr(other));
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 27dc13bd1d98ffe48b4fc297a96dff15
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,77 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkMIDIPostArray
{
private readonly int m_Count;
private readonly int SIZE_OF = AkSoundEnginePINVOKE.CSharp_AkMIDIPost_GetSizeOf();
private System.IntPtr m_Buffer = System.IntPtr.Zero;
public AkMIDIPostArray(int size)
{
m_Count = size;
m_Buffer = System.Runtime.InteropServices.Marshal.AllocHGlobal(m_Count * SIZE_OF);
}
public AkMIDIPost this[int index]
{
get
{
if (index >= m_Count)
throw new System.IndexOutOfRangeException("Out of range access in AkMIDIPostArray");
return new AkMIDIPost(GetObjectPtr(index), false);
}
set
{
if (index >= m_Count)
throw new System.IndexOutOfRangeException("Out of range access in AkMIDIPostArray");
AkSoundEnginePINVOKE.CSharp_AkMIDIPost_Clone(GetObjectPtr(index), AkMIDIPost.getCPtr(value));
}
}
~AkMIDIPostArray()
{
System.Runtime.InteropServices.Marshal.FreeHGlobal(m_Buffer);
m_Buffer = System.IntPtr.Zero;
}
public void PostOnEvent(uint in_eventID, UnityEngine.GameObject gameObject)
{
var gameObjectID = AkSoundEngine.GetAkGameObjectID(gameObject);
AkSoundEngine.PreGameObjectAPICall(gameObject, gameObjectID);
AkSoundEnginePINVOKE.CSharp_AkMIDIPost_PostOnEvent(m_Buffer, in_eventID, gameObjectID, (uint) m_Count);
}
public void PostOnEvent(uint in_eventID, UnityEngine.GameObject gameObject, int count)
{
if (count >= m_Count)
throw new System.IndexOutOfRangeException("Out of range access in AkMIDIPostArray");
var gameObjectID = AkSoundEngine.GetAkGameObjectID(gameObject);
AkSoundEngine.PreGameObjectAPICall(gameObject, gameObjectID);
AkSoundEnginePINVOKE.CSharp_AkMIDIPost_PostOnEvent(m_Buffer, in_eventID, gameObjectID, (uint) count);
}
public System.IntPtr GetBuffer()
{
return m_Buffer;
}
public int Count()
{
return m_Count;
}
private System.IntPtr GetObjectPtr(int index)
{
return (System.IntPtr) (m_Buffer.ToInt64() + SIZE_OF * index);
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 706958941ff3a2c4397a316c31b9daa2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,34 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2019 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkObjectInfoArray : AkBaseArray<AkObjectInfo>
{
public AkObjectInfoArray(int count) : base(count)
{
}
protected override int StructureSize
{
get { return AkSoundEnginePINVOKE.CSharp_AkObjectInfo_GetSizeOf(); }
}
protected override void DefaultConstructAtIntPtr(System.IntPtr address)
{
AkSoundEnginePINVOKE.CSharp_AkObjectInfo_Clear(address);
}
protected override AkObjectInfo CreateNewReferenceFromIntPtr(System.IntPtr address)
{
return new AkObjectInfo(address, false);
}
protected override void CloneIntoReferenceFromIntPtr(System.IntPtr address, AkObjectInfo other)
{
AkSoundEnginePINVOKE.CSharp_AkObjectInfo_Clone(address, AkObjectInfo.getCPtr(other));
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7a8e634c9ee8d914b9931774db23c9f3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,34 @@
#if !(UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2019 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkObstructionOcclusionValuesArray : AkBaseArray<AkObstructionOcclusionValues>
{
public AkObstructionOcclusionValuesArray(int count) : base(count)
{
}
protected override int StructureSize
{
get { return AkSoundEnginePINVOKE.CSharp_AkObstructionOcclusionValues_GetSizeOf(); }
}
protected override void DefaultConstructAtIntPtr(System.IntPtr address)
{
AkSoundEnginePINVOKE.CSharp_AkObstructionOcclusionValues_Clear(address);
}
protected override AkObstructionOcclusionValues CreateNewReferenceFromIntPtr(System.IntPtr address)
{
return new AkObstructionOcclusionValues(address, false);
}
protected override void CloneIntoReferenceFromIntPtr(System.IntPtr address, AkObstructionOcclusionValues other)
{
AkSoundEnginePINVOKE.CSharp_AkObstructionOcclusionValues_Clone(address, AkObstructionOcclusionValues.getCPtr(other));
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d17160a19f95c1c469beb659d778f558
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,82 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkPositionArray : System.IDisposable
{
public System.IntPtr m_Buffer;
private System.IntPtr m_Current;
private uint m_MaxCount;
public AkPositionArray(uint in_Count)
{
m_Buffer = System.Runtime.InteropServices.Marshal.AllocHGlobal((int) in_Count * sizeof(float) * 9);
m_Current = m_Buffer;
m_MaxCount = in_Count;
Count = 0;
}
public uint Count { get; private set; }
public void Dispose()
{
if (m_Buffer != System.IntPtr.Zero)
{
System.Runtime.InteropServices.Marshal.FreeHGlobal(m_Buffer);
m_Buffer = System.IntPtr.Zero;
m_MaxCount = 0;
}
}
~AkPositionArray()
{
Dispose();
}
public void Reset()
{
m_Current = m_Buffer;
Count = 0;
}
public void Add(UnityEngine.Vector3 in_Pos, UnityEngine.Vector3 in_Forward, UnityEngine.Vector3 in_Top)
{
if (Count >= m_MaxCount)
throw new System.IndexOutOfRangeException("Out of range access in AkPositionArray");
//Marshal doesn't do floats. So copy the bytes themselves. Grrr.
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Forward.x), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Forward.y), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Forward.z), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Top.x), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Top.y), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Top.z), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Pos.x), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Pos.y), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
System.Runtime.InteropServices.Marshal.WriteInt32(m_Current,
System.BitConverter.ToInt32(System.BitConverter.GetBytes(in_Pos.z), 0));
m_Current = (System.IntPtr) (m_Current.ToInt64() + sizeof(float));
Count++;
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8b6caafc2e039dc4594fb2dd58ecdd3f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,29 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkReflectionPathInfoArray : AkBaseArray<AkReflectionPathInfo>
{
public AkReflectionPathInfoArray(int count) : base(count)
{
}
protected override int StructureSize
{
get { return AkSoundEnginePINVOKE.CSharp_AkReflectionPathInfo_GetSizeOf(); }
}
protected override AkReflectionPathInfo CreateNewReferenceFromIntPtr(System.IntPtr address)
{
return new AkReflectionPathInfo(address, false);
}
protected override void CloneIntoReferenceFromIntPtr(System.IntPtr address, AkReflectionPathInfo other)
{
AkSoundEnginePINVOKE.CSharp_AkReflectionPathInfo_Clone(address, AkReflectionPathInfo.getCPtr(other));
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6b276d7a41816a443a972fa851779ec8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,34 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2019 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkSourceSettingsArray : AkBaseArray<AkSourceSettings>
{
public AkSourceSettingsArray(int count) : base(count)
{
}
protected override int StructureSize
{
get { return AkSoundEnginePINVOKE.CSharp_AkSourceSettings_GetSizeOf(); }
}
protected override void DefaultConstructAtIntPtr(System.IntPtr address)
{
AkSoundEnginePINVOKE.CSharp_AkSourceSettings_Clear(address);
}
protected override AkSourceSettings CreateNewReferenceFromIntPtr(System.IntPtr address)
{
return new AkSourceSettings(address, false);
}
protected override void CloneIntoReferenceFromIntPtr(System.IntPtr address, AkSourceSettings other)
{
AkSoundEnginePINVOKE.CSharp_AkSourceSettings_Clone(address, AkSourceSettings.getCPtr(other));
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d4b0a3a288067574780c39ef4162dfce
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,34 @@
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012 Audiokinetic Inc. / All Rights Reserved
//
//////////////////////////////////////////////////////////////////////
public class AkTriangleArray : AkBaseArray<AkTriangle>
{
public AkTriangleArray(int count) : base(count)
{
}
protected override int StructureSize
{
get { return AkSoundEnginePINVOKE.CSharp_AkTriangle_GetSizeOf(); }
}
protected override void DefaultConstructAtIntPtr(System.IntPtr address)
{
AkSoundEnginePINVOKE.CSharp_AkTriangle_Clear(address);
}
protected override AkTriangle CreateNewReferenceFromIntPtr(System.IntPtr address)
{
return new AkTriangle(address, false);
}
protected override void CloneIntoReferenceFromIntPtr(System.IntPtr address, AkTriangle other)
{
AkSoundEnginePINVOKE.CSharp_AkTriangle_Clone(address, AkTriangle.getCPtr(other));
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9c9b0059eacece54aa96e30d7eb53d82
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: