Sound Class |
Namespace: Atalasoft.PdfDoc.Generating.Multimedia
The Sound type exposes the following members.
Name | Description | |
---|---|---|
Sound |
Initializes a new instance of the Sound class. SamplingRate will default to
22050, Channels to 1, BitsPerSample to 8, EncodingFormat to Raw
and a null DataStream.
| |
Sound(SerializationInfo, StreamingContext) |
Initializes a new instance of the Sound class.
|
Name | Description | |
---|---|---|
BitsPerSample |
Gets or sets the bits per sample. Only 8 is supported.
| |
Channels |
Gets or sets the number of channels. This should be either 1 or 2.
| |
DataStream |
Gets or sets the data stream.
| |
EncodingFormat |
Gets or sets the encoding format.
| |
SamplingRate |
Gets or sets the sampling rate. For maximum compatibility this value is in Hz and should be one of:
8000, 11025, or 22050.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FromWavReader |
Constructs a new Sound from the given IWavReader class.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetObjectData |
Populates a SerializationInfo with the data needed to serialize the target object.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MakeRepairContext |
Makes the repair context for repairing problems in this object. An object implementing IValidatable
should at least return an empty RepairContext object.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Validate |
Validates the specified problems.
|
FileStream stm = new FileStream("somefile.wav", FileMode.Open); WavReader reader = new WavReader(stm); Sound sound = Sound.FromWavReader(reader); if (sound == null) // returns null if not a widely compatible format. { // incompatible format stm.Close(); throw new Exception("incompatible sound format"); }