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();
    }