/// <summary> /// Creates a new <see cref="AudioCaptureClient" /> by calling the <see cref="AudioClient.GetService" /> method of the /// specified <paramref name="audioClient" />. /// </summary> /// <param name="audioClient"> /// <see cref="AudioClient" /> which should be used to create the <see cref="AudioCaptureClient" />-instance /// with. /// </param> /// <returns>A new <see cref="AudioCaptureClient" />.</returns> public static AudioClock FromAudioClient(AudioClient audioClient) { if (audioClient == null) throw new ArgumentNullException("audioClient"); return new AudioClock(audioClient.GetService(typeof (AudioClock).GUID)); }
public static SimpleAudioVolume FromAudioClient(AudioClient audioClient) { if (audioClient == null) throw new ArgumentNullException("audioClient"); return new SimpleAudioVolume(audioClient.GetService(IID_SimpleAudioVolume)); }
/// <summary> /// Creates a new <see cref="AudioCaptureClient" /> by calling the <see cref="AudioClient.GetService" /> method of the /// specified <paramref name="audioClient" />. /// </summary> /// <param name="audioClient"> /// The <see cref="AudioClient" /> which should be used to create the <see cref="AudioCaptureClient" />-instance /// with. /// </param> /// <returns>A new instance of the <see cref="AudioCaptureClient"/> class.</returns> public static AudioCaptureClient FromAudioClient(AudioClient audioClient) { if (audioClient == null) throw new ArgumentNullException("audioClient"); return new AudioCaptureClient(audioClient.GetService(IID_IAudioCaptureClient)); }
/// <summary> /// Initializes a new instance of the <see cref="AudioSessionControl"/> class. /// </summary> /// <param name="audioClient">The audio client to create a <see cref="AudioSessionControl"/> instance for.</param> /// <exception cref="System.ArgumentNullException">audioClient</exception> public AudioSessionControl(AudioClient audioClient) { if (audioClient == null) { throw new ArgumentNullException("audioClient"); } BasePtr = audioClient.GetService(typeof(AudioSessionControl).GUID); }
/// <summary> /// Creates a new <see cref="AudioCaptureClient" /> by calling the <see cref="AudioClient.GetService" /> method of the /// specified <paramref name="audioClient" />. /// </summary> /// <param name="audioClient"> /// <see cref="AudioClient" /> which should be used to create the <see cref="AudioCaptureClient" />-instance /// with. /// </param> /// <returns>A new <see cref="AudioCaptureClient" />.</returns> public static AudioClock FromAudioClient(AudioClient audioClient) { if (audioClient == null) { throw new ArgumentNullException("audioClient"); } return(new AudioClock(audioClient.GetService(typeof(AudioClock).GUID))); }
/// <summary> /// Returns a new instance of the <see cref="AudioRenderClient" /> class. This is done by calling the /// <see cref="AudioClient.GetService" /> method of the <see cref="AudioClient" /> class. /// </summary> /// <param name="audioClient"> /// The <see cref="AudioClient" /> instance which should be used to create the new /// <see cref="AudioRenderClient" /> instance. /// </param> /// <returns>A new instance of the <see cref="AudioRenderClient" /> class.</returns> public static AudioRenderClient FromAudioClient(AudioClient audioClient) { if (audioClient == null) { throw new ArgumentNullException("audioClient"); } return(new AudioRenderClient(audioClient.GetService(IID_IAudioRenderClient))); }
/// <summary> /// Creates a new <see cref="SimpleAudioVolume" /> instance by calling the <see cref="AudioClient.GetService" /> method of the /// specified <paramref name="audioClient" />. /// </summary> /// <param name="audioClient"> /// The <see cref="AudioClient" /> which should be used to create the <see cref="SimpleAudioVolume" />-instance /// with. /// </param> /// <returns>A new instance of the <see cref="SimpleAudioVolume"/> class.</returns> public static SimpleAudioVolume FromAudioClient(AudioClient audioClient) { if (audioClient == null) { throw new ArgumentNullException("audioClient"); } return(new SimpleAudioVolume(audioClient.GetService(IID_SimpleAudioVolume))); }
/// <summary> /// Initializes a new instance of the <see cref="AudioSessionControl"/> class. /// </summary> /// <param name="audioClient">The audio client to create a <see cref="AudioSessionControl"/> instance for.</param> /// <exception cref="System.ArgumentNullException">audioClient</exception> public AudioSessionControl(AudioClient audioClient) { if (audioClient == null) { throw new ArgumentNullException("audioClient"); } BasePtr = audioClient.GetService(typeof(AudioSessionControl).GUID); RegisterAudioSessionNotification(_sessionEvents); }