Ticket #611 (new enhancement)

Opened 3 years ago

Last modified 14 months ago

Flat Volume briefly increases volume of existing streams

Reported by: sladi Owned by: lennart
Milestone: Component: daemon
Keywords: Cc: sveina@…, coling, zdzichu@…, hadess, oren@…

Description

When starting a stream which increases the device volume this increases the existing streams for a moment and then Flat Volume adjust those streams.

Better would be to do the adjustment of the streams before the device level change since a brief moment of quieter sound is better than a brief high output.

Change History

Changed 2 years ago by Baughn

  • cc sveina@… added

The inverse effect occurs when a quiet stream stops playing: The device volume is increased a moment too soon, before the stream buffer is fully drained, which results in a moment of potentially ear-damaging noise.

The (apparent) ideal solution would be to have the volume adjustments inline with the samples, to be automatically processed by the sound card. I very much doubt that this is possible.

One compromise that would still be an improvement is to do the volume adjustment after the stream ends; however, this is not the best possible solution. In general, sudden volume adjustments should never be made while a stream is playing, due to possible issues with creating harmonics that could even, theoretically, damage equipment. The latter is admittedly very unlikely in practice.

A better solution would seem to be to gradually adjust the volume over a period of time; reducing the device volume while increasing the stream volume, and vice versa. While there's still a possibility of timing errors here, due to the low speed of the changes, it would hopefully not be noticable. Pulseaudio could still use an instant change before/after the stream plays in the cases where no other streams are simultaneously playing.

Moral: In general, don't do sudden changes of the hardware volume while said hardware is in use, or if it was in use a moment ago; you may be mistaken about buffering.

Changed 2 years ago by coling

  • cc coling added

Changed 2 years ago by zdzichu

  • cc zdzichu@… added

Changed 2 years ago by hadess

  • cc hadess added

Changed 14 months ago by oren_held

  • cc oren@… added

Changed 14 months ago by coling

FWIW, there have been various patches in Git Master contributed by Nokia that add a kind of buffer zone regarding the volume changes to minimise this problem. Just thought I'd say as there are a few CC's added now and perhaps they want to take git master for a spin.

There are instructions on how to compile git master here: http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/

Note: See TracTickets for help on using tickets.