internal AudioSessionControl(IAudioSessionControl2 realAudioSessionControl) { var _meters = realAudioSessionControl as IAudioMeterInformation; var _volume = realAudioSessionControl as ISimpleAudioVolume; if (_meters != null) _AudioMeterInformation = new AudioMeterInformation(_meters); if (_volume != null) _SimpleAudioVolume = new SimpleAudioVolume(_volume); _AudioSessionControl = realAudioSessionControl; }
private void GetAudioMeterInformation() { try { object result; Marshal.ThrowExceptionForHR(_RealDevice.Activate(ref IID_IAudioMeterInformation, CLSCTX.ALL, IntPtr.Zero, out result)); _AudioMeterInformation = new AudioMeterInformation(result as IAudioMeterInformation); } catch { _AudioMeterInformation = null; } }
internal AudioSessionControl(IAudioSessionControl2 realAudioSessionControl) { var _meters = realAudioSessionControl as IAudioMeterInformation; var _volume = realAudioSessionControl as ISimpleAudioVolume; if (_meters != null) { _AudioMeterInformation = new AudioMeterInformation(_meters); } if (_volume != null) { _SimpleAudioVolume = new SimpleAudioVolume(_volume); } _AudioSessionControl = realAudioSessionControl; }
private void GetAudioMeterInformation() { try { object result; Marshal.ThrowExceptionForHR(_RealDevice.Activate(ref IID_IAudioMeterInformation, CLSCTX.ALL, IntPtr.Zero, out result)); _AudioMeterInformation = new AudioMeterInformation(result as IAudioMeterInformation); } catch { _AudioMeterInformation = null; } }