Skip to content

Conversation

@KernelFreeze
Copy link
Contributor

I have added the initial code path to support decoding FLAC bitstreams using the existing tooling around the symphonia crate. This needs further testing, as I don't yet have access to FLAC capabilities from the official client. Also, I have some questions regarding the required implementation: should I add a passthrough_decoder.rs code path too?
Let me know if you need any changes to be made.

Enable native playback of FLAC (lossless) audio by enabling symphonia's flac feature, and integrating FlacReader/FlacDecoder into the Symphonia decoder.
@KernelFreeze
Copy link
Contributor Author

Also, this should be needed to fully implement #1583.

@Laxii-null

This comment was marked as abuse.

@roderickvd
Copy link
Member

Looks good to me.

@KernelFreeze KernelFreeze marked this pull request as ready for review September 21, 2025 21:36
@urknall
Copy link

urknall commented Sep 22, 2025

I have added the initial code path to support decoding FLAC bitstreams using the existing tooling around the symphonia crate. This needs further testing, as I don't yet have access to FLAC capabilities from the official client. Also, I have some questions regarding the required implementation: should I add a passthrough_decoder.rs code path too? Let me know if you need any changes to be made.

passthrough decoder support would be nice, some projects based on librespot use it for other paths also.
i would prefer zero decode/re-encode and forward the flac directly to the player

@KernelFreeze
Copy link
Contributor Author

I think I can add passthrough_decoder.rs support in another PR, so as not to increase the scope of this PR too much.

@Laxii-null
Copy link

I think I can add passthrough_decoder.rs support in another PR, so as not to increase the scope of this PR too much.

I think just doing a commit in the same PR would be good, you know, just to keep things intact

@roderickvd
Copy link
Member

Both are fine for me, whatever is easiest.

@KernelFreeze
Copy link
Contributor Author

I will start working on the passthrough decoder. In the meantime, it would be a great help if someone with access to the FLAC capabilities of the official client could test whether we need anything else or if it already works as is. My main concern is whether there is a need for a new decryption module.

@Laxii-null
Copy link

I will start working on the passthrough decoder. In the meantime, it would be a great help if someone with access to the FLAC capabilities of the official client could test whether we need anything else or if it already works as is. My main concern is whether there is a need for a new decryption module.

Some people in the original librespot issue gave some details about the API implemention recently that may be helpful to you

"mp3",
"ogg",
"vorbis",
"flac"
Copy link
Member

Choose a reason for hiding this comment

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

Although not useful for Spotify Lossless until we find a way to get the decryption keys, it is useful for local file support in #1595 so I'm gonna merge it anyway.

@roderickvd roderickvd merged commit 61f517b into librespot-org:dev Oct 6, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants