예제 #1
0
  public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie, DynamicSequenceType in_eDynamicSequenceType) {
    
		uint tempin_gameObjectID;
		if ( in_gameObjectID != null )
		{
			tempin_gameObjectID = (uint)in_gameObjectID.GetInstanceID();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_gameObjectID.GetComponent<AkGameObject>() == null)
			{
				in_gameObjectID.AddComponent<AkGameObject>();
			}
		}
		else
		{
			tempin_gameObjectID = unchecked((uint)-1);
		}
		
		
		in_pCookie = new AkCallbackManager.EventCallbackPackage(in_pfnCallback, in_pCookie);
    {
      uint ret = AkSoundEnginePINVOKE.CSharp_DynamicSequenceOpen__SWIG_0(tempin_gameObjectID, in_uFlags, (IntPtr)0, (IntPtr)in_pCookie.GetHashCode(), (int)in_eDynamicSequenceType);

      return ret;
    }
  }
 public static AkCallbackManager.EventCallbackPackage Create(AkCallbackManager.EventCallback in_cb, object in_cookie, ref uint io_Flags)
 {
     if (io_Flags == 0u || in_cb == null)
     {
         io_Flags = 0u;
         return(null);
     }
     AkCallbackManager.EventCallbackPackage eventCallbackPackage = new AkCallbackManager.EventCallbackPackage();
     eventCallbackPackage.m_Callback          = in_cb;
     eventCallbackPackage.m_Cookie            = in_cookie;
     eventCallbackPackage.m_bNotifyEndOfEvent = ((io_Flags & 1u) != 0u);
     io_Flags |= 1u;
     AkCallbackManager.m_mapEventCallbacks.set_Item(eventCallbackPackage.GetHashCode(), eventCallbackPackage);
     AkCallbackManager.m_LastAddedEventPackage = eventCallbackPackage;
     return(eventCallbackPackage);
 }
예제 #3
0
 public static AkCallbackManager.EventCallbackPackage Create(AkCallbackManager.EventCallback in_cb, object in_cookie, ref uint io_Flags)
 {
     if ((io_Flags == 0) || (in_cb == null))
     {
         io_Flags = 0;
         return(null);
     }
     AkCallbackManager.EventCallbackPackage package = new AkCallbackManager.EventCallbackPackage {
         m_Callback          = in_cb,
         m_Cookie            = in_cookie,
         m_bNotifyEndOfEvent = (io_Flags & 1) != 0
     };
     io_Flags |= 1;
     AkCallbackManager.m_mapEventCallbacks[package.GetHashCode()] = package;
     AkCallbackManager.m_LastAddedEventPackage = package;
     return(package);
 }
예제 #4
0
  public static uint DynamicSequenceOpen(UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie, DynamicSequenceType in_eDynamicSequenceType) {
    
		uint tempin_gameObjectID;
		if ( in_gameObjectID != null )
		{
			tempin_gameObjectID = (uint)in_gameObjectID.GetInstanceID();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_gameObjectID.GetComponent<AkGameObject>() == null)
			{
				in_gameObjectID.AddComponent<AkGameObject>();

				// Note: We have missed AkGameObject.Awake() of this run to register. 
				// So we take over its work by inlining it here.
				AkSoundEngine.RegisterGameObj(in_gameObjectID, in_gameObjectID.name);
			
				//Set the original position
				AkSoundEngine.SetObjectPosition(
		            in_gameObjectID, 
		            in_gameObjectID.transform.position.x, 
		            in_gameObjectID.transform.position.y, 
		            in_gameObjectID.transform.position.z, 
		            in_gameObjectID.transform.forward.x,
		            in_gameObjectID.transform.forward.y, 
		            in_gameObjectID.transform.forward.z
		        	);
			}
		}
		else
		{
			tempin_gameObjectID = unchecked((uint)-1);
		}
		
		
		in_pCookie = new AkCallbackManager.EventCallbackPackage(in_pfnCallback, in_pCookie);
    {
      uint ret = AkSoundEnginePINVOKE.CSharp_DynamicSequenceOpen__SWIG_0(tempin_gameObjectID, in_uFlags, (IntPtr)0, (IntPtr)in_pCookie.GetHashCode(), (int)in_eDynamicSequenceType);

      return ret;
    }
  }
