Skip to content

Conversation

@marcelveldt
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 25, 2025 15:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes several edge cases for streaming with crossfade enabled, primarily by renaming DEFAULT_PCM_FORMAT to INTERNAL_PCM_FORMAT and adding better handling for crossfade scenarios with different sample rates and PCM formats.

Key changes:

  • Renamed DEFAULT_PCM_FORMAT to INTERNAL_PCM_FORMAT across the codebase to better reflect its usage as an internal format
  • Added support for crossfading between tracks with different sample rates through new configuration options
  • Improved buffer and stream handling to prevent audio glitches during crossfades with mismatched PCM formats

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
music_assistant/constants.py Renamed DEFAULT_PCM_FORMAT to INTERNAL_PCM_FORMAT and added new config entry for crossfade with different sample rates
music_assistant/providers/universal_group/constants.py Updated references from DEFAULT_PCM_FORMAT to INTERNAL_PCM_FORMAT
music_assistant/providers/squeezelite/player.py Updated references and added support for gapless playback with different sample rates
music_assistant/providers/snapcast/player.py Updated references from DEFAULT_PCM_FORMAT to INTERNAL_PCM_FORMAT
music_assistant/providers/builtin_player/player.py Updated references from DEFAULT_PCM_FORMAT to INTERNAL_PCM_FORMAT
music_assistant/providers/airplay/constants.py Updated references from DEFAULT_PCM_FORMAT to INTERNAL_PCM_FORMAT
music_assistant/helpers/audio.py Renamed function, improved buffering logic for PCM format mismatches, and simplified resampling function
music_assistant/controllers/streams.py Added crossfade configuration options and improved handling of crossfade edge cases with different PCM formats and sample rates

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@marcelveldt marcelveldt merged commit d6669fc into dev Oct 25, 2025
10 of 12 checks passed
@marcelveldt marcelveldt deleted the stream-fixes branch October 25, 2025 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants