Show / Hide Table of Contents

Class AudioEncoder

Inheritance
System.Object
AudioEncoder
Implements
SIPSorceryMedia.Abstractions.IAudioEncoder
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SIPSorcery.Media
Assembly: SIPSorcery.dll
Syntax
public class AudioEncoder : IAudioEncoder

Constructors

| Improve this Doc View Source

AudioEncoder(Boolean)

Creates a new audio encoder instance.

Declaration
public AudioEncoder(bool includeLinearFormats = false)
Parameters
Type Name Description
System.Boolean includeLinearFormats

If set to true the linear audio formats will be added to the list of supported formats. The reason they are only included if explicitly requested is they are not very popular for other VoIP systems and thereofre needlessly pollute the SDP.

Properties

| Improve this Doc View Source

SupportedFormats

Declaration
public List<AudioFormat> SupportedFormats { get; }
Property Value
Type Description
System.Collections.Generic.List<SIPSorceryMedia.Abstractions.AudioFormat>

Methods

| Improve this Doc View Source

DecodeAudio(Byte[], AudioFormat)

Event handler for receiving RTP packets from the remote party.

Declaration
public short[] DecodeAudio(byte[] encodedSample, AudioFormat format)
Parameters
Type Name Description
System.Byte[] encodedSample

Data received from an RTP socket.

SIPSorceryMedia.Abstractions.AudioFormat format

The audio format of the encoded packets.

Returns
Type Description
System.Int16[]
| Improve this Doc View Source

EncodeAudio(Int16[], AudioFormat)

Declaration
public byte[] EncodeAudio(short[] pcm, AudioFormat format)
Parameters
Type Name Description
System.Int16[] pcm
SIPSorceryMedia.Abstractions.AudioFormat format
Returns
Type Description
System.Byte[]
| Improve this Doc View Source

Resample(Int16[], Int32, Int32)

Declaration
[Obsolete("No longer used. Use SIPSorcery.Media.PcmResampler.Resample instead.")]
public short[] Resample(short[] pcm, int inRate, int outRate)
Parameters
Type Name Description
System.Int16[] pcm
System.Int32 inRate
System.Int32 outRate
Returns
Type Description
System.Int16[]

Implements

SIPSorceryMedia.Abstractions.IAudioEncoder

Extension Methods

JSONWriter.ToJson(Object)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX