コード例 #1
0
    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();
            }
        }
    }
コード例 #2
0
    void DisposeSora()
    {
        if (sora != null)
        {
            sora.Dispose();
            sora = null;
            Debug.Log("Sora is Disposed");
            if (!Recvonly)
            {
                audioSourceInput.Stop();
                AudioRenderer.Stop();
            }

            if (unityAudioOutput)
            {
                audioSourceOutput.Stop();
            }
        }
    }
コード例 #3
0
        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;
            }
        }