次の方法で共有


Audio Resampler DSP

The Audio Resampler performs one or both of the following actions on an audio stream.

  • Change the sampling rate.
  • Change the number of channels.

CLSID

CLSID_CResamplerMediaObject

Interfaces

Formats

PCM or IEEE float

Properties

Custom Channel Mapping

You can specify a custom matrix for channel mapping by calling IWMResamplerProps::SetUserChannelMtx or by setting the MFPKEY_WMRESAMP_CHANNELMTX property.

Default Channel Mapping

If you do not specify a custom matrix, the Audio Resampler DSP uses default values for channel mapping.

The following table shows the default coefficients for mapping 6 channels (mask 0x3F) to 2 channels.

L R C LFE BL BR
L 0.314 0 0.222 0.031 0.268 0.164
R 0 0.314 0.222 0.031 0.164 0.268

 

The following table shows the default coefficients for mapping 6 channels (mask 0x60F) to 2 channels.

L R C LFE SL SR
L 0.320 0 0.226 0.032 0.292 0.130
R 0 0.320 0.226 0.032 0.130 0.292

 

The following table shows the default coefficients for mapping 6 (mask 0x3F or 0x60F)channels to 1 channel.

L R C LFE BL(SL) BR(SR)
C 0.192 0.192 0.192 0.038 0.192 0.192

 

The following table shows the default coefficients for mapping 8 channels (mask 0x63F) to 2 channels.

L R C LFE BL BR SL SR
L 0.222 0 0.157 0.022 0.189 0.116 0.203 0.090
R 0 0.222 0.157 0.022 0.116 0.189 0.090 0.203

 

The following table shows the default coefficients for mapping 8 channels (mask 0x63F) to 1 channel.

L R C LFE BL BR SL SR
C 0.139 0.139 0.139 0.028 0.139 0.139 0.139 0.139

 

The following table shows the default coefficients for mapping 8 channels (mask 0x63F) to 6 channels (mask 0x3F).

L R C LFE BL BR SL SR
L 0.518 0 0 0 0 0 0.189 0
R 0 0.518 0 0 0 0 0 0.189
C 0 0 0.518 0 0 0 0 0
LFE 0 0 0 0.518 0 0 0 0
BL 0 0 0 0 0.518 0 0.482 0
BR 0 0 0 0 0 0.518 0 0.482

 

The following table shows the default coefficients for mapping 8 channels (mask 0x63F) to 6 channels (0x60F).

L R C LFE BL BR SL SR
L 0.447 0 0 0 0 0 0 0
R 0 0.447 0 0 0 0 0 0
C 0 0 0.447 0 0 0 0 0
LFE 0 0 0 0.447 0 0 0 0
SL 0 0 0 0 0.429 0.124 0.447 0
SR 0 0 0 0 0.124 0.429 0 0.447

 

The headings in the preceding tables represent the following channels.

Channel Abbreviation Channel name
L Left
R Right
C Center
LFE Low Frequency Effects
BL Back Left
BR Back Right
SL Surround Left
SR Surround Right

 

To understand how to interpret the tables of coefficients, consider the first table, which maps 6 channels to 2. The first row of the table (0.314, 0, 0.222, 0.031, 0.268, 0.164) is a vector of weights that specifies how heavily each input channel contributes to the left channel of the output. The second row of the table (0, 0.314, 0.222, 0.031, 0.164, 0.268) is a vector of weights that specifies how heavily each input channel contributes to the right channel of the output.

The following formulas show how the output channels are calculated.

L_out = L*0.314 + C*0.222 + LFE*0.031 + BL*0.268 + BR*0.164 
R_out = R*0.314 + C*0.222 + LFE*0.031 + BL*0.164 + BR*0.268

Note  If you use the Audio Resampler DSP to increase the number of channels, the added channels will be assigned values of 0.

Output Quality

You can specify the output quality of the Audio Resampler DSP by calling IWMResamplerProps::SetHalfFilterLength or by setting the MFPKEY_WMRESAMP_FILTERQUALITY property. If you do not specify the output quality, the Audio Resampler DSP uses a default quality value of 30.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Wmcodecdsp.h

DLL

Resampledmo.dll

See Also

Digital Signal Processors

 

 

Send comments about this topic to Microsoft

Build date: 4/7/2010