using System; using System.Text; // ReSharper disable once CheckNamespace namespace NAudio.Wave { /// /// Holds information about a RIFF file chunk /// public class RiffChunk { /// /// Creates a RiffChunk object /// public RiffChunk(int identifier, int length, long streamPosition) { Identifier = identifier; Length = length; StreamPosition = streamPosition; } /// /// The chunk identifier /// public int Identifier { get; } /// /// The chunk identifier converted to a string /// public string IdentifierAsString => Encoding.UTF8.GetString(BitConverter.GetBytes(Identifier)); /// /// The chunk length /// public int Length { get; private set; } /// /// The stream position this chunk is located at /// public long StreamPosition { get; private set; } } }