Click or drag to resize
DsReader Class
Reads audio data using DirectShow.
Inheritance Hierarchy
SystemObject
  Alvas.AudioDsReader

Namespace: Alvas.Audio
Assembly: Alvas.Audio (in Alvas.Audio.dll) Version: 2016.0.6173.41573
Syntax
public class DsReader : IAudioReader, IDisposable

The DsReader type exposes the following members.

Constructors
  NameDescription
Public methodDsReader
Initializes a new instance of the DsReader class for the specified file.
Top
Methods
  NameDescription
Public methodClose
Closes the DsReader object and releases any system resources associated with the reader.
Public methodDispose
Closes the DsReader object and releases any system resources associated with the reader.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetDurationInMS
Gets audio stream duration in milliseconds.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLengthInBytes
Gets audio stream length in bytes.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodMilliseconds2Bytes
Converts from milliseconds to bytes for current stream.
Public methodReadData
Reads all audio data from the stream.
Public methodReadData(Int32)
Reads audio data from the stream.
Public methodReadData(Int32, Int32)
Reads audio data from the stream.
Public methodReadDataInBytes(Int32)
Reads audio data from the stream.
Public methodReadDataInBytes(Int32, Int32)
Reads audio data from the stream.
Public methodReadFormat
Reads an audio format.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyHasAudio
Indicates whether the stream contains audio data.
Top
Examples
This example shows simple using of DsReader class.
DsReader dr = new DsReader("in.wma");
if (dr.HasAudio)
{
    IntPtr format = dr.ReadFormat();
    byte[] data = dr.ReadData();
}
dr.Close();
See Also