Show / Hide Table of Contents

    Class AudioMediaBuffer

    Represents an unmanaged buffer containing audio media data.

    Inheritance
    Object
    AudioMediaBuffer
    Implements
    IDisposable
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.Skype.Bots.Media
    Assembly: Microsoft.Skype.Bots.Media.dll
    Syntax
    public abstract class AudioMediaBuffer : IDisposable

    Constructors

    AudioMediaBuffer()

    Declaration
    protected AudioMediaBuffer()

    Properties

    ActiveSpeakers

    Current active speakers in the conference.

    Declaration
    public uint[] ActiveSpeakers { get; protected set; }
    Property Value
    Type Description
    UInt32[]
    Remarks

    The value is the IDs (MediaSourceIds) of the audio source of the active speakers in the conference and does not include bot's own MediaSourceId. If there is no active speaker, or there is just silence in the conference, the value is an empty array.

    AudioFormat

    The audio format.

    Declaration
    public AudioFormat AudioFormat { get; protected set; }
    Property Value
    Type Description
    AudioFormat

    Data

    Pointer to the unmanaged media buffer.

    Declaration
    public IntPtr Data { get; protected set; }
    Property Value
    Type Description
    IntPtr

    IsSilence

    Indicates if the received audio media buffer contains only silence. This property is set automatically for received audio buffers. When sending buffers via the Send method, this property is unused.

    Declaration
    public bool IsSilence { get; protected set; }
    Property Value
    Type Description
    Boolean

    Length

    The length in bytes of the data in the media buffer.

    Declaration
    public long Length { get; protected set; }
    Property Value
    Type Description
    Int64

    Timestamp

    Timestamp of when the media content was received by the bot, or if the bot is sending media, the timestamp of when the media was sourced. It is in 100-ns units. When sourcing media buffers, this property should be set using the value from the MediaPlatform.GetCurrentTimestamp() API.

    Declaration
    public long Timestamp { get; protected set; }
    Property Value
    Type Description
    Int64

    UnmixedAudioBuffers

    Contains the list of received unmixed audio buffers (up to four at a time).

    Declaration
    public UnmixedAudioBuffer[] UnmixedAudioBuffers { get; protected set; }
    Property Value
    Type Description
    UnmixedAudioBuffer[]
    Remarks

    This is useful for advanced meeting scenarios, such as being able to receive separate audio buffers for individual speakers. This value is set only on the receive side when the AudioSocketSetting.ReceiveUnmixedMeetingAudio property is set to true. Creating unmixed audio buffers and sending it on the AudioSocket is not supported. This property is null when unmixed buffers are not requested.

    Methods

    Dispose()

    Disposes the object.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Releases unmanaged resources held by the buffer object. Must be implemented in the derived class.

    Declaration
    protected abstract void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    If true, both managed and unmanaged resources can be disposed. If false, only unmanaged resources can be disposed.

    Implements

    System.IDisposable
    Back to top Copyright (c) Microsoft Corporation. All rights reserved.