public void WriteBytesTest()
 {
     StreamBuffer target = new StreamBuffer(); // TODO: Initialize to an appropriate value
     long value = 0; // TODO: Initialize to an appropriate value
     int size = 0; // TODO: Initialize to an appropriate value
     target.WriteBytes(value, size);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
示例#2
0
 ////------------------------------------------------------------------------------------------------------------------------------
 /// <summary>
 /// Places the <see cref="LameTag"/> into a byte array.
 /// </summary> 
 /// <returns>A byte array that represents the <see cref="LameTag"/> instance.</returns>
 public byte[] ToByteArray()
 {
     using (StreamBuffer buffer = new StreamBuffer())
     {
         if (Version < 3.09f)
         {
             buffer.WriteString(EncoderVersion, Encoding.ASCII, 20);
         }
         else
         {
             buffer.WriteString(EncoderVersion, Encoding.ASCII, 9);
             buffer.WriteByte((byte)((InfoTagRevision & 0xF0) | (VbrMethod & 0x0F)));
             buffer.WriteByte((byte)LowpassFilterValue);
             buffer.WriteFloat(PeakSignalAmplitude);
             buffer.WriteShort(RadioReplayGain);
             buffer.WriteShort(AudiophileReplayGain);
             buffer.WriteByte((byte)EncodingFlags);
             buffer.WriteByte((byte)BitRate);
             buffer.WriteBytes(EncoderDelays, 3);
             buffer.WriteByte((byte)Misc);
             buffer.WriteByte((byte)Mp3Gain);
             buffer.WriteShort(PresetSurroundInfo);
             buffer.WriteBigEndianInt32(MusicLength);
             buffer.WriteBigEndianInt16(_musicCrc);
             buffer.WriteBigEndianInt16(_infoTagCrc);
         }
         return buffer.ToByteArray();
     }
 }