No description
Find a file
Tanu Kaskinen c9c88fb8dc Implement the "volume sharing" feature.
When we have a filter sink that does some processing, currently the
benefits of the flat volume feature are not really available. That's
because if you have a music player that is connected to the filter sink,
the hardware sink doesn't have any idea of the music player's stream
volume.

This problem is solved by this "volume sharing" feature. The volume
sharing feature works so that the filter sinks that want to avoid the
previously described problem declare that they don't want to have
independent volume, but they follow the master sink volume instead.
The PA_SINK_SHARE_VOLUME_WITH_MASTER sink flag is used for that
declaration. Then the volume logic is changed so that the hardware
sink calculates its real volume using also the streams connected to the
filter sink in addition to the streams that are connected directly to
the hardware sink. Basically we're trying to create an illusion that
from volume point of view all streams are connected directly to the
hardware sink.

For that illusion to work, the volumes of the filter sinks and their
virtual streams have to be managed carefully according to a set of
rules:

If a filter sink follows the hardware sink volume, then the filter sink's
 * reference_volume always equals the hw sink's reference_volume
 * real_volume always equals the hw sink's real_volume
 * soft_volume is always 0dB (ie. no soft volume)

If a filter sink doesn't follow the hardware sink volume, then the filter
sink's
 * reference_volume can be whatever (completely independent from the hw sink)
 * real_volume always equals reference_volume
 * soft_volume always equals real_volume (and reference_volume)

If a filter sink follows the hardware sink volume, and the hardware sink
supports flat volume, then the filter sink's virtual stream's
 * volume always equals the hw sink's real_volume
 * reference_ratio is calculated normally from the stream volume and the hw
   sink's reference_volume
 * real_ratio always equals 0dB (follows from the first point)
 * soft_volume always equals volume_factor (follows from the previous point)

If a filter sink follows the hardware sink volume, and the hardware sink
doesn't support flat volume, then the filter sink's virtual stream's
 * volume is always 0dB
 * reference_ratio is always 0dB
 * real_ratio is always 0dB
 * soft_volume always equals volume_factor

If a filter sink doesn't follow the hardware sink volume, then the filter
sink's virtual stream is handled as a regular stream.

Since the volumes of the virtual streams are controlled by a set of rules,
the user is not allowed to change the virtual streams' volumes. It would
probably also make sense to forbid changing the filter sinks' volume, but
that's not strictly necessary, and currently changing a filter sink's volume
changes actually the hardware sink's volume, and from there it propagates to
all filter sinks ("funny" effects are expected when adjusting a single
channel in cases where all sinks don't have the same channel maps).

This patch is based on the work of Marc-André Lureau, who did the
initial implementation for Pulseaudio 0.9.15.
2011-02-26 10:37:20 +00:00
doxygen doxygen: add rtclock.h to documentation 2009-09-11 01:49:39 +02:00
m4 echo-cancel: orc-ify some bits for optimisation 2010-09-23 17:17:03 +05:30
man Further clarify src- and speex- references in pulse-daemon.conf 2010-12-19 15:29:19 +00:00
po i18n: Update POTFILES.* 2010-12-05 16:00:23 +00:00
src Implement the "volume sharing" feature. 2011-02-26 10:37:20 +00:00
vala vala: fix wrapping of port setting calls 2010-02-21 17:48:39 +01:00
.gitignore build-sys: dropo shave support, depend on automake's new silent build support instead 2009-06-22 23:03:43 +02:00
.mailmap add a .mailmap file for git shortlog 2009-02-04 22:41:45 +01:00
autogen.sh remove remaining $ 2008-06-18 22:38:32 +02:00
bootstrap.sh Solaris: bootstrap portability 2009-08-22 00:58:53 +02:00
configure.ac Merge remote-tracking branch 'mkbosmans/mingw32-build' 2011-02-25 09:24:07 +00:00
git-version-gen build-sys: Include the .version file in the distribution tarball 2010-12-05 15:59:13 +00:00
GPL * rename "LICENSE" to "LGPL" 2006-04-20 12:33:00 +00:00
LGPL * rename "LICENSE" to "LGPL" 2006-04-20 12:33:00 +00:00
libpulse-browse.pc.in version: Drop the micro version number 2010-11-28 15:56:20 +00:00
libpulse-mainloop-glib.pc.in version: Drop the micro version number 2010-11-28 15:56:20 +00:00
libpulse-simple.pc.in version: Drop the micro version number 2010-11-28 15:56:20 +00:00
libpulse.pc.in version: Drop the micro version number 2010-11-28 15:56:20 +00:00
LICENSE echo-cancel: Add alternative echo-cancellation implementation 2010-09-07 15:12:12 +05:30
Makefile.am build-sys: Include the .version file in the distribution tarball 2010-12-05 15:59:13 +00:00
orc.mak build: Simplify Orc-related make rules 2011-02-01 11:51:46 +05:30
PROTOCOL Allow read-only or non-existing sink input volume. 2011-02-22 20:12:31 +00:00
pulseaudio-text.svg merge 'lennart' branch back into trunk. 2007-10-28 19:13:50 +00:00
pulseaudio.svg Add PulseAudio logo to tree. 2006-08-28 06:25:41 +00:00
README Add a small README with the new git URLs and stuff 2008-06-18 00:34:14 +02:00
todo remove remaining $ 2008-06-18 22:38:32 +02:00

PULSEAUDIO SOUND SERVER

WEB SITE:
	http://pulseaudio.org/

GIT:
	git://git.0pointer.de/pulseaudio.git

GITWEB:
	http://git.0pointer.de/?p=pulseaudio.git;a=summary

MAILING LIST:
	https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

GIT COMMITS MAILING LIST:
	https://tango.0pointer.de/mailman/listinfo/pulseaudio-commits

TRAC TICKET CHANGES MAILING LIST:
	https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets

IRC:
	#pulseaudio on irc.freenode.org

CIA:
	http://cia.navi.cx/stats/project/polypaudio

FRESHMEAT:
	http://freshmeat.net/projects/pulseaudio/

OHLOH:
	http://www.ohloh.net/projects/4038

AUTHORS:
	Several