devgianlu / go-librespot

Yet another open source Spotify client, written in Go.
GNU General Public License v3.0
52 stars 7 forks source link

Volume change on devices with big output buffer takes a while #10

Closed devgianlu closed 2 months ago

devgianlu commented 8 months ago

When changing the volume on devices that have a very long output buffer it takes a while for the effect to propagate because we are outputting multiplied samples. Perphaps there's a way to let the audio backend do the volume? If that's not the case we need to drop the buffer on volume change.

blamphos commented 8 months ago

First, thanks for awesome work done with this! I understand the reason for multiplying samples but this does not work for setup that is using hardware mixer or external volume control. Could you think of possibility to add config parameter which can be used to disable multiplying samples? Necessary messaging on volume control changes is there already.

devgianlu commented 8 months ago

First, thanks for awesome work done with this! I understand the reason for multiplying samples but this does not work for setup that is using hardware mixer or external volume control. Could you think of possibility to add config parameter which can be used to disable multiplying samples? Necessary messaging on volume control changes is there already.

@blamphos I have added a external_volume config option to disable internal handling of volume.

devgianlu commented 2 months ago

See #36