Beispiel #1
0
        /// <summary>
        /// Writes the contents of this packet into a memory buffer.
        /// </summary>
        /// <param name="data">The data buffer to write the packet contents to.</param>
        public override void WriteData(DJTapBinaryWriter data)
        {
            base.WriteData(data);

            data.Write(ASCIIEncoding.ASCII.GetBytes(Brand.PadRight(8)));
            data.Write(ASCIIEncoding.ASCII.GetBytes(Model.PadRight(8)));
            data.Write((byte)0);
        }
Beispiel #2
0
        /// <summary>
        /// Writes the contents of this packet into a memory buffer.
        /// </summary>
        /// <param name="data">The data buffer to write the packet contents to.</param>
        public override void WriteData(DJTapBinaryWriter data)
        {
            base.WriteData(data);

            data.Write(ASCIIEncoding.ASCII.GetBytes(Brand.PadRight(8)));
            data.Write(ASCIIEncoding.ASCII.GetBytes(Model.PadRight(8)));
            data.Write(DeckId);
            data.Write((ushort)DeckState);
            data.Write(SyncMaster);
            data.Write(TrackLength);
            data.Write(LocationMarker);
            data.Write((ushort)(SpeedValue * 32767));
            data.Write(new byte[2]);
            data.Write(TCType);
            data.Write(TCState);
            data.Write(TCHours);
            data.Write(TCMinutes);
            data.Write(TCSeconds);
            data.Write(TCFrames);
            data.Write(new byte[56]);
            data.Write((uint)(BPM * 100.0));
            data.Write((ushort)(SpeedValue * 32767));
            data.Write(TrackId);
            data.Write(ASCIIEncoding.ASCII.GetBytes(TrackArtist.PadRight(64)));
            data.Write(ASCIIEncoding.ASCII.GetBytes(TrackTitle.PadRight(64)));
        }