Vista居然把Mixer拿掉了:-(

Vista居然把Mixer拿掉了:-(

沉寂了一段时间,现在继续SWT Win32 Extension的开发,说实话,最近的进展挺失败的。Black Glossy效果我发现在某些机器上的显示效果非常的卡,我自己的机器却没有任何问题。另外就是我最近在XP下实现了Window Mixer API,用来管理系统声音。Win98,2000,XP都没有问题,结果Vista让我郁闷了,Vista居然取消了Mixer,我哭呀。以下是微软员工给出的答案:

That's because the mixer APIs are virtualized on Windows Vista - you don't get to see the real audio hardware by default, only a virtualized version.  We did this because the vast majority of applications that used the mixer APIs were using them to control their own volume, which is quite rude (it says "I own the box, no other sounds on the system matter").

 You have two choices.  The first is to run your application in XP compatibility mode, in which case you'll be able to access the real audio hardware (please note: you'll see exactly what the hardware provides, which may lead to surprising results).

 The other choice is to use the new Vista audio engine APIs.  either the IAudioEndpointVolume API which allows you access to the master volume for each of the audio endpoints on the machine.  If you really need to access the actual audio controls the IDeviceTopology interface will allow you direct access to the various controls on the audio hardware.

没脾气了,只能专门为Vista实现一套简单的API了。

你可能感兴趣的:(Vista居然把Mixer拿掉了:-()