Ejemplo n.º 1
0
 public static OSCPacket Unpack(byte[] bytes, ref int start, int end)
 {
     if (bytes[start] == '#')
     {
         return(OSCBundle.Unpack(bytes, ref start, end));
     }
     else
     {
         return(OSCMessage.Unpack(bytes, ref start));
     }
 }
Ejemplo n.º 2
0
        public static new OSCBundle Unpack(byte[] bytes, ref int start, int end)
        {
            string address = UnpackString(bytes, ref start);
            if (!address.Equals(BUNDLE)) return null;

            long timestamp = UnpackLong(bytes, ref start);
            OSCBundle bundle = new OSCBundle(timestamp);

            while (start < end)
            {
                int length = UnpackInt(bytes, ref start);
                bundle.Append(OSCPacket.Unpack(bytes, ref start, start + length));
            }

            return bundle;
        }
Ejemplo n.º 3
0
        public static new OSCBundle Unpack(byte[] bytes, ref int start, int end)
        {
            string address = UnpackString(bytes, ref start);

            if (!address.Equals(BUNDLE))
            {
                return(null);
            }

            long      timestamp = UnpackLong(bytes, ref start);
            OSCBundle bundle    = new OSCBundle(timestamp);

            while (start < end)
            {
                int length = UnpackInt(bytes, ref start);
                bundle.Append(OSCPacket.Unpack(bytes, ref start, start + length));
            }

            return(bundle);
        }