public VBANPacket(VBANPacketHead <T> head, byte[] data) { Head = head; UnfinishedByteArray = new UnfinishedByteArray(MaxSize); UnfinishedByteArray.Append(head.Bytes); AttachData(data); }
public VBANPacketHead( int protocol, int sampleRateIndex, int samples, int channel, int format, int codec, string streamName, int frameCounter ) { Util.CheckRange(samples, 0, 255); Util.CheckRange(channel, 0, 255); _unfinishedByteArray = new UnfinishedByteArray(Size, true); _unfinishedByteArray.Append(Encoding.ASCII.GetBytes("VBAN")); _unfinishedByteArray.Append((byte)(protocol | sampleRateIndex)); _unfinishedByteArray.Append((byte)samples, (byte)channel); _unfinishedByteArray.Append((byte)(format | codec)); _unfinishedByteArray.Append(Util.TrimArray(Encoding.ASCII.GetBytes(streamName), 16)); _unfinishedByteArray.Append(BitConverter.GetBytes(frameCounter)); }
internal VBANPacket(VBANPacketHead <T> head) { Head = head; UnfinishedByteArray = new UnfinishedByteArray(MaxSize, true); }
internal VBANPacketHead(byte[] bytes) { _unfinishedByteArray = new UnfinishedByteArray(Size); _unfinishedByteArray.Append(bytes); }