librespot/CHANGELOG.md
Roderick van Domburg bb3dd64c87
Implement dithering (#694)
Dithering lowers digital-to-analog conversion ("requantization") error, linearizing output, lowering distortion and replacing it with a constant, fixed noise level, which is more pleasant to the ear than the distortion.

Guidance:

- On S24, S24_3 and S24, the default is to use triangular dithering. Depending on personal preference you may use Gaussian dithering instead; it's not as good objectively, but it may be preferred subjectively if you are looking for a more "analog" sound akin to tape hiss.

- Advanced users who know that they have a DAC without noise shaping have a third option: high-passed dithering, which is like triangular dithering except that it moves dithering noise up in frequency where it is less audible. Note: 99% of DACs are of delta-sigma design with noise shaping, so unless you have a multibit / R2R DAC, or otherwise know what you are doing, this is not for you.

- Don't dither or shape noise on S32 or F32. On F32 it's not supported anyway (there are no integer conversions and so no rounding errors) and on S32 the noise level is so far down that it is simply inaudible even after volume normalisation and control.

New command line option:

--dither DITHER Specify the dither algorithm to use - [none, gpdf,
                tpdf, tpdf_hp]. Defaults to 'tpdf' for formats S16
                S24, S24_3 and 'none' for other formats.

Notes:

This PR also features some opportunistic improvements. Worthy of mention are:
- matching reference Vorbis sample conversion techniques for lower noise
- a cleanup of the convert API
2021-05-26 21:19:17 +02:00

3.2 KiB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning since v0.2.0.

Unreleased

Added

  • [discovery] The crate librespot-discovery for discovery in LAN was created. Its functionality was previously part of librespot-connect.
  • [playback] Add support for dithering with --dither for lower requantization error (breaking)
  • [playback] Add --volume-range option to set dB range and control log and cubic volume control curves
  • [playback] alsamixer: support for querying dB range from Alsa softvol

Changed

  • [audio, playback] Moved VorbisDecoder, VorbisError, AudioPacket, PassthroughDecoder, PassthroughError, AudioError, AudioDecoder and the convert module from librespot-audio to librespot-playback. The underlying crates vorbis, librespot-tremor, lewton and ogg should be used directly. (breaking)
  • [connect, playback] Moved volume controls from librespot-connect to librespot-playback crate
  • [connect] Synchronize player volume with mixer volume on playback
  • [playback] Make cubic volume control available to all mixers with --volume-ctrl cubic
  • [playback] Normalize volumes to [0.0..1.0] instead of [0..65535] for greater precision and performance (breaking)
  • [playback] alsamixer: complete rewrite (breaking)
  • [playback] alsamixer: query card dB range for the log volume control unless specified otherwise
  • [playback] alsamixer: use --device name for --mixer-card unless specified otherwise

Deprecated

  • [connect] The discovery module

Removed

  • [connect] Removed no-op mixer started/stopped logic (breaking)
  • [playback] alsamixer: removed --mixer-linear-volume option; use --volume-ctrl linear instead

Fixed

  • [connect] Fix step size on volume up/down events
  • [playback] Incorrect PlayerConfig::default().normalisation_threshold caused distortion when using dynamic volume normalisation downstream in librespot-connect was deprecated in favor of the librespot-discovery crate.
  • [playback] Fix log and cubic volume controls to be mute at zero volume
  • [playback] alsamixer: make cubic consistent between cards that report minimum volume as mute, and cards that report some dB value
  • [playback] alsamixer: make --volume-ctrl {linear|log} work as expected

0.2.0 - 2021-05-04

0.1.6 - 2021-02-22

0.1.5 - 2021-02-21

0.1.3 - 2020-07-29

0.1.2 - 2020-07-22

0.1.1 - 2020-01-30

0.1.0 - 2019-11-06