Ejemplo n.º 1
0
        private void GetAudioMeterInformation()
        {
            object result;

            Marshal.ThrowExceptionForHR(deviceInterface.Activate(ref IID_IAudioMeterInformation, CLSCTX.ALL, IntPtr.Zero, out result));
            audioMeterInformation = new AudioMeterInformation(result as IAudioMeterInformation);
        }
Ejemplo n.º 2
0
        internal AudioSessionControl(IAudioSessionControl2 realAudioSessionControl)
        {
            IAudioMeterInformation _meters = realAudioSessionControl as IAudioMeterInformation;
            ISimpleAudioVolume     _volume = realAudioSessionControl as ISimpleAudioVolume;

            if (_meters != null)
            {
                _AudioMeterInformation = new Nequeo.IO.Audio.Api.AudioMeterInformation(_meters);
            }
            if (_volume != null)
            {
                _SimpleAudioVolume = new SimpleAudioVolume(_volume);
            }
            _AudioSessionControl = realAudioSessionControl;
        }