Share via


IWMEncAudienceObj.AudioBufferMax

Windows Media Encoder SDK banner art

The AudioBufferMax property specifies and retrieves the maximum size of the audio buffer for the current audience.

Syntax

IWMEncAudienceObj.AudioBufferMax(iRenderSiteIndex) = Long
Long = IWMEncAudienceObj.AudioBufferMax(iRenderSiteIndex)

Parameters

iRenderSiteIndex

[in]  Integer containing the audience stream index. Because an audience can only contain one stream of each type, iRenderSiteIndex must be zero.

Property Value

A Long that indicates the size of the audio buffer, in milliseconds.

Remarks

The AudioBufferMax property indicates the maximum time that a client must wait to play audio content that was encoded at peak variable bit rate (VBR).

Your audio buffer should always be equal to or less than your video buffer. For example, if you are using peak bit rate-based VBR audio and CBR video, the peak audio buffer size should be less than the video buffer size. If you are using peak bit rate-based VBR audio and peak bit rate-based video, the peak audio buffer size should be less than the peak video buffer size.

Example Code

' Create a WMEncProfile2 object.
  Dim Pro As WMEncProfile2
  Set Pro = New WMEncProfile2

' Load a custom profile. REPLACE THE FILE NAME.
  Pro.LoadFromFile "C:\Profiles\CustomProfile.prx"

' Create an IWMEncAudienceObj object, selecting the first audience (0)
' in the profile.
  Dim Audnc As IWMEncAudienceObj
  Set Audnc = Pro.Audience(0)

' Retrieve the maximum size of the audio buffer.
' Divide by 1000 to retrieve the value in seconds.
  Dim lAudBMax As Long
  lAudBMax = Audnc.AudioBufferMax(0) / 1000

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also