
If the Metadata passed to SegmentSpeedProvider is null, then the SegmentSpeedProvider will always return 1f from getSpeed. Initializing a SpeedChangingAudioProcessor requires a SpeedProvider. Once configured,this audioProcessor is always active, so buffers are passed through it. Because getSpeed is always 1, the processor performs a no-op, but still has to do a buffer copy for each buffer. By not initializing the audio processor when metadata is null, this copy can be skipped and the audio pipeline is more performant. Note: This change does not affect the multiple media-item case, which is not supported with speed changes, as per Transformer API documentation. PiperOrigin-RevId: 513261811
Transformer module
Provides functionality for transforming media files.
Getting the module
The easiest way to get the module is to add it as a gradle dependency:
implementation 'androidx.media3:media3-transformer:1.X.X'
where 1.X.X
is the version, which must match the version of the other media
modules being used.
Alternatively, you can clone this GitHub project and depend on the module locally. Instructions for doing this can be found in the top level README.