public static void GlobalBankCallback(uint in_bankID, IntPtr in_pInMemoryBankPtr, AKRESULT in_eLoadResult, uint in_memPoolId, object in_Cookie) { m_Mutex.WaitOne(); AkBankHandle handle = (AkBankHandle)in_Cookie; AkCallbackManager.BankCallback bankCallback = handle.bankCallback; if (in_eLoadResult != AKRESULT.AK_Success) { Debug.LogWarning("Wwise: Bank " + handle.bankName + " failed to load (" + in_eLoadResult.ToString() + ")"); m_BankHandles.Remove(handle.bankName); } m_Mutex.ReleaseMutex(); if (bankCallback != null) { bankCallback(in_bankID, in_pInMemoryBankPtr, in_eLoadResult, in_memPoolId, null); } }
public static void DeleteFromCache(Property property_) { string variableFullName = property_.GetVariableFullName(); if (!string.IsNullOrEmpty(variableFullName) && ms_properties.ContainsKey(variableFullName)) { ms_properties.Remove(variableFullName); } }
public static void UnloadBank(string name) { AkBankHandle handle = null; if (m_BankHandles.TryGetValue(name, out handle)) { handle.DecRef(); if (handle.RefCount == 0) { m_BankHandles.Remove(name); } } }
public static void Cleanup(int contextId) { if (ms_contexts != null) { if (contextId == -1) { ms_contexts.Clear(); } else if (ms_contexts.ContainsKey(contextId)) { ms_contexts.Remove(contextId); } } }
private void OnDisable() { if (this.multiPositionTypeLabel == MultiPositionTypeLabel.MultiPosition_Mode) { AkMultiPosEvent eventPosList = multiPosEventTree[base.eventID]; if (eventPosList.list.Count == 1) { multiPosEventTree.Remove(base.eventID); } else { eventPosList.list.Remove(this); AkPositionArray array = this.BuildMultiDirectionArray(ref eventPosList); AkSoundEngine.SetMultiplePositions(eventPosList.list[0].gameObject, array, (ushort)array.Count, MultiPositionType.MultiPositionType_MultiSources); } } }