IWMEncAudioSource.ContentMode
The ContentMode property specifies and retrieves the mode to use with audio content.
Syntax
IWMEncAudioSource.ContentMode = WMENC_CONTENT_MODE
WMENC_CONTENT_MODE = IWMEncAudioSource.ContentMode
Parameters
This property takes no parameters.
Property Value
A member of the WMENC_CONTENT_MODE enumeration type indicating the audio content mode.
If this property fails, it returns an error number.
Return code | Number | Description |
NS_E_INVALIDCALL_WHILE_ENCODER_RUNNING | 0xC00D1B66L | This property cannot be set while the encoder engine is running. |
E_INVALIDARG | 0x80070057 | The specified content mode is invalid. |
Remarks
The ContentMode property indicates the type of compression to use for the best output quality when working with speech content. If your content is mixed (speech and music), you can use the ContentEDL property to specify an edit decision list (EDL) that indicates which parts of the content are non-speech. You must use the Windows Media Audio 9 Voice codec with this feature.
Example Code
' Create a WMEncoder object.
Dim Encoder As WMEncoder
Set Encoder = New WMEncoder
' Create a source group.
Dim SrcGrpColl As IWMEncSourceGroupCollection
Dim SrcGrp As IWMEncSourceGroup
Set SrcGrpColl = Encoder.SourceGroupCollection
Set SrcGrp = SrcGrpColl.Add("SG_1")
' Add an audio source to the source group and specify an input file.
Dim SrcAud As IWMEncAudioSource
Set SrcAud = SrcGrp.AddSource(WMENC_AUDIO)
SrcAud.SetInput "C:\InputFile.avi" ' REPLACE THIS.
' Specify mixed (audio and speech) mode.
SrcAud.ContentMode = WMENC_AUDIOCONTENT_MIXED_MODE
' Specify the full path and file name of the EDL.
SrcAud.ContentEDL = "C:\EDL.txt" ' REPLACE THIS.
Requirements
Reference: Windows Media Encoder
Library: wmenc.exe
See Also