C# Class MumbleSharp.Audio.Codecs.Opus.OpusEncoder

Opus encoder.
Inheritance: IDisposable
Mostra file Open project: martindevans/MumbleSharp Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Encode ( byte srcPcmSamples, int srcOffset, byte dstOutputBuffer, int dstOffset, int sampleCount ) : int

Encode audio samples.

FrameSizeInBytes ( int frameSizeInSamples ) : int

Calculates the size of a frame in bytes.

OpusEncoder ( int srcSamplingRate, int srcChannelCount ) : System

Creates a new Opus encoder.

Private Methods

Method Description
SampleSize ( int bitDepth, int channelCount ) : int

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Encode() public method

Encode audio samples.
public Encode ( byte srcPcmSamples, int srcOffset, byte dstOutputBuffer, int dstOffset, int sampleCount ) : int
srcPcmSamples byte PCM samples to be encoded.
srcOffset int The zero-based byte offset in srcPcmSamples at which to begin reading PCM samples.
dstOutputBuffer byte An array of bytes. When this method returns, the buffer contains the specified byte array with the values starting at offset replaced with encoded audio data.
dstOffset int The zero-based byte offset in dstOutputBuffer at which to begin writing encoded audio.
sampleCount int The number of samples, per channel, to encode.
return int

FrameSizeInBytes() public method

Calculates the size of a frame in bytes.
public FrameSizeInBytes ( int frameSizeInSamples ) : int
frameSizeInSamples int Size of the frame in samples per channel.
return int

OpusEncoder() public method

Creates a new Opus encoder.
public OpusEncoder ( int srcSamplingRate, int srcChannelCount ) : System
srcSamplingRate int The sampling rate of the input stream.
srcChannelCount int The number of channels in the input stream.
return System