Skip to content

Feature/configurable crossfade duration#427

Merged
theovilardo merged 15 commits intomasterfrom
feature/configurable-crossfade-duration
Dec 4, 2025
Merged

Feature/configurable crossfade duration#427
theovilardo merged 15 commits intomasterfrom
feature/configurable-crossfade-duration

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

No description provided.

theovilardo and others added 15 commits December 2, 2025 13:40
Make the curve cards in the EditTransition screen have equal width.
Add the EditTransition screen to the list of screens where the navigation bar should be hidden.
- Updated `DualPlayerEngine`:
  - Added `setPauseAtEndOfMediaItems(Boolean)` to manually control the master player's auto-advance behavior.
  - Configured `playerB` (auxiliary player) to NOT handle audio focus. This prevents it from pausing the master `playerA` when it starts playing, which was killing the crossfade effect.

- Updated `TransitionController`:
  - When scheduling a valid transition, now sets `engine.setPauseAtEndOfMediaItems(true)`. This ensures `playerA` pauses at the end of the track instead of jumping to the next one, allowing the transition logic to fully control the handoff.
  - Resets `pauseAtEndOfMediaItems` to `false` when the transition is cancelled, skipped, or when a new media item starts, preserving normal playback behavior outside of transitions.
- Updated `TransitionController` to trigger the transition just before the current song ends (500ms buffer) instead of overlapping by the full duration, effectively implementing a gapless start.
- Modified `DualPlayerEngine` to keep the old player at full volume until it finishes naturally, while fading in the new player from 0 volume. This matches the user's revised request for "Finish Completely + Fade In Next".
- Included previous fixes: Manual Audio Focus management and Fresh Player strategy to resolve OEM device stability issues.
Added a user preference for crossfade duration (range: 2s to 12s, default: 6s) and a corresponding slider in the Settings screen. The new duration setting is integrated into the global transition settings flow, allowing the playback engine to dynamically adjust the crossfade length without requiring code changes.
This commit introduces a complete visual overhaul of the "Edit Transition" screen, adopting modern Material 3 design principles for a cleaner and more intuitive user experience.

Key changes include:
- Replaced the static `TopAppBar` with a collapsible `LargeTopAppBar`.
- Replaced the "Save" `TextButton` with a `ExtendedFloatingActionButton` for better visibility and access.
- Redesigned the "Active Status" card with clearer typography and layout.
- Implemented a new expressive morphing toggle for selecting the transition mode (None/Crossfade).
- Revamped the "Transition Duration" section with an improved crossfade visualizer.
- Redesigned the "Volume Curves" selection cards for better readability and interaction.
- Added animations for showing/hiding dependent settings when crossfade is toggled.
- Updated icons, shapes, and colors to align with the Material 3 design system.
@theovilardo theovilardo merged commit 14e3f98 into master Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant