Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

ulong TagLib::ByteVector::ToULong ( bool  mostSignificantByteFirst  )  [inline, inherited]

Converts an first eight bytes of the current instance to a ulong value.

Parameters:
mostSignificantByteFirst if the most significant byte appears first (big endian format), or if the least significant byte appears first (little endian format).
Returns:
A ulong value containing the value read from the current instance.

Definition at line 1240 of file ByteVector.cs.

References TagLib::ByteVector::Count.

Referenced by TagLib::Mpeg4::BoxHeader::BoxHeader(), TagLib::Mpeg4::IsoChunkLargeOffsetBox::IsoChunkLargeOffsetBox(), TagLib::Mpeg4::IsoMovieHeaderBox::IsoMovieHeaderBox(), TagLib::Ogg::PageHeader::PageHeader(), TagLib::Id3v2::RelativeVolumeFrame::ParseFields(), TagLib::Id3v2::PopularimeterFrame::ParseFields(), TagLib::Id3v2::PlayCountFrame::ParseFields(), TagLib::Aiff::File::Read(), TagLib::Asf::File::ReadQWord(), and TagLib::Aiff::StreamHeader::StreamHeader().

            {
                  ulong sum = 0;
                  int last = Count > 8 ? 7 : Count - 1;
                  for(int i = 0; i <= last; i++) {
                        int offset = mostSignificantByteFirst ? last-i : i;
                        sum |= (ulong) this[i] << (offset * 8);
                  }
                  return sum;
            }


Generated by  Doxygen 1.6.0   Back to index