Class ExtendedAudioFileReaderFromStream
Provides the ability to decode and read files from data streams.
The reader does the best effort to decode to PCM - as such, all the audio
file data that you will recieve will not ever be compressed formats.
Unlike the ExtendedAudioFileReaderFromURL class,
it requires to set up either a MIME type or a file extension to
be able to better recognize the data stream.
Uses the Audio Toolbox framework Extended Audio File Services API.
public sealed class ExtendedAudioFileReaderFromStream : ExtendedAudioFileServicesReader, IAsyncDisposable, IDisposable, IWaveProvider
- Inheritance
-
ExtendedAudioFileReaderFromStream
- Implements
- Inherited Members
- Extension Methods
Constructors
ExtendedAudioFileReaderFromStream(Stream, ExtendedAudioFileReaderFromStreamSettings)
Initializes a new instance of the ExtendedAudioFileReaderFromStream class with the specified source data stream and the specified settings object.
public ExtendedAudioFileReaderFromStream(Stream stream, ExtendedAudioFileReaderFromStream.ExtendedAudioFileReaderFromStreamSettings settings = null)
Parameters
streamStreamThe data stream to read the audio data from.
settingsExtendedAudioFileReaderFromStream.ExtendedAudioFileReaderFromStreamSettingsThe settings object to use for configuring the audio file reader.
Exceptions
- ArgumentNullException
streamis null.- ArgumentException
streamis unreadable or unseekable. -or- The stream cannot be decoded.
Methods
DisposeNativeData()
Disposes of any native data the reader has allocated.
Subclasses that override this should call this implementation
by using the base keyword.
protected override void DisposeNativeData()
InitializeReader()
Implementations of this allow to initialize the Extended Audio File services reader from a source.
protected override nint InitializeReader()
Returns
- nint
Handle to an extended audio file.