WIN7要用新的API了uses ... ActiveX, MMDevApi, ...;var deviceEnumerator: IMMDeviceEnumerator;
defaultDevice: IMMDevice;
endpointVolume: IAudioEndpointVolume;
bMute: bool;
begin
CoCreateInstance(CLASS_IMMDeviceEnumerator, nil, CLSCTX_INPROC_SERVER, IID_IMMDeviceEnumerator, deviceEnumerator);
deviceEnumerator.GetDefaultAudioEndpoint(eRender, eConsole, defaultDevice);
defaultDevice.Activate(IID_IAudioEndpointVolume, CLSCTX_INPROC_SERVER, nil, endpointVolume);
endpointVolume.GetMute(bMute);
if bMute then
//静音 else
//开启 ......end;