using System;
using System.Collections.Generic;
using System.Text;
namespace NAudio.Wave.WZT
{
///
/// Holds information about a RIFF file chunk
///
public class RiffChunk
{
int identifier;
int length;
long streamPosition;
///
/// Creates a RiffChunk object
///
public RiffChunk(int identifier, int length, long streamPosition)
{
this.identifier = identifier;
this.length = length;
this.streamPosition = streamPosition;
}
///
/// The chunk identifier
///
public int Identifier
{
get
{
return identifier;
}
}
///
/// The chunk identifier converted to a string
///
public string IdentifierAsString
{
get
{
return ASCIIEncoding.ASCII.GetString(BitConverter.GetBytes(identifier));
}
}
///
/// The chunk length
///
public int Length
{
get
{
return length;
}
}
///
/// The stream position this chunk is located at
///
public long StreamPosition
{
get
{
return streamPosition;
}
}
}
}