-
Notifications
You must be signed in to change notification settings - Fork 346
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Volume is set to 100% at start op play of mp3 file when replay_gain_handler is set to mixer #1785
Comments
No, this is wrong. A mp3 file should not play at the same volume level as the previous song - this would imply that a mp3 song will play at different volume levels, depending on which song precedes it. If you rely solely on the volume adjustments in the MP3 header, that's fine - but from MPD's perspective, that's a song without ReplayGain information, and that's correct. Maybe what you need to do is configure a |
Dear Max, Thanks for your answer. However, your answer still does not explain why the MPD volume level jumps from its preset level to 100% when a mp3 file is played. MPD seems to be forgetting its reference volume level. It appears that when replay_gain_handler is set to mixer and replay_gain is enabled MPD assumes that volume control is disabled (or set at 100%). |
Bug report
Describe the bug
When a mp3 file is played the MPD volume is set to 100% regardless of its previous level when 'replay_gain_handler' is set to 'mixer'. The volume remains at 100% until a non-mp3 file containing replay gain flags is played. The volume is then adjusted (incorrectly, see Bug report #1778).
Playing webradios has the same effect.
The effects could costly or even dangerous by damaging your HiFi kit or your ears.
When 'replay_gain_handler' is omitted it works correctly.
Expected Behavior
A mp3 file should be played at the previously set MPD volume. Replay gain for mp3's is implemented by setting the volume directly in the metadata, as such there are no special replay gain flags for mp3. The volume should not be changed.
Actual Behavior
MPD: open socket
OK
MPD Protocol: setvol 50
OK
MPD Protocol: currentsong
file: USB/MUSICBOX/Annie Lennox/Diva/01 Why.mp3
Last-Modified: 2015-01-01T22:06:12Z
Format: 44100:24:2
Artist: Annie Lennox
AlbumArtist: Annie Lennox
Title: Why
Album: Diva
Track: 1
Date: 1992
Genre: Rock
Composer: Annie Lennox
Label: RCA
Time: 293
duration: 293.479
Pos: 101
Id: 105
OK
MPD Protocol: status
volume: 50
repeat: 0
random: 0
single: 0
consume: 0
partition: default
playlist: 59
playlistlength: 105
mixrampdb: 0
state: stop
xfade: 2
song: 101
songid: 105
nextsong: 102
nextsongid: 106
OK
Bash: amixer -c 1 sget Digital
Simple mixer control 'Digital',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 207
Mono:
Front Left: Playback 171 [83%] [-18.00dB] [on]
Front Right: Playback 171 [83%] [-18.00dB] [on]
MPD Protocol: play
OK
MPD Protocol: currentsong
file: USB/MUSICBOX/Annie Lennox/Diva/01 Why.mp3
Last-Modified: 2015-01-01T22:06:12Z
Format: 44100:24:2
Artist: Annie Lennox
AlbumArtist: Annie Lennox
Title: Why
Album: Diva
Track: 1
Date: 1992
Genre: Rock
Composer: Annie Lennox
Label: RCA
Time: 293
duration: 293.479
Pos: 101
Id: 105
OK
MPD Protocol: status
volume: 100
repeat: 0
random: 0
single: 0
consume: 0
partition: default
playlist: 59
playlistlength: 105
mixrampdb: 0
state: play
xfade: 2
song: 101
songid: 105
time: 3:293
elapsed: 2.783
bitrate: 320
duration: 293.479
audio: 44100:24:2
nextsong: 102
nextsongid: 106
OK
Bash: amixer -c 1 sget Digital
Simple mixer control 'Digital',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 207
Mono:
Front Left: Playback 207 [100%] [0.00dB] [on]
Front Right: Playback 207 [100%] [0.00dB] [on]
MPD: close socket
OK
Version
uname -a
Linux pi4 6.1.13-1-rpi-ARCH #1 SMP PREEMPT Thu Feb 23 12:17:10 MST 2023 aarch64 GNU/Linux
mpd -V
Music Player Daemon 0.23.12 (0.23.12)
Configuration
...
replaygain "track"
...
audio_output {
name "snd_rpi_hifiberry_dacplus"
type "alsa"
device "hw:1,0"
mixer_control "Digital"
mixer_type "hardware"
mixer_device "hw:1"
replay_gain_handler "mixer"
auto_resample "no"
auto_format "no"
enabled "yes"
}
Log
No logs attached. The problem is consistent and reproducible.
The text was updated successfully, but these errors were encountered: