/// <summary> /// Set the audio output device (if available); Returns current audio device (desired if valid). /// <para><strong>Important:</strong> Requires re-initialization of WaveOut to apply changes.</para> /// </summary> /// <param name="device">Audio Device Object</param> /// <param name="reinitialize">Whether to re-initialize the player.</param> /// <returns></returns> public int SetAudioOutputDevice(AudioDevice device, bool reinitialize = false) { return(SetAudioOutputDevice(device.ID, reinitialize)); }
private void cbAudioDevices_SelectionChangeCommitted(object sender, EventArgs e) { AudioDevice selected = (AudioDevice)dropdownAudioDevices.SelectedItem; audioPlayer.SetAudioOutputDevice(selected.DeviceInfo.Guid); }
private void cbAudioDevices_SelectionChangeCommitted(object sender, EventArgs e) { AudioDevice selected = (AudioDevice)cbAudioDevices.SelectedItem; player.GetAudioPlayer().SetAudioOutputDevice(selected, true); }