// Update is called once per frame void Update() { // Check the sound manager and see if it has data for us. if ((m_soundManager.RecordingData != null) && (m_soundManager.RecordingData.Length > 0)) { TransferData Data = TransferData.Empty(); Data.TypeOfByte = ByteCodes.sound; Data.SoundData = m_soundManager.RecordingData; m_webManager.QueueData(Data); } }
} // an outbound buffer we want to send over the websocket.byte void MsgHandler(object sender, WebSocketSharpUnityMod.MessageEventArgs e) { TransferData Datum = TransferData.Empty(); if (e.IsBinary) { Datum.FromCloud(e.RawData); } // Handle the datum if (Datum.TypeOfByte == ByteCodes.sound) { Scene.ForwardClipForPlay(Datum.SoundData); } //System.Console.WriteLine(e.Data.ToString()); }