- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
51 lines
1.7 KiB
Java
51 lines
1.7 KiB
Java
package com.mbridge.msdk.playercommon.exoplayer2;
|
|
|
|
import androidx.annotation.Nullable;
|
|
import com.ironsource.mediationsdk.logger.IronSourceError;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.util.Assertions;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class PlaybackParameters {
|
|
public static final PlaybackParameters DEFAULT = new PlaybackParameters(1.0f);
|
|
public final float pitch;
|
|
private final int scaledUsPerMs;
|
|
public final boolean skipSilence;
|
|
public final float speed;
|
|
|
|
public final long getMediaTimeUsForPlayoutTimeMs(long j) {
|
|
return j * this.scaledUsPerMs;
|
|
}
|
|
|
|
public PlaybackParameters(float f) {
|
|
this(f, 1.0f, false);
|
|
}
|
|
|
|
public PlaybackParameters(float f, float f2) {
|
|
this(f, f2, false);
|
|
}
|
|
|
|
public PlaybackParameters(float f, float f2, boolean z) {
|
|
Assertions.checkArgument(f > 0.0f);
|
|
Assertions.checkArgument(f2 > 0.0f);
|
|
this.speed = f;
|
|
this.pitch = f2;
|
|
this.skipSilence = z;
|
|
this.scaledUsPerMs = Math.round(f * 1000.0f);
|
|
}
|
|
|
|
public final boolean equals(@Nullable Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (obj == null || PlaybackParameters.class != obj.getClass()) {
|
|
return false;
|
|
}
|
|
PlaybackParameters playbackParameters = (PlaybackParameters) obj;
|
|
return this.speed == playbackParameters.speed && this.pitch == playbackParameters.pitch && this.skipSilence == playbackParameters.skipSilence;
|
|
}
|
|
|
|
public final int hashCode() {
|
|
return ((((IronSourceError.ERROR_NON_EXISTENT_INSTANCE + Float.floatToRawIntBits(this.speed)) * 31) + Float.floatToRawIntBits(this.pitch)) * 31) + (this.skipSilence ? 1 : 0);
|
|
}
|
|
}
|