/// <summary> /// Sets the sound stream information to the audio input. /// </summary> /// <param name="streamPolicy">The <see cref="AudioStreamPolicy"/> to apply for the AudioCapture.</param> /// <exception cref="ArgumentNullException"><paramref name="streamPolicy"/> is null.</exception> /// <exception cref="ObjectDisposedException"> /// <paramref name="streamPolicy"/> has already been disposed of.<br/> /// -or-<br/> /// The AudioCaptureBase has already been disposed of. /// </exception> /// <exception cref="NotSupportedException"><paramref name="streamPolicy"/> is not supported.</exception> /// <exception cref="ArgumentException">Not able to retrieve information from <paramref name="streamPolicy"/>.</exception> /// <since_tizen> 3 </since_tizen> public void ApplyStreamPolicy(AudioStreamPolicy streamPolicy) { if (streamPolicy == null) { throw new ArgumentNullException(nameof(streamPolicy)); } ValidateNotDisposed(); AudioIOUtil.ThrowIfError(AudioInput.SetStreamInfo(_handle, streamPolicy.Handle)); }
/// <summary> /// Sets the sound stream information to the audio input. /// </summary> /// <param name="streamPolicy">The <see cref="AudioStreamPolicy"/> to apply for the AudioCapture.</param> /// <exception cref="ArgumentNullException"><paramref name="streamPolicy"/> is null.</exception> /// <exception cref="ObjectDisposedException"> /// <paramref name="streamPolicy"/> has already been disposed of.<br/> /// -or-<br/> /// The AudioCaptureBase has already been disposed of. /// </exception> /// <exception cref="NotSupportedException"><paramref name="streamPolicy"/> is not supported.</exception> /// <exception cref="ArgumentException">Not able to retrieve information from <paramref name="streamPolicy"/>.</exception> /// <since_tizen> 3 </since_tizen> public void ApplyStreamPolicy(AudioStreamPolicy streamPolicy) { if (streamPolicy == null) { throw new ArgumentNullException(nameof(streamPolicy)); } ValidateNotDisposed(); AudioInput.SetStreamInfo(_handle, streamPolicy.Handle) .ThrowIfFailed("Failed to apply stream policy."); }