标头文件更改

Windows 驱动程序工具包(WDK)包含两个头文件,用于定义 Windows 多媒体控制面板支持的扬声器配置:

  • Ksmedia.h defines the channel masks for the KSAUDIO_CHANNEL_CONFIG structure that is used by the KSPROPERTY_AUDIO_CHANNEL_CONFIG property request.

  • Dsound.h defines a list of speaker-configuration identifiers that can be submitted to the IDirectSound::SetSpeakerConfig method. 有关此方法的详细信息,请参阅 Windows SDK 文档。

在 Windows Server 2003 中,Windows XP SP1、Windows 2000 和 Windows Me/98 中,Ksmedia.h 定义下表中针对 5.1 和 7.1 通道流显示的通道掩码。

Parameter name Channel mask Speaker positions

KSAUDIO_SPEAKER_5POINT1

0x3F

FL、FR、FC、LFE、BL、BR

KSAUDIO_SPEAKER_7POINT1

0xFF

FL、FR、FC、LFE、BL、BR、FLC、FRC

上表中的两个通道掩码表示 5.1 扬声器配置和 7.1 扬声器配置。 若要标识相同的两个扬声器配置,Dsound.h 定义了以下说话人配置 ID:

  #define DSSPEAKER_5POINT1      0x00000006
  #define DSSPEAKER_7POINT1      0x00000007

在 SP2 及更高版本的 Windows XP 中,Ksmedia.h 定义下表中针对 5.1 和 7.1 通道流的通道掩码。

Parameter name Channel mask Speaker positions

KSAUDIO_SPEAKER_5POINT1

0x3F

FL、FR、FC、LFE、BL、BR

KSAUDIO_SPEAKER_7POINT1_SURROUND

0x63F

FL、FR、FC、LFE、BL、BR、SL、SR

通过比较上述两个表,以下几点是显而易见的:

  • 尽管在第一个表中的通道掩码0x3F的含义在第二个表中没有更改,尽管在 Windows SP2 和更高版本的 Windows 中,KSAUDIO_SPEAKER_5POINT1被解释为使用 SL 和 SR 扬声器,而不是 BL 和 BR。

  • 支持具有值的新通道掩码0x63F。 此通道掩码表示 7.1 家庭影院扬声器配置。

  • Note In Windows Vista and later versions of Windows, the KSAUDIO_SPEAKER_7POINT1 speaker configuration is no longer supported. 因此,它不是控制面板中的可用选项。

若要表示相同的扬声器配置集,Dsound.h 定义了以下扬声器配置 ID:

  #define DSSPEAKER_5POINT1             0x00000006
  #define DSSPEAKER_7POINT1             0x00000007
  #define DSSPEAKER_7POINT1_SURROUND    0x00000008
  #define DSSPEAKER_7POINT1_WIDE        DSSPEAKER_7POINT1

DSSPEAKER_7POINT1_SURROUND表示控制面板中新的 7.1 家庭影院扬声器配置。 DSSPEAKER_7POINT1和DSSPEAKER_7POINT1_WIDE都是相同 7.1 宽配置扬声器配置的名称。

有关 DirectSound 扬声器配置的详细信息,请参阅 DirectSound Speaker-Configuration 设置