void ExecuteButtonCommand() { if (deviceSettings.IsInitialized) { mainSynthesizer.Stop(); deviceSettings.DisposeOutput(); } else { deviceSettings.Initialize(SelectedDevice); mainSynthesizer.Play(deviceSettings.Output); } }
public void Dispose() { mainSynthesizer.Intercepted -= Synthesizer_Intercepted; mainSynthesizer.Stop(); deviceSettings.DisposeOutput(); }