mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add PlaybackParameters.withPitch() method
Issue: androidx/media#2257 PiperOrigin-RevId: 742693410
This commit is contained in:
parent
209ecce6b3
commit
ce3754a740
@ -3,6 +3,9 @@
|
|||||||
### Unreleased changes
|
### Unreleased changes
|
||||||
|
|
||||||
* Common Library:
|
* Common Library:
|
||||||
|
* Add `PlaybackParameters.withPitch(float)` method for easily copying a
|
||||||
|
`PlaybackParameters` with a new `pitch` value
|
||||||
|
([#2257](https://github.com/androidx/media/issues/2257)).
|
||||||
* ExoPlayer:
|
* ExoPlayer:
|
||||||
* Fix sending `CmcdData` in manifest requests for DASH, HLS, and
|
* Fix sending `CmcdData` in manifest requests for DASH, HLS, and
|
||||||
SmoothStreaming ([#2253](https://github.com/androidx/media/pull/2253)).
|
SmoothStreaming ([#2253](https://github.com/androidx/media/pull/2253)).
|
||||||
|
@ -88,6 +88,18 @@ public final class PlaybackParameters {
|
|||||||
return new PlaybackParameters(speed, pitch);
|
return new PlaybackParameters(speed, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a copy with the given pitch.
|
||||||
|
*
|
||||||
|
* @param pitch The new pitch. Must be greater than zero.
|
||||||
|
* @return The copied playback parameters.
|
||||||
|
*/
|
||||||
|
@UnstableApi
|
||||||
|
@CheckResult
|
||||||
|
public PlaybackParameters withPitch(@FloatRange(from = 0, fromInclusive = false) float pitch) {
|
||||||
|
return new PlaybackParameters(speed, pitch);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(@Nullable Object obj) {
|
public boolean equals(@Nullable Object obj) {
|
||||||
if (this == obj) {
|
if (this == obj) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user