private void GetAudioMeterInformation() { object obj2; Marshal.ThrowExceptionForHR(this._RealDevice.Activate(ref IID_IAudioMeterInformation, CLSCTX.ALL, IntPtr.Zero, out obj2)); this._AudioMeterInformation = new CoreAudioApi.AudioMeterInformation(obj2 as IAudioMeterInformation); }
internal AudioSessionControl(IAudioSessionControl2 realAudioSessionControl) { IAudioMeterInformation realInterface = realAudioSessionControl as IAudioMeterInformation; ISimpleAudioVolume realSimpleVolume = realAudioSessionControl as ISimpleAudioVolume; if (realInterface != null) { this._AudioMeterInformation = new CoreAudioApi.AudioMeterInformation(realInterface); } if (realSimpleVolume != null) { this._SimpleAudioVolume = new CoreAudioApi.SimpleAudioVolume(realSimpleVolume); } this._AudioSessionControl = realAudioSessionControl; }