예제 #5
0
  public static uint PostEvent(string in_pszEventName, UnityEngine.GameObject in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie, uint in_cExternals) {
    
		uint tempin_gameObjectID;
		if ( in_gameObjectID != null )
		{
			tempin_gameObjectID = (uint)in_gameObjectID.GetInstanceID();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_gameObjectID.GetComponent<AkGameObject>() == null)
			{
				in_gameObjectID.AddComponent<AkGameObject>();
			}
		}
		else
		{
			tempin_gameObjectID = unchecked((uint)-1);
		}
		
		
		in_pCookie = new AkCallbackManager.EventCallbackPackage(in_pfnCallback, in_pCookie);
    {
      uint ret = AkSoundEnginePINVOKE.CSharp_PostEvent__SWIG_8(in_pszEventName, tempin_gameObjectID, in_uFlags, (IntPtr)0, (IntPtr)in_pCookie.GetHashCode(), in_cExternals);

      return ret;
    }
  }
예제 #6
0
    public static uint PostEvent(string in_pszEventName, ComponentBind.Entity in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie, uint in_cExternals, AkExternalSourceInfo in_pExternalSources, uint in_PlayingID)
    {
        uint tempin_gameObjectID;
                if ( in_gameObjectID != null )
                {
                        tempin_gameObjectID = getGameObjectID(in_gameObjectID);
                        // Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
                        if (in_gameObjectID.Get<AkGameObject>() == null)
                        {
                                in_gameObjectID.Add(new AkGameObject());
                        }
                }
                else
                {
                        tempin_gameObjectID = unchecked((uint)-1);
                }

                in_pCookie = new AkCallbackManager.EventCallbackPackage(in_pfnCallback, in_pCookie);
        {
            uint ret = AkSoundEnginePINVOKE.CSharp_PostEvent__SWIG_6(in_pszEventName, tempin_gameObjectID, in_uFlags, (IntPtr)0, (IntPtr)in_pCookie.GetHashCode(), in_cExternals, AkExternalSourceInfo.getCPtr(in_pExternalSources), in_PlayingID);

            return ret;
        }
    }
    public static void PostCallbacks()
    {
        if (AkCallbackManager.m_pNotifMem == IntPtr.Zero)
        {
            return;
        }
        IntPtr intPtr = AkCallbackSerializer.Lock();

        if (intPtr == IntPtr.Zero)
        {
            AkCallbackSerializer.Unlock();
            return;
        }
        AkCallbackManager.AkCommonCallback commonCB;
        commonCB.eType    = (AkCallbackType)0;
        commonCB.pPackage = IntPtr.Zero;
        commonCB.pNext    = IntPtr.Zero;
        IntPtr intPtr2 = intPtr;

        commonCB          = default(AkCallbackManager.AkCommonCallback);
        commonCB.pPackage = Marshal.ReadIntPtr(intPtr);
        AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
        commonCB.pNext = Marshal.ReadIntPtr(intPtr);
        AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
        commonCB.eType = (AkCallbackType)Marshal.ReadInt32(intPtr);
        AkCallbackManager.GotoEndOfCurrentStructMember_EnumType <AkCallbackType>(ref intPtr);
        AkCallbackManager.EventCallbackPackage eventCallbackPackage = null;
        AkCallbackManager.BankCallbackPackage  bankCallbackPackage  = null;
        if (!AkCallbackManager.SafeExtractCallbackPackages(commonCB, out eventCallbackPackage, out bankCallbackPackage))
        {
            AkCallbackSerializer.Unlock();
            return;
        }
        intPtr = intPtr2;
        while (true)
        {
            intPtr = (IntPtr)(intPtr.ToInt64() + (long)Marshal.SizeOf(typeof(AkCallbackManager.AkCommonCallback)));
            AkCallbackType eType = commonCB.eType;
            switch (eType)
            {
            case AkCallbackType.AK_EndOfEvent:
            {
                AkCallbackManager.AkEventCallbackInfo akEventCallbackInfo = default(AkCallbackManager.AkEventCallbackInfo);
                akEventCallbackInfo.pCookie = Marshal.ReadIntPtr(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                akEventCallbackInfo.gameObjID = Marshal.ReadIntPtr(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                akEventCallbackInfo.playingID = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                akEventCallbackInfo.eventID = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                if (eventCallbackPackage.m_bNotifyEndOfEvent)
                {
                    eventCallbackPackage.m_Callback(eventCallbackPackage.m_Cookie, commonCB.eType, akEventCallbackInfo);
                }
                AkCallbackManager.m_mapEventCallbacks.Remove(eventCallbackPackage.GetHashCode());
                goto IL_84D;
            }

            case AkCallbackType.AK_EndOfDynamicSequenceItem:
            {
                AkCallbackManager.AkDynamicSequenceItemCallbackInfo akDynamicSequenceItemCallbackInfo = default(AkCallbackManager.AkDynamicSequenceItemCallbackInfo);
                akDynamicSequenceItemCallbackInfo.pCookie = Marshal.ReadIntPtr(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                akDynamicSequenceItemCallbackInfo.playingID = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                akDynamicSequenceItemCallbackInfo.audioNodeID = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                akDynamicSequenceItemCallbackInfo.pCustomInfo = Marshal.ReadIntPtr(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                eventCallbackPackage.m_Callback(eventCallbackPackage.m_Cookie, commonCB.eType, akDynamicSequenceItemCallbackInfo);
                goto IL_84D;
            }

            case (AkCallbackType)3:
            case (AkCallbackType)5:
            case (AkCallbackType)6:
            case (AkCallbackType)7:
            {
IL_104:
                if (eType == AkCallbackType.AK_MusicPlayStarted || eType == AkCallbackType.AK_MusicSyncBeat || eType == AkCallbackType.AK_MusicSyncBar || eType == AkCallbackType.AK_MusicSyncEntry || eType == AkCallbackType.AK_MusicSyncExit || eType == AkCallbackType.AK_MusicSyncGrid || eType == AkCallbackType.AK_MusicSyncUserCue || eType == AkCallbackType.AK_MusicSyncPoint)
                {
                    AkCallbackManager.AkMusicSyncCallbackInfo akMusicSyncCallbackInfo = new AkCallbackManager.AkMusicSyncCallbackInfo();
                    akMusicSyncCallbackInfo.pCookie = Marshal.ReadIntPtr(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                    akMusicSyncCallbackInfo.gameObjID = Marshal.ReadIntPtr(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                    akMusicSyncCallbackInfo.playingID = (uint)Marshal.ReadInt32(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                    akMusicSyncCallbackInfo.musicSyncType = (AkCallbackType)Marshal.ReadInt32(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_EnumType <AkCallbackType>(ref intPtr);
                    akMusicSyncCallbackInfo.fBeatDuration = AkCallbackManager.MarshalFloat32(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <float>(ref intPtr);
                    akMusicSyncCallbackInfo.fBarDuration = AkCallbackManager.MarshalFloat32(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <float>(ref intPtr);
                    akMusicSyncCallbackInfo.fGridDuration = AkCallbackManager.MarshalFloat32(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <float>(ref intPtr);
                    akMusicSyncCallbackInfo.fGridOffset = AkCallbackManager.MarshalFloat32(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <float>(ref intPtr);
                    akMusicSyncCallbackInfo.pszUserCueName = Marshal.PtrToStringAnsi(intPtr);
                    eventCallbackPackage.m_Callback(eventCallbackPackage.m_Cookie, commonCB.eType, akMusicSyncCallbackInfo);
                    goto IL_84D;
                }
                if (eType == AkCallbackType.AK_MidiEvent)
                {
                    AkCallbackManager.AkMidiEventCallbackInfo akMidiEventCallbackInfo = default(AkCallbackManager.AkMidiEventCallbackInfo);
                    akMidiEventCallbackInfo.pCookie = Marshal.ReadIntPtr(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                    akMidiEventCallbackInfo.gameObjID = Marshal.ReadIntPtr(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                    akMidiEventCallbackInfo.playingID = (uint)Marshal.ReadInt32(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                    akMidiEventCallbackInfo.eventID = (uint)Marshal.ReadInt32(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                    akMidiEventCallbackInfo.byType = Marshal.ReadByte(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                    akMidiEventCallbackInfo.byChan = Marshal.ReadByte(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                    byte byType = akMidiEventCallbackInfo.byType;
                    if (byType != 128 && byType != 144)
                    {
                        if (byType != 160)
                        {
                            if (byType != 176)
                            {
                                if (byType != 192)
                                {
                                    if (byType != 208)
                                    {
                                        if (byType != 224)
                                        {
                                            AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                                            AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                                        }
                                        else
                                        {
                                            akMidiEventCallbackInfo.byValueLsb = Marshal.ReadByte(intPtr);
                                            AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                                            akMidiEventCallbackInfo.byValueMsb = Marshal.ReadByte(intPtr);
                                            AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                                        }
                                    }
                                    else
                                    {
                                        akMidiEventCallbackInfo.byChanAftertouchValue = Marshal.ReadByte(intPtr);
                                        AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                                        AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                                    }
                                }
                                else
                                {
                                    akMidiEventCallbackInfo.byProgramNum = Marshal.ReadByte(intPtr);
                                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                                }
                            }
                            else
                            {
                                akMidiEventCallbackInfo.byCc = Marshal.ReadByte(intPtr);
                                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                                akMidiEventCallbackInfo.byCcValue = Marshal.ReadByte(intPtr);
                                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                            }
                        }
                        else
                        {
                            akMidiEventCallbackInfo.byAftertouchNote = Marshal.ReadByte(intPtr);
                            AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                            akMidiEventCallbackInfo.byNoteAftertouchValue = Marshal.ReadByte(intPtr);
                            AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                        }
                    }
                    else
                    {
                        akMidiEventCallbackInfo.byOnOffNote = Marshal.ReadByte(intPtr);
                        AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                        akMidiEventCallbackInfo.byVelocity = Marshal.ReadByte(intPtr);
                        AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <byte>(ref intPtr);
                    }
                    eventCallbackPackage.m_Callback(eventCallbackPackage.m_Cookie, commonCB.eType, akMidiEventCallbackInfo);
                    goto IL_84D;
                }
                if (eType == AkCallbackType.AK_Monitoring)
                {
                    AkCallbackManager.AkMonitoringMsg akMonitoringMsg = default(AkCallbackManager.AkMonitoringMsg);
                    akMonitoringMsg.errorCode = (AkErrorCode)Marshal.ReadInt32(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <int>(ref intPtr);
                    akMonitoringMsg.errorLevel = (ErrorLevel)Marshal.ReadInt32(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <int>(ref intPtr);
                    akMonitoringMsg.playingID = (uint)Marshal.ReadInt32(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                    akMonitoringMsg.gameObjID = Marshal.ReadIntPtr(intPtr);
                    AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                    akMonitoringMsg.msg = AkCallbackManager.SafeMarshalString(intPtr);
                    if (AkCallbackManager.m_MonitoringCB != null)
                    {
                        AkCallbackManager.m_MonitoringCB(akMonitoringMsg.errorCode, akMonitoringMsg.errorLevel, akMonitoringMsg.playingID, akMonitoringMsg.gameObjID, akMonitoringMsg.msg);
                    }
                    goto IL_84D;
                }
                if (eType != AkCallbackType.AK_Bank)
                {
                    goto Block_14;
                }
                AkCallbackManager.AkBankInfo akBankInfo = default(AkCallbackManager.AkBankInfo);
                akBankInfo.bankID = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                akBankInfo.inMemoryBankPtr = Marshal.ReadIntPtr(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <IntPtr>(ref intPtr);
                akBankInfo.eLoadResult = (AKRESULT)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_EnumType <AKRESULT>(ref intPtr);
                akBankInfo.memPoolId = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                if (bankCallbackPackage != null && bankCallbackPackage.m_Callback != null)
                {
                    bankCallbackPackage.m_Callback(akBankInfo.bankID, akBankInfo.inMemoryBankPtr, akBankInfo.eLoadResult, akBankInfo.memPoolId, bankCallbackPackage.m_Cookie);
                }
                goto IL_84D;
            }

            case AkCallbackType.AK_Marker:
            {
                AkCallbackManager.AkMarkerCallbackInfo akMarkerCallbackInfo = default(AkCallbackManager.AkMarkerCallbackInfo);
                akMarkerCallbackInfo.pCookie = Marshal.ReadIntPtr(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                akMarkerCallbackInfo.gameObjID = Marshal.ReadIntPtr(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                akMarkerCallbackInfo.playingID = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                akMarkerCallbackInfo.eventID = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                akMarkerCallbackInfo.uIdentifier = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                akMarkerCallbackInfo.uPosition = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                akMarkerCallbackInfo.strLabel = AkCallbackManager.SafeMarshalMarkerString(intPtr);
                eventCallbackPackage.m_Callback(eventCallbackPackage.m_Cookie, commonCB.eType, akMarkerCallbackInfo);
                goto IL_84D;
            }

            case AkCallbackType.AK_Duration:
            {
                AkCallbackManager.AkDurationCallbackInfo akDurationCallbackInfo = default(AkCallbackManager.AkDurationCallbackInfo);
                akDurationCallbackInfo.pCookie = Marshal.ReadIntPtr(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                akDurationCallbackInfo.gameObjID = Marshal.ReadIntPtr(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
                akDurationCallbackInfo.playingID = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                akDurationCallbackInfo.eventID = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                akDurationCallbackInfo.fDuration = AkCallbackManager.MarshalFloat32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <float>(ref intPtr);
                akDurationCallbackInfo.fEstimatedDuration = AkCallbackManager.MarshalFloat32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <float>(ref intPtr);
                akDurationCallbackInfo.audioNodeID = (uint)Marshal.ReadInt32(intPtr);
                AkCallbackManager.GotoEndOfCurrentStructMember_ValueType <uint>(ref intPtr);
                eventCallbackPackage.m_Callback(eventCallbackPackage.m_Cookie, commonCB.eType, akDurationCallbackInfo);
                goto IL_84D;
            }
            }
            goto IL_104;
IL_84D:
            if (!(commonCB.pNext != IntPtr.Zero))
            {
                goto IL_8D3;
            }
            intPtr            = commonCB.pNext;
            intPtr2           = intPtr;
            commonCB          = default(AkCallbackManager.AkCommonCallback);
            commonCB.pPackage = Marshal.ReadIntPtr(intPtr);
            AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
            commonCB.pNext = Marshal.ReadIntPtr(intPtr);
            AkCallbackManager.GotoEndOfCurrentStructMember_IntPtr(ref intPtr);
            commonCB.eType = (AkCallbackType)Marshal.ReadInt32(intPtr);
            AkCallbackManager.GotoEndOfCurrentStructMember_EnumType <AkCallbackType>(ref intPtr);
            eventCallbackPackage = null;
            bankCallbackPackage  = null;
            if (!AkCallbackManager.SafeExtractCallbackPackages(commonCB, out eventCallbackPackage, out bankCallbackPackage))
            {
                goto Block_27;
            }
            intPtr = intPtr2;
        }
Block_14:
        Debug.LogError(string.Format("WwiseUnity: PostCallbacks aborted due to error: Undefined callback type found. Callback object possibly corrupted.", new object[0]));
        AkCallbackSerializer.Unlock();
        return;

Block_27:
        AkCallbackSerializer.Unlock();
        return;

IL_8D3:
        AkCallbackSerializer.Unlock();
    }
예제 #8
0
  public static uint PostEvent(uint in_eventID, ComponentBind.Entity in_gameObjectID, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie) {
	
		uint tempin_gameObjectID;
		if ( in_gameObjectID != null )
		{
			tempin_gameObjectID = (uint)in_gameObjectID.ID.GetHashCode();
			// Note: if AkGameObjectTracker is already attached, the following code will be bypassed.
			if (in_gameObjectID.Get<AkGameObject>() == null)
			{
				in_gameObjectID.Add(new AkGameObject());
			}
		}
		else
		{
			tempin_gameObjectID = unchecked((uint)-1);
		}
		
		
		in_pCookie = new AkCallbackManager.EventCallbackPackage(in_pfnCallback, in_pCookie);
	{
	  uint ret = AkSoundEnginePINVOKE.CSharp_PostEvent__SWIG_3(in_eventID, tempin_gameObjectID, in_uFlags, (IntPtr)0, (IntPtr)in_pCookie.GetHashCode());

	  return ret;
	}
  }