buildAudio

expect fun buildAudio(description: String, sampleRate: Int, sampleFormat: SampleFormat, channels: Int, timeBase: Rational, outputSampleRate: Int = 0, outputSampleFormat: SampleFormat = SampleFormat.None, outputChannels: Int = 0): FilterGraph

Build a single-input audio graph. When the output* parameters are given, an aformat stage is appended so emitted frames arrive encoder-ready (resampled / reformatted / remixed inside the graph).

The composed chain (the description plus any appended aformat stage) must fit in 2048 bytes. A description that does not leave room is refused with FFmpegError.InvalidArgument; it is never silently truncated.

Parameters

description

filter chain, e.g. volume=0.5,atempo=1.25. Empty or anull means passthrough.

sampleRate

input sample rate

sampleFormat

input sample format (decoder output, e.g. fltp)

channels

input channel count

timeBase

pts time-base of input frames

actual fun buildAudio(description: String, sampleRate: Int, sampleFormat: SampleFormat, channels: Int, timeBase: Rational, outputSampleRate: Int, outputSampleFormat: SampleFormat, outputChannels: Int): FilterGraph

Build a single-input audio graph. When the output* parameters are given, an aformat stage is appended so emitted frames arrive encoder-ready (resampled / reformatted / remixed inside the graph).

The composed chain (the description plus any appended aformat stage) must fit in 2048 bytes. A description that does not leave room is refused with FFmpegError.InvalidArgument; it is never silently truncated.

Parameters

description

filter chain, e.g. volume=0.5,atempo=1.25. Empty or anull means passthrough.

sampleRate

input sample rate

sampleFormat

input sample format (decoder output, e.g. fltp)

channels

input channel count

timeBase

pts time-base of input frames

actual fun buildAudio(description: String, sampleRate: Int, sampleFormat: SampleFormat, channels: Int, timeBase: Rational, outputSampleRate: Int, outputSampleFormat: SampleFormat, outputChannels: Int): FilterGraph

Build a single-input audio graph. When the output* parameters are given, an aformat stage is appended so emitted frames arrive encoder-ready (resampled / reformatted / remixed inside the graph).

The composed chain (the description plus any appended aformat stage) must fit in 2048 bytes. A description that does not leave room is refused with FFmpegError.InvalidArgument; it is never silently truncated.

Parameters

description

filter chain, e.g. volume=0.5,atempo=1.25. Empty or anull means passthrough.

sampleRate

input sample rate

sampleFormat

input sample format (decoder output, e.g. fltp)

channels

input channel count

timeBase

pts time-base of input frames

actual fun buildAudio(description: String, sampleRate: Int, sampleFormat: SampleFormat, channels: Int, timeBase: Rational, outputSampleRate: Int, outputSampleFormat: SampleFormat, outputChannels: Int): FilterGraph

Build a single-input audio graph. When the output* parameters are given, an aformat stage is appended so emitted frames arrive encoder-ready (resampled / reformatted / remixed inside the graph).

The composed chain (the description plus any appended aformat stage) must fit in 2048 bytes. A description that does not leave room is refused with FFmpegError.InvalidArgument; it is never silently truncated.

Parameters

description

filter chain, e.g. volume=0.5,atempo=1.25. Empty or anull means passthrough.

sampleRate

input sample rate

sampleFormat

input sample format (decoder output, e.g. fltp)

channels

input channel count

timeBase

pts time-base of input frames