public AudioRecorder(
     IRecordingStreamManager streamManager,
     IEventAggregator eventAggregator,
     AudioCaptureDevice device)
 {
     _eventAggregator = eventAggregator;
     _streamManager = streamManager;
     _device = device;
 }
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         _isDisposed = true;
         if (_device != null)
         {
             _device.Dispose();
             _device = null;
         }
     }
 }