AudioDecoder Class |
Namespace: Accord.Audio.Formats
The AudioDecoder type exposes the following members.
Name | Description | |
---|---|---|
AudioDecoder | Initializes a new instance of the AudioDecoder class |
Name | Description | |
---|---|---|
DecodeFromFile(String) |
Decode a signal from the specified file.
| |
DecodeFromFile(String, FrameInfo) |
Decode a signal from the specified file.
| |
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.) | |
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.) |
The class represent a help class, which simplifies decoding of audio files finding appropriate image decoder automatically (using list of registered audio decoders). Instead of using required audio decoder directly, users may use this class, which will find required decoder by file's extension.
By default the class will query all referenced assemblies for types that are marked with the FormatDecoderAttribute. If the user would like to implement a new decoder, all that is necessary is to mark a new class with the FormatDecoderAttribute and make it implement the IAudioDecoder interface.
string filename = Path.Combine(basePath, "lena.pgm"); // One way to decode the image explicitly is to use Bitmap image1 = ImageDecoder.DecodeFromFile(filename); // However, you could also obtain the same effect using Bitmap image2 = Accord.Imaging.Image.FromFile(filename);