0.95.4: decode Dolby and DTS on the box and send plain sound to the TV unless an amplifier is set, ending DTS dropouts
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 2m24s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 1m29s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-03 22:19:23 +00:00
co-authored by Claude Opus 5.5
parent 019ddc07a2
commit 1b7aef8e8b
10 changed files with 88 additions and 7 deletions
@@ -0,0 +1,18 @@
package tv.orbit.classic
import android.media.AudioFormat
import org.junit.Assert.assertArrayEquals
import org.junit.Test
class AudioOutputTest {
private val tv = setOf(AudioFormat.ENCODING_PCM_16BIT, AudioFormat.ENCODING_AC3, AudioFormat.ENCODING_E_AC3, AudioFormat.ENCODING_DTS, AudioFormat.ENCODING_DOLBY_TRUEHD)
@Test fun dolbyAndDtsAreDecodedOnTheBoxSoOnlyPlainSoundAndTrueHdGoOutUndecoded() {
// The TV accepts DTS and Dolby, but only PCM, and TrueHD (which the box can't decode), are sent as they are.
assertArrayEquals(intArrayOf(AudioFormat.ENCODING_PCM_16BIT, AudioFormat.ENCODING_DOLBY_TRUEHD), plainSoundEncodings(tv::contains))
}
@Test fun aConnectionWithoutTrueHdGetsPlainSoundOnly() {
assertArrayEquals(intArrayOf(AudioFormat.ENCODING_PCM_16BIT), plainSoundEncodings(setOf(AudioFormat.ENCODING_PCM_16BIT)::contains))
}
}