Remarks
Retrieves a specific encoding bitrate (for Constant Bitrate or CBR) supported by Windows Media components for a given frequency and number of channels.
The number of available bitrates can be obtained using the EncodeFormats.WMA.GetEncodingCBRCount method.
For further details about encoding in WMA format refer to the EncodeWMA class section.
For further information about available encoding formats see the EncodeFormatsMan class.
Syntax
[Visual Basic]
Public Function GetEncodingCBR (
nFrequency as Int32,
nChannels as Int16,
nEncodeMode as enumWmaEncodeModes,
nBitrateIndex as Int16
) as Int32
|
|
[C#]
public Int32 GetEncodingCBR (
Int32 nFrequency,
Int16 nChannels,
enumWmaEncodeModes nEncodeMode,
Int16 nBitrateIndex
);
|
|
[C++]
public: Int32 GetEncodingCBR (
Int32 nFrequency,
Int16 nChannels,
enumWmaEncodeModes nEncodeMode,
Int16 nBitrateIndex
);
|
|
Parameter
|
Description
|
|
|
nFrequency
|
Frequency expressed in Hertz (e.g. 44100)
|
nChannels
|
Number of channels: 1 for Mono, 2 for Stereo
|
nEncodeMode
|
The encoding mode used for WMA (Windows Media Audio) format recording/encoding.
Supported values are the following:
Mnemonic Value
|
Numeric value
|
Meaning
|
WMA_ENCODE_CBR_STD_16
|
1
|
WMA Standard format at 16 bits per sample.
|
WMA_ENCODE_CBR_PRO_16
|
3
|
WMA Professional format at 16 bits per sample.
|
WMA_ENCODE_CBR_PRO_24
|
4
|
WMA Professional format at 24 bits per sample.
|
|
nBitrateIndex
|
Number representing the zero-based index of the bitrate
|
Return value
Value
|
Meaning
|
|
|
Negative value
|
An error occurred. Check the LastError property value in order to see the last error.
|
> 0
|
The requested encoding constant bitrate
|
|