示例#1
0
 /// <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));
 }
示例#2
0
        private void cbAudioDevices_SelectionChangeCommitted(object sender, EventArgs e)
        {
            AudioDevice selected = (AudioDevice)dropdownAudioDevices.SelectedItem;

            audioPlayer.SetAudioOutputDevice(selected.DeviceInfo.Guid);
        }
示例#3
0
        private void cbAudioDevices_SelectionChangeCommitted(object sender, EventArgs e)
        {
            AudioDevice selected = (AudioDevice)cbAudioDevices.SelectedItem;

            player.GetAudioPlayer().SetAudioOutputDevice(selected, true);
        }