public VolumeMonitorViewModel(VolumeMonitor renderMonitor, VolumeMonitor captureMonitor, VolumeWatcherModel model) { Model = model; renderMonitor.OnVolumeNotification += OnVolumeChanged; renderMonitor.OnDefaultDeviceChanged += OnDeviceChanged; captureMonitor.OnVolumeNotification += OnRecVolumeChanged; captureMonitor.OnDefaultDeviceChanged += OnRecDeviceChanged; Model.SetDeviceInfo(renderMonitor.AudioDevice); Model.SetRecDeviceInfo(captureMonitor.AudioDevice); }
/// <summary> /// ev:規定の録音デバイス変更時 /// </summary> /// <param name="device"></param> public void OnRecDeviceChanged(MMDevice device) { Model.SetRecDeviceInfo(device); }