CafReader Class |
Namespace: Alvas.Audio
The CafReader type exposes the following members.
Name | Description | |
---|---|---|
CafReader |
Initializes a new instance of the CafReader class for the specified stream.
|
Name | Description | |
---|---|---|
Close | Closes the current reader and the underlying stream. (Inherited from BinaryReader.) | |
Dispose | Releases all resources used by the current instance of the BinaryReader class. (Inherited from BinaryReader.) | |
Equals | (Inherited from Object.) | |
GetDurationInMS |
Gets audio stream duration in milliseconds.
(Overrides AudioReaderGetDurationInMS.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetLengthInBytes |
Gets audio stream length in bytes.
(Overrides AudioReaderGetLengthInBytes.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Milliseconds2Bytes |
Converts from milliseconds to bytes for current stream.
(Inherited from AudioReader.) | |
PeekChar | Returns the next available character and does not advance the byte or character position. (Inherited from BinaryReader.) | |
Read | Reads characters from the underlying stream and advances the current position of the stream in accordance with the Encoding used and the specific character being read from the stream. (Inherited from BinaryReader.) | |
Read(Char, Int32, Int32) | Reads the specified number of characters from the stream, starting from a specified point in the character array. (Inherited from BinaryReader.) | |
Read(Byte, Int32, Int32) | Reads the specified number of bytes from the stream, starting from a specified point in the byte array. (Inherited from BinaryReader.) | |
ReadBoolean | Reads a Boolean value from the current stream and advances the current position of the stream by one byte. (Inherited from BinaryReader.) | |
ReadByte | Reads the next byte from the current stream and advances the current position of the stream by one byte. (Inherited from BinaryReader.) | |
ReadBytes | Reads the specified number of bytes from the current stream into a byte array and advances the current position by that number of bytes. (Inherited from BinaryReader.) | |
ReadChar | Reads the next character from the current stream and advances the current position of the stream in accordance with the Encoding used and the specific character being read from the stream. (Inherited from BinaryReader.) | |
ReadChars | Reads the specified number of characters from the current stream, returns the data in a character array, and advances the current position in accordance with the Encoding used and the specific character being read from the stream. (Inherited from BinaryReader.) | |
ReadData |
Reads all audio data from the stream.
(Overrides AudioReaderReadData.) | |
ReadData(Int32) |
Reads audio data from the stream.
(Overrides AudioReaderReadData(Int32).) | |
ReadData(Int32, Int32) |
Reads audio data from the stream.
(Overrides AudioReaderReadData(Int32, Int32).) | |
ReadDataInBytes(Int32) |
Reads audio data from the stream.
(Overrides AudioReaderReadDataInBytes(Int32).) | |
ReadDataInBytes(Int32, Int32) |
Reads audio data from the stream.
(Overrides AudioReaderReadDataInBytes(Int32, Int32).) | |
ReadDecimal | Reads a decimal value from the current stream and advances the current position of the stream by sixteen bytes. (Inherited from BinaryReader.) | |
ReadDouble | Reads an 8-byte floating point value from the current stream and advances the current position of the stream by eight bytes. (Inherited from BinaryReader.) | |
ReadFormat |
Reads an audio format.
(Overrides AudioReaderReadFormat.) | |
ReadInt16 | Reads a 2-byte signed integer from the current stream and advances the current position of the stream by two bytes. (Inherited from BinaryReader.) | |
ReadInt32 | Reads a 4-byte signed integer from the current stream and advances the current position of the stream by four bytes. (Inherited from BinaryReader.) | |
ReadInt64 | Reads an 8-byte signed integer from the current stream and advances the current position of the stream by eight bytes. (Inherited from BinaryReader.) | |
ReadSByte | Reads a signed byte from this stream and advances the current position of the stream by one byte. (Inherited from BinaryReader.) | |
ReadSingle | Reads a 4-byte floating point value from the current stream and advances the current position of the stream by four bytes. (Inherited from BinaryReader.) | |
ReadString | Reads a string from the current stream. The string is prefixed with the length, encoded as an integer seven bits at a time. (Inherited from BinaryReader.) | |
ReadUInt16 | Reads a 2-byte unsigned integer from the current stream using little-endian encoding and advances the position of the stream by two bytes. (Inherited from BinaryReader.) | |
ReadUInt32 | Reads a 4-byte unsigned integer from the current stream and advances the position of the stream by four bytes. (Inherited from BinaryReader.) | |
ReadUInt64 | Reads an 8-byte unsigned integer from the current stream and advances the position of the stream by eight bytes. (Inherited from BinaryReader.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
BaseStream | Exposes access to the underlying stream of the BinaryReader. (Inherited from BinaryReader.) |
CafReader cr = new CafReader(File.OpenRead("123.caf")); IntPtr format = cr.ReadFormat(); byte[] data = cr.ReadData(); cr.Close();