Esempio n. 1
0
        /// <summary>
        /// Write a 24 bit integer
        /// </summary>
        /// <param name="i">The integer to write</param>
        /// <param name="littleEndian">True for little endian, otherwise big endian</param>
        public void WriteInt24(Int24 i, bool littleEndian)
        {
            byte[] data = GeneralUtils.SwapBytes(BitConverter.GetBytes(i), littleEndian);

            if (littleEndian)
            {
                Write(data, 0, 3);
            }
            else
            {
                Write(data, 1, 3);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Write a little endian 24bit integer
 /// </summary>
 /// <param name="i">The integer to write</param>
 public void WriteInt24(Int24 i)
 {
     WriteInt24(i, true);
 }
Esempio n. 3
0
 /// <summary>
 /// Write a 24 bit integer
 /// </summary>
 /// <param name="i">The integer to write</param>
 /// <param name="littleEndian">True for little endian, otherwise big endian</param>
 public void Write(Int24 i, bool littleEndian)
 {
     WriteInt24(i, littleEndian);
 }