MediaAudioEncoder Class
An audio encoder created by MediaCodecBackend.CreateAudioEncoder.
public abstract class MediaAudioEncoder : MediaCodecImplementation- Inheritance
MediaCodecImplementationMediaAudioEncoder
Constructors
| Name | Description |
|---|---|
| MediaAudioEncoder() |
MediaAudioEncoder()
protected MediaAudioEncoder()No documentation is available.
Methods
| Name | Description |
|---|---|
| Encode(AudioData) | Encodes audio and returns the chunks that are ready (possibly none, e.g. while a frame of the codec is incomplete). The library closes the data afterwards. |
| Flush() | Encodes the pending audio and returns the remaining chunks (flush()). The default implementation returns none. |
Encode(AudioData)
Encodes audio and returns the chunks that are ready (possibly none, e.g. while a frame of the codec is incomplete). The library closes the data afterwards.
public abstract IReadOnlyList<MediaEncodedAudio> Encode(AudioData data)Parameters
dataAudioData- The audio, with the sample rate and the number of channels of the configuration.
Returns
Flush()
MediaCodecBackend.csEncodes the pending audio and returns the remaining chunks (flush()). The default implementation returns none.
public virtual IReadOnlyList<MediaEncodedAudio> Flush()