Click or drag to resize
CdReader Class
Reads audio data from specified CD Audio track
Inheritance Hierarchy
SystemObject
  Alvas.AudioCdReader

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

The CdReader type exposes the following members.

Methods
  NameDescription
Public methodClose
Closes the CdReader 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.
Public propertyTrack
Returns track number. 0 based - first track is at 0
Top
Examples
This example shows simple using of CdReader class.
CdDrive cda = new CdDrive();
CdReader cr = cda.GetReader(0);
if (cr.HasAudio)
{
    IntPtr format = cr.ReadFormat();
    byte[] data = cr.ReadData();
}
cr.Close();
See Also