internal Adapter(CapturedSoundInfoSource owner, SoundCaptureDevice device, int window, int delta) : base(device) { this.owner = owner; this.windowBuffer = new SlidingWindowBuffer(window, delta); this.buffer = new double[window]; }
public SoundCaptureBase(SoundCaptureDevice device) { this.device = device; positionEvent = new AutoResetEvent(false); positionEventHandle = positionEvent.SafeWaitHandle; terminated = new ManualResetEvent(true); }
public static SoundCaptureDevice GetDefaultDevice() { CaptureDevicesCollection captureDevices = new CaptureDevicesCollection(); SoundCaptureDevice device = null; foreach (DeviceInformation captureDevice in captureDevices) { if(captureDevice.DriverGuid == Guid.Empty) { device = new SoundCaptureDevice(captureDevice.DriverGuid, captureDevice.Description); break; } } if (device == null) throw new SoundCaptureException("Default capture device is not found"); return device; }
public static SoundCaptureDevice GetDefaultDevice() { CaptureDevicesCollection captureDevices = new CaptureDevicesCollection(); SoundCaptureDevice device = null; foreach (DeviceInformation captureDevice in captureDevices) { if (captureDevice.DriverGuid == Guid.Empty) { device = new SoundCaptureDevice(captureDevice.DriverGuid, captureDevice.Description); break; } } if (device == null) { throw new SoundCaptureException("Default capture device is not found"); } return(device); }
public static SoundCaptureDevice GetDefaultDevice() { CaptureDevicesCollection captureDevices = new CaptureDevicesCollection(); SoundCaptureDevice device = null; foreach (DeviceInformation captureDevice in captureDevices) { if (captureDevice.DriverGuid == Guid.Empty) { device = new SoundCaptureDevice(captureDevice.DriverGuid, captureDevice.Description); break; } } if (device == null) { throw new SoundCaptureException("Устройство захвата по умолчанию не найдено"); } return(device); }
public static SoundCaptureDevice GetDefaultDevice() { CaptureDevicesCollection captureDevices = new CaptureDevicesCollection(); SoundCaptureDevice device = null; foreach (DeviceInformation captureDevice in captureDevices) { if (captureDevice.DriverGuid == Guid.Empty) { device = new SoundCaptureDevice(captureDevice.DriverGuid, captureDevice.Description); break; } } if (device == null) { throw new SoundCaptureException("No sound capture device, it needs a microphone to work."); } return(device); }
public SoundCaptureBase() : this(SoundCaptureDevice.GetDefaultDevice()) { }
private void StartListenning(SoundCaptureDevice device) { isListenning = true; frequencyInfoSource = new SoundFrequencyInfoSource(device); frequencyInfoSource.FrequencyDetected += new EventHandler<FrequencyDetectedEventArgs>(frequencyInfoSource_FrequencyDetected); frequencyInfoSource.Listen(); }
internal Adapter(SoundFrequencyInfoSource owner, SoundCaptureDevice device) : base(device) { this.owner = owner; }
internal SoundFrequencyInfoSource(SoundCaptureDevice device) { this.device = device; }
internal Adapter(SoundFrequencyInfoSource owner, SoundCapture.SoundCaptureDevice device) : base(device) { this.owner = owner; }
internal SoundFrequencyInfoSource(SoundCapture.SoundCaptureDevice device) { this.device = device; }
internal CapturedSoundInfoSource(SoundCaptureDevice device) { this.device = device; }