[GH-ISSUE #15] Volume normalization #8

Closed
opened 2026-02-28 14:24:37 +03:00 by kerem · 4 comments
Owner

Originally created by @blamphos on GitHub (Nov 16, 2023).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/15

Question to developers, is there volume normalization implemented in go-librespot or is it supported at all? I've noticed that go-librespot produces a bit lower SPL (several dB's) compared to librespot (Rust) implementation which does have a parameter to set the normalization. I've been using external volume control in both cases where ALSA does not use any softvol plugin either.

Originally created by @blamphos on GitHub (Nov 16, 2023). Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/15 Question to developers, is there volume normalization implemented in go-librespot or is it supported at all? I've noticed that go-librespot produces a bit lower SPL (several dB's) compared to librespot (Rust) implementation which does have a parameter to set the normalization. I've been using external volume control in both cases where ALSA does not use any softvol plugin either.
kerem closed this issue 2026-02-28 14:24:37 +03:00
Author
Owner

@devgianlu commented on GitHub (Nov 16, 2023):

The normalisation is implemented here:
github.com/devgianlu/go-librespot@4d530d350e/audio/metadata.go (L184-L192)

I have just pushed a change to allow specifying a normalisation_pregain configuration option: github.com/devgianlu/go-librespot@ba47d173f8

<!-- gh-comment-id:1814899037 --> @devgianlu commented on GitHub (Nov 16, 2023): The normalisation is implemented here: https://github.com/devgianlu/go-librespot/blob/4d530d350ed969a74fe9be5e0849bda7ab2e6d7b/audio/metadata.go#L184-L192 I have just pushed a change to allow specifying a `normalisation_pregain` configuration option: https://github.com/devgianlu/go-librespot/commit/ba47d173f86b77a0d83241daf87757ee47f30f6f
Author
Owner

@blamphos commented on GitHub (Nov 17, 2023):

Did some testing with pulling the latest commits. For some reason I can't change normalisation_pregain from config file. Normalisation factor changes only if the default value of pregain (1.0) is being modified in main.go.

<!-- gh-comment-id:1816889491 --> @blamphos commented on GitHub (Nov 17, 2023): Did some testing with pulling the latest commits. For some reason I can't change normalisation_pregain from config file. Normalisation factor changes only if the default value of pregain (1.0) is being modified in main.go.
Author
Owner

@devgianlu commented on GitHub (Nov 17, 2023):

Oh yeah my bad, should be fixed now.

<!-- gh-comment-id:1816909783 --> @devgianlu commented on GitHub (Nov 17, 2023): Oh yeah my bad, should be fixed now.
Author
Owner

@blamphos commented on GitHub (Nov 17, 2023):

Thank you! Works just as expected now.

<!-- gh-comment-id:1817040821 --> @blamphos commented on GitHub (Nov 17, 2023): Thank you! Works just as expected now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-librespot#8
No description provided.