C# Класс Translate.Services.Audio.RiffParser

Riff Parser. Parses a Riff style file.
Наследование: IDisposable
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
ReadChunkHeader void
ReadRiffHeader void

Открытые методы

Метод Описание
Dispose ( ) : void

Implement the Dispose method to release the resources

EnumerateChunksInList ( ) : RiffParser

Return a parser for a LIST

FormatFourCC ( FourCC fcc ) : string

Format a FourCC code

IsAligned ( int startIndex, int align ) : bool

Is the start index aligned

IsAligned ( long startIndex, int align ) : bool

Is the start index aligned

MoveToChunkOffset ( uint offset ) : void

Move the file pointer to a byte offset from the start of the current chunk.

MoveToNextChunk ( ) : void

Advance to the start of the next chunk and read the chunk header

MoveToStartOfChunk ( ) : void

Move the file pointer to the start of the current chunk

PrintChunkInformation ( int indent ) : void

Print the chunk information of the current chunk and descendants

ProcessDataFromChunk ( uint count ) : uint

Process data from a chunk (just like reading without actually getting the data)

ReadDataFromChunk ( uint count ) : byte[]

Read data from the current chunk. (Starts at the current file ptr.)

RiffParser ( Stream stream, FourCC id, long startOfContainer ) : System

Initializes a new instance of the RiffParser class.

RiffRound ( int count ) : int

Round a count for Riff chunks

RiffRound ( long count ) : long

Round a count for Riff chunks

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Implementation of the IDisposable pattern

Приватные методы

Метод Описание
ReadChunkHeader ( ) : void
ReadRiffHeader ( ) : void

Read the container header section. (The 'RIFF' or 'LIST' header.) This method verifies the header is well-formed and caches the container'stream FOURCC type.

Описание методов

Dispose() публичный Метод

Implement the Dispose method to release the resources
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Implementation of the IDisposable pattern
protected Dispose ( bool disposing ) : void
disposing bool Are we being destroyed
Результат void

EnumerateChunksInList() публичный Метод

Return a parser for a LIST
public EnumerateChunksInList ( ) : RiffParser
Результат RiffParser

FormatFourCC() публичный статический Метод

Format a FourCC code
public static FormatFourCC ( FourCC fcc ) : string
fcc FourCC The FourCC code
Результат string

IsAligned() публичный статический Метод

Is the start index aligned
public static IsAligned ( int startIndex, int align ) : bool
startIndex int the start index
align int The alignment value
Результат bool

IsAligned() публичный статический Метод

Is the start index aligned
public static IsAligned ( long startIndex, int align ) : bool
startIndex long the start index
align int The alignment value
Результат bool

MoveToChunkOffset() публичный Метод

Move the file pointer to a byte offset from the start of the current chunk.
public MoveToChunkOffset ( uint offset ) : void
offset uint The offset we want to move to
Результат void

MoveToNextChunk() публичный Метод

Advance to the start of the next chunk and read the chunk header
public MoveToNextChunk ( ) : void
Результат void

MoveToStartOfChunk() публичный Метод

Move the file pointer to the start of the current chunk
public MoveToStartOfChunk ( ) : void
Результат void

PrintChunkInformation() публичный Метод

Print the chunk information of the current chunk and descendants
public PrintChunkInformation ( int indent ) : void
indent int The indent level for this chunk
Результат void

ProcessDataFromChunk() публичный Метод

Process data from a chunk (just like reading without actually getting the data)
public ProcessDataFromChunk ( uint count ) : uint
count uint The number of bytes we want to skip
Результат uint

ReadDataFromChunk() публичный Метод

Read data from the current chunk. (Starts at the current file ptr.)
public ReadDataFromChunk ( uint count ) : byte[]
count uint The number of bytes we want to read
Результат byte[]

RiffParser() публичный Метод

Initializes a new instance of the RiffParser class.
public RiffParser ( Stream stream, FourCC id, long startOfContainer ) : System
stream Stream The stream that we will parse
id FourCC The primary Riff ID that we need
startOfContainer long The start offset of the container in the stream
Результат System

RiffRound() публичный статический Метод

Round a count for Riff chunks
public static RiffRound ( int count ) : int
count int The count value that we want to round
Результат int

RiffRound() публичный статический Метод

Round a count for Riff chunks
public static RiffRound ( long count ) : long
count long The count value that we want to round
Результат long