void DisposeSora() { if (sora != null) { sora.Dispose(); sora = null; Debug.Log("Sora is Disposed"); if (MultiRecv) { foreach (var track in tracks) { GameObject.Destroy(track.Value); } tracks.Clear(); } if (!Recvonly) { audioSourceInput.Stop(); AudioRenderer.Stop(); } if (unityAudioOutput) { audioSourceOutput.Stop(); } } }
void DisposeSora() { if (sora != null) { sora.Dispose(); sora = null; Debug.Log("Sora is Disposed"); if (!Recvonly) { audioSourceInput.Stop(); AudioRenderer.Stop(); } if (unityAudioOutput) { audioSourceOutput.Stop(); } } }
public void Close() { logEvent?.RemoveAllListeners(); warningEvent?.RemoveAllListeners(); errorEvent?.RemoveAllListeners(); dataChannelOpenEvent?.RemoveAllListeners(); logEvent = null; warningEvent = null; errorEvent = null; dataChannelOpenEvent = null; if (sora != null) { sora.OnAddTrack = null; sora.OnRemoveTrack = null; sora.OnNotify = null; sora.Dispose(); sora = null; } }