public SilverlightAudioCaptureDevice(SLAudioCaptureDevice captureDevice) { if (captureDevice == null) throw new ArgumentNullException ("captureDevice"); this.captureDevice = captureDevice; var formatMap = new Dictionary<AudioFormat, SLAudioFormat>(); foreach (SLAudioFormat format in captureDevice.SupportedFormats) { var syfmt = format.ToAudioFormat(); if (formatMap.ContainsKey (syfmt)) continue; formatMap.Add (syfmt, format); } this.formats = formatMap; }
public SilverlightAudioCaptureDevice(SLAudioCaptureDevice captureDevice) { if (captureDevice == null) { throw new ArgumentNullException("captureDevice"); } this.captureDevice = captureDevice; var formatMap = new Dictionary <AudioFormat, SLAudioFormat>(); foreach (SLAudioFormat format in captureDevice.SupportedFormats) { var syfmt = format.ToAudioFormat(); if (formatMap.ContainsKey(syfmt)) { continue; } formatMap.Add(syfmt, format); } this.formats = formatMap; }