Skip to content

Commit cf12d4e

Browse files
committed
Drop default action delay back to 4 seconds
PR #226 had bumped the default from 4s to 6s as a hedge against Android shuffling the BT stream volume late during route setup. On-device verification with AirPods Pro 2 on a Pixel 8 shows the route is stable well before 4s elapse and volume changes land at the intended target with no shuffle. Two seconds shaved off the typical connect-to-stable time for users who never customized actionDelay.
1 parent 6d6b151 commit cf12d4e

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

app/src/main/java/eu/darken/bluemusic/devices/core/ManagedDevice.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,7 @@ data class ManagedDevice(
103103
return null
104104
}
105105

106-
// 6s is the global settle barrier window for devices without a user-configured override.
107-
// Post per-module-delay collapse this is the only "wait for BT route to stabilize"
108-
// window most pipelines pay; previously each module independently waited 4s of its own.
109-
private val defaultActionDelay: Duration = Duration.ofSeconds(6)
106+
private val defaultActionDelay: Duration = Duration.ofSeconds(4)
110107
private val defaultMonitoringDuration: Duration = Duration.ofSeconds(4)
111108
private val defaultAdjustmentDelay: Duration = Duration.ofMillis(250)
112109

app/src/test/java/eu/darken/bluemusic/devices/core/ManagedDeviceTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ class ManagedDeviceTest : BaseTest() {
266266
}
267267

268268
@Test
269-
fun `actionDelay defaults to 6s when null`() {
270-
create().actionDelay shouldBe Duration.ofSeconds(6)
269+
fun `actionDelay defaults to 4s when null`() {
270+
create().actionDelay shouldBe Duration.ofSeconds(4)
271271
}
272272

273273
@Test

0 commit comments

Comments
 (0)