0.95.5: build the plain-sound audio sink without a context, so the HDMI capabilities don't override it (0.95.4 still passed DTS through)
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 2m4s
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:22:49 +00:00
co-authored by Claude Opus 5.5
parent ddb59351fc
commit 4c0d009e66
6 changed files with 16 additions and 5 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ android {
applicationId = "tv.orbit.classic"
minSdk = 26
targetSdk = 36
versionCode = 123
versionName = "0.95.4-plain-sound"
versionCode = 124
versionName = "0.95.5-plain-sound"
}
buildFeatures { compose = true }
compileOptions { sourceCompatibility = JavaVersion.VERSION_17; targetCompatibility = JavaVersion.VERSION_17 }
@@ -34,7 +34,9 @@ internal fun programmeRenderers(context: Context): DefaultRenderersFactory {
@Suppress("DEPRECATION")
override fun buildAudioSink(context: Context, enableFloatOutput: Boolean, enableAudioOutputPlaybackParams: Boolean): AudioSink? {
if (toAmplifier) return super.buildAudioSink(context, enableFloatOutput, enableAudioOutputPlaybackParams)
return DefaultAudioSink.Builder(context)
// Built without a context on purpose: with one, the sink keeps re-reading the HDMI connection's own
// capabilities and overrides these (seen on the box: DTS still went out undecoded).
return DefaultAudioSink.Builder()
.setAudioCapabilities(plainSoundCapabilities(AudioCapabilities.getCapabilities(context)))
.setEnableFloatOutput(enableFloatOutput)
.setEnableAudioTrackPlaybackParams(enableAudioOutputPlaybackParams)
@@ -66,7 +66,7 @@ internal class HttpsEmbyTransport(internal val deviceId: String = UUID.randomUUI
connection.connectTimeout = 10_000
connection.readTimeout = request.readTimeoutMs ?: if (request.path == "/Sessions/Logout") 5_000 else 15_000
connection.setRequestProperty("Accept", "application/json")
connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.95.4\"")
connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.95.5\"")
request.token?.let { connection.setRequestProperty("X-Emby-Token", it) }
if (request.method == "POST") {
val bytes = request.body.orEmpty().toByteArray(Charsets.UTF_8)
@@ -33,7 +33,7 @@ internal class SecureMediaDataSource(private val session: EmbySampleSession) : B
next.instanceFollowRedirects = false
next.connectTimeout = 10_000
next.readTimeout = 20_000
next.setRequestProperty("User-Agent", "OrbitTV/0.95.4")
next.setRequestProperty("User-Agent", "OrbitTV/0.95.5")
next.setRequestProperty("Accept-Encoding", "identity")
session.mediaHeaders(address).forEach { (key, value) -> next.setRequestProperty(key, value) }
if (dataSpec.position != 0L || dataSpec.length != C.LENGTH_UNSET.toLong()) {
+2
View File
@@ -11,3 +11,5 @@ Files: AudioOutput.kt (new), Settings.kt (the setting), EmbyPlaybackDialog.kt, I
**To check on the TV:** the same Terra programme (DTS) plays without dropouts; a Dolby programme sounds normal; the box's audio log shows stream_type pcm during a DTS programme. Not yet checked on the box.
Installed 3 November 2026 at about 22:20 with Paul's OK. All 31 committed plans byte-identical before and after. Box check pending: Paul to tune Terra.
Checked on the box at 22:21: Terra's DTS still went out undecoded (HAL stream_type raw, no audio decoder created). DefaultAudioSink.Builder(context) re-reads the HDMI capabilities and overrides setAudioCapabilities. Fixed in 0.95.5.
+7
View File
@@ -0,0 +1,7 @@
# Orbit TV 0.95.5: plain sound to the TV, corrected
0.95.4 didn't take effect on the box: checked at 22:21 on 3 November, Terra's DTS still went out undecoded ("stream_type raw" in the box's audio log, and no audio decoder created). The cause: `DefaultAudioSink.Builder(context)` registers its own receiver for the HDMI connection's capabilities, which overrides the capabilities Orbit sets. 0.95.5 builds the sink without a context (`DefaultAudioSink.Builder()`), so Orbit's plain-sound capabilities stand. Everything else is as described in VERIFICATION-0.95.4.md.
365 unit tests pass; lint has no errors.
**To check on the TV:** Terra's DTS programme: the box's audio log shows a DTS decoder (c2.amlogic.audio.decoder.dts) and "stream_type:pcm", and the sound no longer cuts out.