public CsCoreEngine() { using (var enumerator = new MMDeviceEnumerator()) { device = enumerator.GetDefaultAudioEndpoint(DataFlow.Render, Role.Console); } endpointVolume = AudioEndpointVolume.FromDevice(device); }
public AudioEndpointVolumeChannel(AudioEndpointVolume audioEndpointVolume, int channelIndex) { if (audioEndpointVolume == null) throw new ArgumentNullException("audioEndpointVolume"); if (channelIndex < 0) throw new ArgumentOutOfRangeException("channelIndex"); _audioEndpointVolume = audioEndpointVolume; _channelIndex = channelIndex; }
public AudioEndpointVolumeChannel(AudioEndpointVolume audioEndpointVolume, int channelIndex) { if (audioEndpointVolume == null) { throw new ArgumentNullException("audioEndpointVolume"); } if (channelIndex < 0) { throw new ArgumentOutOfRangeException("channelIndex"); } _audioEndpointVolume = audioEndpointVolume; _channelIndex = channelIndex; }