Commit 5d0cc247 by christosts Committed by Ian Baker

End-to-end Robolectric playback test for audio capabilities

This change adds end-to-end Robolectric playback tests which handle
the scenario the player is playing audio via passthrough and
AudioTrack raises the ERROR_DEAD_OBJECT error upon which the player
attempts to recover by switching to another audio format.

PiperOrigin-RevId: 531180183
parent 4a059884
......@@ -32,6 +32,7 @@ import android.util.Pair;
import androidx.annotation.DoNotInline;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.VisibleForTesting;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.util.MimeTypes;
......@@ -46,7 +47,7 @@ import java.util.Arrays;
public final class AudioCapabilities {
private static final int DEFAULT_MAX_CHANNEL_COUNT = 8;
private static final int DEFAULT_SAMPLE_RATE_HZ = 48_000;
@VisibleForTesting /* package */ static final int DEFAULT_SAMPLE_RATE_HZ = 48_000;
/** The minimum audio capabilities supported by all devices. */
public static final AudioCapabilities DEFAULT_AUDIO_CAPABILITIES =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment