IWMEncAudienceObj::put_AudioCodec

Windows Media Encoder SDK banner art

The put_AudioCodec method specifies the index of the audio codec that is used by the current audience.

Syntax

HRESULT put_AudioCodec(
  short  iRenderSiteIndex,
  long  lCodecIndex
);

Parameters

iRenderSiteIndex

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

lCodecIndex

[in]  long that indicates the index of the audio codec.

Return Values

If the method succeeds, it returns S_OK. If it fails, it supports the IErrorInfo interface and returns an HRESULT error code.

Remarks

This audio codec index corresponds to the total number of audio codecs that the profile supports for its VBR mode, which you can retrieve using the IWMEncProfile2::get_AudioCodecCount method.

Use the IWMEncProfile2::EnumAudioCodec method to retrieve the name of the audio codec and its FOURCC value.

Requirements

Header: wmencode.h

Library: wmenc.exe

See Also