Document PanArgument

Former-commit-id: 571cc88a39
This commit is contained in:
alex6dj 2021-10-04 13:05:44 -04:00
parent b5dd8600a4
commit d7be7aa5ac

View file

@ -4,13 +4,22 @@
namespace FFMpegCore.Arguments namespace FFMpegCore.Arguments
{ {
/// <summary> /// <summary>
/// Represents scale parameter /// Mix channels with specific gain levels.
/// </summary> /// </summary>
public class PanArgument : IAudioFilterArgument public class PanArgument : IAudioFilterArgument
{ {
public readonly string ChannelLayout; public readonly string ChannelLayout;
private readonly string[] _outputDefinitions; private readonly string[] _outputDefinitions;
/// <summary>
/// Mix channels with specific gain levels <see href="https://ffmpeg.org/ffmpeg-filters.html#toc-pan-1"/>
/// </summary>
/// <param name="channelLayout">
/// Represent the output channel layout. Like "stereo", "mono", "2.1", "5.1"
/// </param>
/// <param name="outputDefinitions">
/// Output channel specification, of the form: "out_name=[gain*]in_name[(+-)[gain*]in_name...]"
/// </param>
public PanArgument(string channelLayout, params string[] outputDefinitions) public PanArgument(string channelLayout, params string[] outputDefinitions)
{ {
if (string.IsNullOrWhiteSpace(channelLayout)) if (string.IsNullOrWhiteSpace(channelLayout))
@ -23,6 +32,13 @@ public PanArgument(string channelLayout, params string[] outputDefinitions)
_outputDefinitions = outputDefinitions; _outputDefinitions = outputDefinitions;
} }
/// <summary>
/// Mix channels with specific gain levels <see href="https://ffmpeg.org/ffmpeg-filters.html#toc-pan-1"/>
/// </summary>
/// <param name="channels">Number of channels in output file</param>
/// <param name="outputDefinitions">
/// Output channel specification, of the form: "out_name=[gain*]in_name[(+-)[gain*]in_name...]"
/// </param>
public PanArgument(int channels, params string[] outputDefinitions) public PanArgument(int channels, params string[] outputDefinitions)
{ {
if (channels <= 0) throw new ArgumentOutOfRangeException(nameof(channels)); if (channels <= 0) throw new ArgumentOutOfRangeException(nameof(channels));