コード例 #1
0
    void RpcReceiveData(byte[] encodedData)
    {
        if (isLocalPlayer && !playLocally)
        {
            Debug.Log("OpusNetworked.RpcReceiveData: discard! " + encodedData.Length);
            return;
        }

        Debug.Log("OpusNetworked.RpcReceiveData: add to buffer " + encodedData.Length);
        // the data would need to be sent over the network, we just decode it now to test the result
        receiveBuffer.AddRange(decoder.DecodePacketFloat(encodedData));
    }
コード例 #2
0
ファイル: OpusNetworked.cs プロジェクト: sassembla/OpusDotNet
 void ReceiveEncodedData(byte[] encodedData)
 {
     receiveBuffer.AddRange(decoder.DecodePacketFloat(encodedData));
 }
コード例 #3
0
ファイル: OpusCodec.cs プロジェクト: bitvalser/VoiceChat
 public float[] DecodeToFloat(byte[] buf)
 {
     return(decoder.DecodePacketFloat(buf));
 }
コード例 #4
0
 public float[] DecodeToFloat(byte[] buf)
 {
     return(Error == null?decoder.DecodePacketFloat(buf) : EmptyBufferFloat);
 }