• Articles
  • Api Documentation
Search Results for

    Show / Hide Table of Contents
    • AmrWbLib
      • AmrWb
    • SipLib.Body
      • BodyParser
      • ContentTypes
      • MessageContentsContainer
      • MultipartBinaryBodyBuilder
      • SipBodyBuilder
    • SipLib.Channels
      • AcceptCertificateDelegate
      • AcceptConnectionDelegate
      • DscpSettings
      • LogInvalidSipMessageDelegate
      • LogSipRequestDelegate
      • LogSipResponseDelegate
      • Qos
      • SIPChannel
      • SIPConnection
      • SIPConnectionDisconnectedDelegate
      • SIPConnectionsEnum
      • SIPMessageReceivedDelegate
      • SIPTCPChannel
      • SIPTLSChannel
      • SIPUDPChannel
      • SipConnectionFailedDelegate
      • SipRequestReceivedDelegate
      • SipResponseReceivedDelegate
      • SipTransactionCompleteDelegate
      • WindowsQos
    • SipLib.Collections
      • ThreadSafeGenericList<T>
    • SipLib.Core
      • ByteBufferInfo
      • CallProperties
      • Crypto
      • HTTPDigest
      • IPSocket
      • SIPAuthenticationHeader
      • SIPAuthorisationDigest
      • SIPAuthorisationHeadersEnum
      • SIPCallInfoHeader
      • SIPConstants
      • SIPContactHeader
      • SIPEndPoint
      • SIPEscape
      • SIPFrag
      • SIPFromHeader
      • SIPGeolocationHeader
      • SIPHeader
      • SIPHeaders
      • SIPMessage
      • SIPMessageTypesEnum
      • SIPMethods
      • SIPMethodsEnum
      • SIPPaiHeader
      • SIPParameters
      • SIPPpiHeader
      • SIPProtocolsEnum
      • SIPProtocolsType
      • SIPReplacesParameter
      • SIPRequest
      • SIPResponse
      • SIPResponseStatusCodes
      • SIPResponseStatusCodesEnum
      • SIPRoute
      • SIPRouteSet
      • SIPSchemesEnum
      • SIPSchemesType
      • SIPToHeader
      • SIPURI
      • SIPUserField
      • SIPValidationException
      • SIPValidationFieldsEnum
      • SIPViaHeader
      • SIPViaSet
      • SipUtils
      • TypeExtensions
    • SipLib.Dtls
      • AlertLevelsEnum
      • AlertTypesEnum
      • DtlsClientUdpTransport
      • DtlsServerUdpTransport
      • DtlsSrtpClient
      • DtlsSrtpServer
      • DtlsSrtpTransport
      • DtlsUtils
      • IDtlsSrtpPeer
      • IPacketTransformer
      • ITransformEngine
      • NetConvert
      • RTCDtlsFingerprint
      • RawPacket
      • SrtcpCryptoContext
      • SrtpPolicy
      • SrtpTransformEngine
      • SrtpTransformer
    • SipLib.Logging
      • SipLogger
    • SipLib.Media
      • AmrWbDecoder
      • AmrWbEncoder
      • AudioDestination
      • AudioDestinationDelegate
      • AudioMediaUtils
      • AudioSampleData
      • AudioSamplesReadyDelegate
      • AudioSource
      • DtmfDigitReceivedDelegate
      • FileAudioSource
      • G722Decoder
      • G722Encoder
      • G729Decoder
      • G729Encoder
      • HighResolutionTimer
      • HighResolutionTimerDelegate
      • IAudioDecoder
      • IAudioEncoder
      • IAudioSampleSource
      • Ld8k
      • MediaPortManager
      • MediaPortSettings
      • MediaTypes
      • MsrpEncryptionEnum
      • MuLawEncoder
      • PcmaDecoder
      • PcmaEncoder
      • PcmuDecoder
      • PcmuEncoder
      • PortRange
      • RtpEncryptionEnum
      • SilenceAudioSampleSource
    • SipLib.Msrp
      • ByteRangeHeader
      • CpimMessage
      • MsrpCompletionStatus
      • MsrpConnection
      • MsrpConnectionStatusDelegate
      • MsrpMessage
      • MsrpMessageDeliveryFailedDelegate
      • MsrpMessageReceivedDelegate
      • MsrpMessageSentDelegate
      • MsrpMessageType
      • MsrpPathHeader
      • MsrpStatusHeader
      • MsrpStreamParser
      • MsrpTextMessageReceivedDelegate
      • MsrpUri
      • ReportReceivedDelegate
    • SipLib.Network
      • IpUtils
    • SipLib.RealTimeText
      • RttCharactersReceivedDelegate
      • RttParameters
      • RttReceiver
      • RttRtpSendDelegate
      • RttSender
    • SipLib.Rtp
      • ByePacket
      • DtlsHandshakeFailedDelegate
      • DtmfEventEnum
      • DtmfPacket
      • JitterStatistics
      • MeanOpinionScore
      • ReceiveStatisticsReadyDelegate
      • ReceiverReport
      • ReportBlock
      • RtcpCompoundPacket
      • RtcpHeader
      • RtcpPacketReceivedDelegate
      • RtcpPacketSentDelegate
      • RtcpPacketType
      • RtpChannel
      • RtpPacket
      • RtpPacketReceivedDelegate
      • RtpPacketSentDelegate
      • RtpReceiveStatistics
      • RtpUtils
      • SdesChunk
      • SdesItem
      • SdesItemType
      • SdesPacket
      • SenderInfo
      • SenderReport
    • SipLib.RtpCrypto
      • AesFunctions
      • CryptoAttribute
      • CryptoContext
      • CryptoSuites
      • InlineParams
      • MasterKeys
      • RocVals
      • RocValues
      • SRtpErrorsEnum
      • SRtpUtils
      • SessionKeys
      • SrtpDecryptor
      • SrtpEncryptor
      • SrtpLabelItem
      • SrtpTransformBase
    • SipLib.Sdp
      • ConnectionData
      • MediaDescription
      • MediaDirectionEnum
      • Origin
      • RtpMapAttribute
      • Sdp
      • SdpAnswerSettings
      • SdpAttribute
      • SdpUtils
      • SetupType
    • SipLib.TestCalls
      • IncomingTestCall
      • IncomingTestCallManager
      • IncomingTestCallSettings
      • OutgoingTestCallResults
      • SimpleOutgoingAudioTestCall
      • TestCallConstants
      • TestCallDurationUnitsEnum
      • TestCallEndedDelegateType
    • SipLib.Threading
      • QueuedActionWorkerTask
    • SipLib.Transactions
      • ClientInviteTransaction
      • ClientNonInviteTransaction
      • ServerInviteTransaction
      • ServerNonInviteTransaction
      • SipTimers
      • SipTransactionBase
      • SipTransport
      • TransactionRequestReceivedDelegate
      • TransactionResponseReceivedDelegate
      • TransactionStateEnum
      • TransactionTerminationReasonEnum
    • SipLib.Video
      • H264Depacketiser
      • H264Packetiser
      • H264Packetiser.H264Nal
      • H264RtpReceiver
      • H264RtpSender
      • RtpSendDelegate
      • RtpVP8Header
      • VP8RtpReceiver
      • VP8RtpSender
      • VideoRtpReceiver
      • VideoRtpSender

    Class AmrWb

    Class for encoding and decoding Advanced Multi-Rate Wide Band data.

    Inheritance
    object
    AmrWb
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: AmrWbLib
    Assembly: SipLib.dll
    Syntax
    public class AmrWb

    Methods

    | Edit this page View Source

    CreateAsDecoder()

    Creates a new AmrWb object that can be used to decode AMR-WB encoded data into voice data.

    Declaration
    public static AmrWb CreateAsDecoder()
    Returns
    Type Description
    AmrWb

    Returns a new AmrWb object that can be used to decode AMR-WB encoded data into voice data.

    | Edit this page View Source

    CreateAsEncoder(short, short)

    Creates a new AmrWb object that can be used to encode voice data into AMR-WB encoded data.

    Declaration
    public static AmrWb CreateAsEncoder(short Mode, short AllowDtx)
    Parameters
    Type Name Description
    short Mode

    Specifies the codec encoding mode. Allowable values are in the range of 0 - 8 which correspond to bit rates: 6.60 kb/s, 8.85 kb/s, 12.65 kb/s, 14.25 kb/s, 15.85 kb/s, 18.25 kb/s, 19.85 kb/s, 23.05 kb/s and 23.85 kb/s.

    short AllowDtx

    Enables or disables Discontinuous Transmit (TX). A value of 0 disables DTX and a value of 1 enables it. If DTX is enabled then the encoder will not produce speech packets during periods of silence.

    Returns
    Type Description
    AmrWb

    Returns a new AmrWb object that can be used to encode voice packets into AMR-WB binary arrays that can be sent as the payload of RTP packets.

    | Edit this page View Source

    DecodeCodFile(string)

    Reads a *.cod file containing AMR-WB encoded audio data, decodes it and returns a list of audio samples.

    A *.cod file is a binary file containing AMR-WB encoded binary parameter data. The file format is the default file format for the decoder test files provided by the 3GPP organization for the AMR-WB codec.

    This function is for testing only.

    Declaration
    public List<short> DecodeCodFile(string InputCodFile)
    Parameters
    Type Name Description
    string InputCodFile

    Input *.cod file containing AMR-WB encoded audio data.

    Returns
    Type Description
    List<short>

    Returns a list of audio samples. The format is 16-bit linear PCM. The list will be empty if the input *.cod file does not exist.

    | Edit this page View Source

    DecodePacketPayload(byte[])

    Decodes the AMR-WB encoded bytes from the payload of a RTP packet into an array of linear 16-bit PCM samples with a sample rate of 16k samples/sec. Each RTP packet contains 20 millseconds of audio data.

    Declaration
    public short[]? DecodePacketPayload(byte[] PacketPayloadBytes)
    Parameters
    Type Name Description
    byte[] PacketPayloadBytes

    Input payload from a RTP packet.

    Returns
    Type Description
    short[]

    Returns an array of 16-bit audio samples. Returns null if an error occurred.

    Remarks

    This function can only handle a single AMR-WB voice frame in the RTP packet payload bytes. If the application receives RTP packets containing multiple voice frames, then it must split the voice frame up and then send them one at a time to this function.

    | Edit this page View Source

    EncodePacketSamples(short[])

    Encodes an array of 16-bit PCM samples into an AMR-WB encoded packet payload that can be sent as the payload of a RTP packet. The input samples sample rate must be 16k samples/second and the sample period must be 20 milliseconds. This means that the input array must be 320 16-bit words in length. The output format is octet aligned with a payload header and a Table of Contents (TOC) byte as specified in Section 4.4.1 of RFC 4867.

    Declaration
    public byte[]? EncodePacketSamples(short[] Samples)
    Parameters
    Type Name Description
    short[] Samples

    Input sample array. Must be 320 short values in length.

    Returns
    Type Description
    byte[]

    Returns a payload that can be attached to an RTP packet. The length of the returned byte array depends upon the encoder mode specified in the call to the InitializeEncoder() function. Returns null if an error occurred.

    | Edit this page View Source

    EncodeToPacketParams(short[])

    Converts an array of audio samples to an array of AMR-WB parameter values. This method is for testing only.

    Declaration
    public short[]? EncodeToPacketParams(short[] Samples)
    Parameters
    Type Name Description
    short[] Samples

    Input audio samples. The sample format must be linear 16-bit PCM. The length of the array must be 320 samples.

    Returns
    Type Description
    short[]

    Returns an array of parameter values. Each parameter value is either 127 or -127. The length of the array depends on the mode value that was passed to the CreateAsEncoder() method used to create this AmrWb object. Returns null if the input array is not 320 samples long.

    | Edit this page View Source

    GetPacketSize(short)

    Gets the packed size of the encoded data given the encoding mode.

    Declaration
    public int GetPacketSize(short Mode)
    Parameters
    Type Name Description
    short Mode

    Encoding mode. Must be 0 - 15 inclusive.

    Returns
    Type Description
    int

    Returns the packed size of the encoded data. The size may be 0.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX