diff --git a/android/app/src/main/java/tv/orbit/classic/Idents.kt b/android/app/src/main/java/tv/orbit/classic/Idents.kt index 46bcf78b..5d57c787 100644 --- a/android/app/src/main/java/tv/orbit/classic/Idents.kt +++ b/android/app/src/main/java/tv/orbit/classic/Idents.kt @@ -42,6 +42,12 @@ private val IdentVideos = mapOf(108 to R.raw.ident_108, 109 to R.raw.ident_109, * Every channel's ident has a sound of its own (Paul, 7 November 2026; design/channels/sound), played with Ident sound on, at * most once every 20 minutes a channel, so a run of short programmes doesn't repeat it every few minutes. Tots keeps its jingle. */ +/** + * Every ident's sound is delivered to one standard (design/channels/sound/deliver.py: -23 LUFS, -2 dBTP, its loudest moment + * at most 6 LU above), so normal plays it as delivered, level with programmes; quiet plays it about 8 dB under them. + */ +internal fun identVolume(quiet: Boolean) = if (quiet) .4f else 1f + internal object IdentStings { private val last = HashMap() const val GAP_MS = 20 * 60_000L @@ -113,9 +119,11 @@ internal fun IdentOverlay(session: EmbySampleSession, channel: SampleChannel, ne val fade = remember { Animatable(0f) } LaunchedEffect(Unit) { fade.animateTo(1f, tween(mood?.fadeMs ?: 400)) } Box(Modifier.fillMaxSize().graphicsLayer { alpha = fade.value }.background(NightNavy)) { - val video = if (cameo != null) null else block?.video ?: identVideo(channel.number, next.startMs) + // Reduce motion: the still card (the logo over the next show's picture) instead of a moving ident, so no sting either + // (Paul, 7 November 2026: sensory settings shape the ident, sound included). Tots keeps its still goodbye. + val video = if (cameo != null || (settings.reduceMotion && mood == null)) null else block?.video ?: identVideo(channel.number, next.startMs) // With idents off, Tots still says goodbye with a picture that doesn't move. - if (mood != null && !settings.idents) Image(cachedPainter(mood.still), null, Modifier.fillMaxSize()) + if (mood != null && (!settings.idents || settings.reduceMotion)) Image(cachedPainter(mood.still), null, Modifier.fillMaxSize()) // Every third Tots changeover, a drawn bumper with the cast instead of the filmed ident. else if (mood != null && !early && block == null && totsBumper(next.startMs)) TotsBumper(mood) else if (video != null && !(early && !settings.idents)) { @@ -131,8 +139,8 @@ internal fun IdentOverlay(session: EmbySampleSession, channel: SampleChannel, ne } seekTo(startedLateMs.coerceIn(0, identMs)) volume = if (block != null) (if (settings.blockIdentSound) 1f else 0f) - else if (mood != null && settings.identSound && TotsJingle.take(mood, System.currentTimeMillis())) 1f - else if (mood == null && settings.identSound && IdentStings.take(channel.number, System.currentTimeMillis())) 1f else 0f + else if (mood != null && settings.identSound && !settings.reduceMotion && TotsJingle.take(mood, System.currentTimeMillis())) identVolume(settings.identSoundQuiet) + else if (mood == null && settings.identSound && IdentStings.take(channel.number, System.currentTimeMillis())) identVolume(settings.identSoundQuiet) else 0f prepare(); playWhenReady = true } } diff --git a/android/app/src/main/java/tv/orbit/classic/Settings.kt b/android/app/src/main/java/tv/orbit/classic/Settings.kt index 13c7857e..fca366ae 100644 --- a/android/app/src/main/java/tv/orbit/classic/Settings.kt +++ b/android/app/src/main/java/tv/orbit/classic/Settings.kt @@ -94,6 +94,10 @@ internal class OrbitSettings(context: Context) { var identSound: Boolean get() = saved.getBoolean("ident_sound", true) set(value) { saved.edit().putBoolean("ident_sound", value).apply() } + /** Ident sound played softly, for quiet evenings (Paul, 7 November 2026: separate normal and quiet playback). */ + var identSoundQuiet: Boolean + get() = saved.getBoolean("ident_sound_quiet", false) + set(value) { saved.edit().putBoolean("ident_sound_quiet", value).apply() } var driveInIntro: Boolean get() = saved.getBoolean("drive_in_intro", true) set(value) { saved.edit().putBoolean("drive_in_intro", value).apply() } @@ -260,6 +264,7 @@ private fun ViewingDetail(firstSwitch: FocusRequester, modifier: Modifier, top: var channelLogo by remember { mutableStateOf(settings.channelLogo) } var idents by remember { mutableStateOf(settings.idents) } var identSound by remember { mutableStateOf(settings.identSound) } + var identSoundQuiet by remember { mutableStateOf(settings.identSoundQuiet) } var driveInIntro by remember { mutableStateOf(settings.driveInIntro) } var reduceMotion by remember { mutableStateOf(settings.reduceMotion) } var squeezeBack by remember { mutableStateOf(settings.squeezeBack) } @@ -284,6 +289,9 @@ private fun ViewingDetail(firstSwitch: FocusRequester, modifier: Modifier, top: SettingLine("Ident sound", "Each channel's ident plays its own short sound, at most every 20 minutes a channel; Tots plays its jingle.") { OnOff(identSound, Modifier, onClick = { identSound = !identSound; settings.identSound = identSound }) } + SettingLine("Quiet ident sound", "Play the ident sounds softly, well under the programmes. Reduce motion shows idents as a still card, with no sound.") { + OnOff(identSoundQuiet, Modifier, enabled = identSound, onClick = { identSoundQuiet = !identSoundQuiet; settings.identSoundQuiet = identSoundQuiet }) + } SettingLine("Special idents", "Give named blocks and events their own ident as they begin, such as Riot Laughs or PPV Sunday. Off uses each channel's usual ident.") { OnOff(specialIdents, Modifier, onClick = { specialIdents = !specialIdents; settings.specialIdents = specialIdents }) } diff --git a/android/app/src/main/res/raw/ident_101.mp4 b/android/app/src/main/res/raw/ident_101.mp4 index d6bee9a7..6cc1471b 100644 Binary files a/android/app/src/main/res/raw/ident_101.mp4 and b/android/app/src/main/res/raw/ident_101.mp4 differ diff --git a/android/app/src/main/res/raw/ident_102.mp4 b/android/app/src/main/res/raw/ident_102.mp4 index 92a813d3..6a133072 100644 Binary files a/android/app/src/main/res/raw/ident_102.mp4 and b/android/app/src/main/res/raw/ident_102.mp4 differ diff --git a/android/app/src/main/res/raw/ident_103.mp4 b/android/app/src/main/res/raw/ident_103.mp4 index 4da5e6fa..515429d7 100644 Binary files a/android/app/src/main/res/raw/ident_103.mp4 and b/android/app/src/main/res/raw/ident_103.mp4 differ diff --git a/android/app/src/main/res/raw/ident_104.mp4 b/android/app/src/main/res/raw/ident_104.mp4 index 2ed9c7b5..5db733b9 100644 Binary files a/android/app/src/main/res/raw/ident_104.mp4 and b/android/app/src/main/res/raw/ident_104.mp4 differ diff --git a/android/app/src/main/res/raw/ident_105.mp4 b/android/app/src/main/res/raw/ident_105.mp4 index 3ec506a9..f8ed09a7 100644 Binary files a/android/app/src/main/res/raw/ident_105.mp4 and b/android/app/src/main/res/raw/ident_105.mp4 differ diff --git a/android/app/src/main/res/raw/ident_106.mp4 b/android/app/src/main/res/raw/ident_106.mp4 index 8a3f53bd..eb8d6ddd 100644 Binary files a/android/app/src/main/res/raw/ident_106.mp4 and b/android/app/src/main/res/raw/ident_106.mp4 differ diff --git a/android/app/src/main/res/raw/ident_107.mp4 b/android/app/src/main/res/raw/ident_107.mp4 index f86a1bea..b3bf578a 100644 Binary files a/android/app/src/main/res/raw/ident_107.mp4 and b/android/app/src/main/res/raw/ident_107.mp4 differ diff --git a/android/app/src/main/res/raw/ident_108.mp4 b/android/app/src/main/res/raw/ident_108.mp4 index 08390055..68fa7ddf 100644 Binary files a/android/app/src/main/res/raw/ident_108.mp4 and b/android/app/src/main/res/raw/ident_108.mp4 differ diff --git a/android/app/src/main/res/raw/ident_109.mp4 b/android/app/src/main/res/raw/ident_109.mp4 index 3f9482ae..bc98f0b2 100644 Binary files a/android/app/src/main/res/raw/ident_109.mp4 and b/android/app/src/main/res/raw/ident_109.mp4 differ diff --git a/android/app/src/main/res/raw/ident_110.mp4 b/android/app/src/main/res/raw/ident_110.mp4 index 7a9d5903..03c3b64a 100644 Binary files a/android/app/src/main/res/raw/ident_110.mp4 and b/android/app/src/main/res/raw/ident_110.mp4 differ diff --git a/android/app/src/main/res/raw/ident_201.mp4 b/android/app/src/main/res/raw/ident_201.mp4 index 3e7155ff..dfabae37 100644 Binary files a/android/app/src/main/res/raw/ident_201.mp4 and b/android/app/src/main/res/raw/ident_201.mp4 differ diff --git a/android/app/src/main/res/raw/ident_202.mp4 b/android/app/src/main/res/raw/ident_202.mp4 index df0f3e2c..2fe57162 100644 Binary files a/android/app/src/main/res/raw/ident_202.mp4 and b/android/app/src/main/res/raw/ident_202.mp4 differ diff --git a/android/app/src/main/res/raw/ident_203.mp4 b/android/app/src/main/res/raw/ident_203.mp4 index 0a42008d..208b02b9 100644 Binary files a/android/app/src/main/res/raw/ident_203.mp4 and b/android/app/src/main/res/raw/ident_203.mp4 differ diff --git a/android/app/src/main/res/raw/ident_204.mp4 b/android/app/src/main/res/raw/ident_204.mp4 index f8a4cae1..a3a2b55b 100644 Binary files a/android/app/src/main/res/raw/ident_204.mp4 and b/android/app/src/main/res/raw/ident_204.mp4 differ diff --git a/android/app/src/main/res/raw/ident_205.mp4 b/android/app/src/main/res/raw/ident_205.mp4 index aea0e322..44bb1f0e 100644 Binary files a/android/app/src/main/res/raw/ident_205.mp4 and b/android/app/src/main/res/raw/ident_205.mp4 differ diff --git a/android/app/src/main/res/raw/ident_206.mp4 b/android/app/src/main/res/raw/ident_206.mp4 index e8c6f78b..2c592e19 100644 Binary files a/android/app/src/main/res/raw/ident_206.mp4 and b/android/app/src/main/res/raw/ident_206.mp4 differ diff --git a/android/app/src/main/res/raw/ident_301.mp4 b/android/app/src/main/res/raw/ident_301.mp4 index 2c3db37a..92d180a3 100644 Binary files a/android/app/src/main/res/raw/ident_301.mp4 and b/android/app/src/main/res/raw/ident_301.mp4 differ diff --git a/android/app/src/main/res/raw/ident_302.mp4 b/android/app/src/main/res/raw/ident_302.mp4 index 210ab63f..e83075e5 100644 Binary files a/android/app/src/main/res/raw/ident_302.mp4 and b/android/app/src/main/res/raw/ident_302.mp4 differ diff --git a/android/app/src/main/res/raw/ident_303.mp4 b/android/app/src/main/res/raw/ident_303.mp4 index 72d44448..35082144 100644 Binary files a/android/app/src/main/res/raw/ident_303.mp4 and b/android/app/src/main/res/raw/ident_303.mp4 differ diff --git a/android/app/src/main/res/raw/ident_304.mp4 b/android/app/src/main/res/raw/ident_304.mp4 index dd4e3ed2..66b0232f 100644 Binary files a/android/app/src/main/res/raw/ident_304.mp4 and b/android/app/src/main/res/raw/ident_304.mp4 differ diff --git a/android/app/src/main/res/raw/ident_305.mp4 b/android/app/src/main/res/raw/ident_305.mp4 index 6b81fa3b..9f7b688c 100644 Binary files a/android/app/src/main/res/raw/ident_305.mp4 and b/android/app/src/main/res/raw/ident_305.mp4 differ diff --git a/android/app/src/main/res/raw/ident_306.mp4 b/android/app/src/main/res/raw/ident_306.mp4 index 69e13eb1..9699e16b 100644 Binary files a/android/app/src/main/res/raw/ident_306.mp4 and b/android/app/src/main/res/raw/ident_306.mp4 differ diff --git a/android/app/src/main/res/raw/ident_307.mp4 b/android/app/src/main/res/raw/ident_307.mp4 index 85bfdd70..6a9b1def 100644 Binary files a/android/app/src/main/res/raw/ident_307.mp4 and b/android/app/src/main/res/raw/ident_307.mp4 differ diff --git a/android/app/src/main/res/raw/ident_308.mp4 b/android/app/src/main/res/raw/ident_308.mp4 index 42bd41f0..3b7e29f4 100644 Binary files a/android/app/src/main/res/raw/ident_308.mp4 and b/android/app/src/main/res/raw/ident_308.mp4 differ diff --git a/android/app/src/main/res/raw/ident_309.mp4 b/android/app/src/main/res/raw/ident_309.mp4 index c17324b1..859bc6d8 100644 Binary files a/android/app/src/main/res/raw/ident_309.mp4 and b/android/app/src/main/res/raw/ident_309.mp4 differ diff --git a/android/app/src/main/res/raw/ident_310.mp4 b/android/app/src/main/res/raw/ident_310.mp4 index 58d14dc8..6232aa2c 100644 Binary files a/android/app/src/main/res/raw/ident_310.mp4 and b/android/app/src/main/res/raw/ident_310.mp4 differ diff --git a/android/app/src/main/res/raw/ident_401.mp4 b/android/app/src/main/res/raw/ident_401.mp4 index 8747b830..4539c279 100644 Binary files a/android/app/src/main/res/raw/ident_401.mp4 and b/android/app/src/main/res/raw/ident_401.mp4 differ diff --git a/android/app/src/main/res/raw/ident_601.mp4 b/android/app/src/main/res/raw/ident_601.mp4 index e5319d99..4b375ced 100644 Binary files a/android/app/src/main/res/raw/ident_601.mp4 and b/android/app/src/main/res/raw/ident_601.mp4 differ diff --git a/android/app/src/main/res/raw/ident_602.mp4 b/android/app/src/main/res/raw/ident_602.mp4 index 4aa48fcb..f483e15b 100644 Binary files a/android/app/src/main/res/raw/ident_602.mp4 and b/android/app/src/main/res/raw/ident_602.mp4 differ diff --git a/android/app/src/main/res/raw/ident_603.mp4 b/android/app/src/main/res/raw/ident_603.mp4 index 9b3fcb46..6323db28 100644 Binary files a/android/app/src/main/res/raw/ident_603.mp4 and b/android/app/src/main/res/raw/ident_603.mp4 differ diff --git a/android/app/src/main/res/raw/ident_604.mp4 b/android/app/src/main/res/raw/ident_604.mp4 index 388df37f..ad2d8979 100644 Binary files a/android/app/src/main/res/raw/ident_604.mp4 and b/android/app/src/main/res/raw/ident_604.mp4 differ diff --git a/android/app/src/main/res/raw/ident_605.mp4 b/android/app/src/main/res/raw/ident_605.mp4 index b8dcd2d5..c63a4f00 100644 Binary files a/android/app/src/main/res/raw/ident_605.mp4 and b/android/app/src/main/res/raw/ident_605.mp4 differ diff --git a/android/app/src/main/res/raw/ident_611.mp4 b/android/app/src/main/res/raw/ident_611.mp4 index 9ba012be..d8d8859d 100644 Binary files a/android/app/src/main/res/raw/ident_611.mp4 and b/android/app/src/main/res/raw/ident_611.mp4 differ diff --git a/android/app/src/main/res/raw/ident_612.mp4 b/android/app/src/main/res/raw/ident_612.mp4 index c33a42bb..d928193c 100644 Binary files a/android/app/src/main/res/raw/ident_612.mp4 and b/android/app/src/main/res/raw/ident_612.mp4 differ diff --git a/android/app/src/main/res/raw/ident_613.mp4 b/android/app/src/main/res/raw/ident_613.mp4 index 1fbd4542..207f5f42 100644 Binary files a/android/app/src/main/res/raw/ident_613.mp4 and b/android/app/src/main/res/raw/ident_613.mp4 differ diff --git a/android/app/src/main/res/raw/ident_614_evening.mp4 b/android/app/src/main/res/raw/ident_614_evening.mp4 index 4c453416..d1e50279 100644 Binary files a/android/app/src/main/res/raw/ident_614_evening.mp4 and b/android/app/src/main/res/raw/ident_614_evening.mp4 differ diff --git a/android/app/src/main/res/raw/ident_614_morning.mp4 b/android/app/src/main/res/raw/ident_614_morning.mp4 index 2a76f50e..e71f98a9 100644 Binary files a/android/app/src/main/res/raw/ident_614_morning.mp4 and b/android/app/src/main/res/raw/ident_614_morning.mp4 differ diff --git a/android/app/src/main/res/raw/ident_614_morning_roll.mp4 b/android/app/src/main/res/raw/ident_614_morning_roll.mp4 index 38be5ba5..fc576258 100644 Binary files a/android/app/src/main/res/raw/ident_614_morning_roll.mp4 and b/android/app/src/main/res/raw/ident_614_morning_roll.mp4 differ diff --git a/android/app/src/main/res/raw/ident_mistletoe.mp4 b/android/app/src/main/res/raw/ident_mistletoe.mp4 index 8983476b..25a0dcef 100644 Binary files a/android/app/src/main/res/raw/ident_mistletoe.mp4 and b/android/app/src/main/res/raw/ident_mistletoe.mp4 differ diff --git a/android/app/src/main/res/raw/ident_sakura.mp4 b/android/app/src/main/res/raw/ident_sakura.mp4 index 97b27fbf..77c850c9 100644 Binary files a/android/app/src/main/res/raw/ident_sakura.mp4 and b/android/app/src/main/res/raw/ident_sakura.mp4 differ diff --git a/android/app/src/test/java/tv/orbit/classic/CollectionRefreshTest.kt b/android/app/src/test/java/tv/orbit/classic/CollectionRefreshTest.kt index 5c079a2a..d056c89f 100644 --- a/android/app/src/test/java/tv/orbit/classic/CollectionRefreshTest.kt +++ b/android/app/src/test/java/tv/orbit/classic/CollectionRefreshTest.kt @@ -31,4 +31,9 @@ class CollectionRefreshTest { assertTrue(IdentStings.take(9001, t)); assertFalse(IdentStings.take(9001, t + 60_000)); assertTrue(IdentStings.take(9002, t + 60_000)) assertTrue(IdentStings.take(9001, t + IdentStings.GAP_MS)) } + + // One delivery standard for every ident (7 November 2026): normal plays it as delivered, level with programmes; quiet sits under. + @Test fun quietIdentSoundSitsWellUnderNormal() { + assertEquals(1f, identVolume(false)); assertTrue(identVolume(true) in .3f..(.5f)) + } }