fix(player): offer the TrueHD MAT carrier on API 29-32 routes
Carrier-or-decode gated the carrier on getDirectPlaybackSupport, which only exists on API 33, so every older route force-decoded TrueHD - including routes that bitstreamed it before the carrier existed. The #1863 Fire TV Stick 4K Max is Fire OS 8 (API 30): its HDMI route advertises raw TrueHD and IEC 61937 at 8 channels, 2.12.1 passed TrueHD through, and 2.13.0 hands the same stream to the FFmpeg decoder. The Shield is API 30 as well. API 29-32 now asks AudioTrack.isDirectPlaybackSupported about the exact 192kHz/7.1 IEC tuple before offering the carrier. It is coarser than the API 33 probe - it cannot tell bitstream from offload - but an IEC 61937 track is PCM-shaped by definition, so direct support means the route carries the frames. getMinBufferSize stays as the precondition on every tier, and a route that still lies fails AudioTrack initialisation, which the audio recovery path already answers by blocking direct output and force-decoding in place. Below API 29 nothing can vouch for the tuple, so the carrier is still not offered and TrueHD decodes as before. The tier decision is split from the platform probes so it is unit-testable; each probe is consulted only on the tiers where its API exists.
This commit is contained in:
+1
-1
@@ -203,7 +203,7 @@ class TrueHdSpeedTransitionTest {
|
||||
@Test
|
||||
fun aRateFamilyMismatchFallsBackToTheDecoderInsteadOfGoingSilent() {
|
||||
val context = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
if (!supportsTrueHdMatCarrier(context)) {
|
||||
if (!supportsTrueHdMatCarrier()) {
|
||||
Log.i(TAG, "==== MISMATCH SKIPPED: device has no carrier route ====")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user