/// <summary> /// Sets the volume of the waveout device. /// </summary> /// <param name="percentage">The volume in percentage.</param> public void SetVolume(int percentage) { if (percentage <= 100 && percentage > -1) { _volume = percentage; if (_waveOutDevice == null) { _waveOutDevice = new WaveOut(); } _waveOutDevice.Volume = percentage / (float)100; DataController.SetSetting <int>(SettingType.Volume, percentage); } }
/// <summary> /// Sets the volume of the waveout device. /// </summary> /// <param name="percentage">The volume in percentage.</param> public void SetVolume(int percentage) { if (percentage > 100 || percentage <= -1) { return; } _volume = percentage; if (_waveOutDevice == null) { _waveOutDevice = new WaveOut(); } _waveOutDevice.Volume = percentage / (float)100; DataController.SetSetting(SettingType.Volume, percentage); }
/// <summary> /// Change the shuffle settings. /// </summary> /// <param name="shuffle">To shuffle or not to shuffle.</param> public void SetShuffle(bool shuffle) { _shuffle = shuffle; DataController.SetSetting(SettingType.Shuffle, shuffle); }