WaveDecoder Class |
Namespace: Accord.Audio.Formats
The WaveDecoder type exposes the following members.
Name | Description | |
---|---|---|
WaveDecoder |
Constructs a new Wave decoder.
| |
WaveDecoder(Stream) |
Constructs a new Wave decoder.
| |
WaveDecoder(String) |
Constructs a new Wave decoder.
|
Name | Description | |
---|---|---|
AverageBitsPerSecond |
Gets the average bits per second
of the underlying Wave stream.
| |
BitsPerSample |
Gets the bits per sample of
the underlying Wave stream.
| |
Bytes |
Gets the total number of bytes
read by this Wave encoder.
| |
Channels |
Gets the number of channels of
the underlying Wave stream.
| |
Duration |
Gets the total time span duration (in
milliseconds) read by this encoder.
| |
Frames |
Gets the number of frames of
the underlying Wave stream.
| |
Position |
Gets the current frame within
the current decoder stream.
| |
SampleRate |
Gets the sample rate for
the underlying Wave stream.
| |
Samples |
Gets the number of samples of
the underlying Wave stream.
| |
Stream |
Gets the underlying Wave stream.
|
Name | Description | |
---|---|---|
Close |
Closes the underlying stream.
| |
Decode |
Decodes the Wave stream into a Signal object.
| |
Decode(Int32) |
Decodes the Wave stream into a Signal object.
| |
Decode(Int32, Int32) |
Decodes the Wave stream into a Signal object.
| |
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.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Open(SoundStream) |
Opens the specified stream.
| |
Open(Stream) |
Open specified stream.
| |
Open(String) |
Open specified stream.
| |
Seek |
Navigates to a position in this Wave stream.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
To(Type) | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) | |
ToT | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) |
// Let's decode a Wave audio file UnmanagedMemoryStream sourceStream = ... // Create a decoder for the source stream WaveDecoder sourceDecoder = new WaveDecoder(sourceStream); // At this point, we can query some properties of the audio file: int channels = sourceDecoder.Channels; int samples = sourceDecoder.Samples; int frames = sourceDecoder.Frames; int duration = sourceDecoder.Duration; int rate = sourceDecoder.SampleRate; int bps = sourceDecoder.BitsPerSample; // Decode the signal in the source stream Signal sourceSignal = sourceDecoder.Decode();