MediaAudioEncoder Class

An audio encoder created by MediaCodecBackend.CreateAudioEncoder.

public abstract class MediaAudioEncoder : MediaCodecImplementation
Inheritance
MediaCodecImplementation MediaAudioEncoder

Constructors

NameDescription
MediaAudioEncoder()

MediaAudioEncoder()

protected MediaAudioEncoder()

No documentation is available.

Methods

NameDescription
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

data AudioData
The audio, with the sample rate and the number of channels of the configuration.

Returns

IReadOnlyList<MediaEncodedAudio>

Encodes the pending audio and returns the remaining chunks (flush()). The default implementation returns none.

public virtual IReadOnlyList<MediaEncodedAudio> Flush()