mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
Mute switch for sinks and sources. This is independent of the volume
setting (similar to ALSA). git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@587 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
bd4ae44e9a
commit
04c8926739
11 changed files with 351 additions and 13 deletions
|
|
@ -85,7 +85,8 @@ size_t pa_mix(
|
|||
void *data,
|
||||
size_t length,
|
||||
const pa_sample_spec *spec,
|
||||
const pa_cvolume *volume) {
|
||||
const pa_cvolume *volume,
|
||||
int mute) {
|
||||
|
||||
assert(streams && data && length && spec);
|
||||
|
||||
|
|
@ -100,7 +101,7 @@ size_t pa_mix(
|
|||
if (d >= length)
|
||||
return d;
|
||||
|
||||
if (volume->values[channel] != PA_VOLUME_MUTED) {
|
||||
if (!mute && volume->values[channel] != PA_VOLUME_MUTED) {
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < nstreams; i++) {
|
||||
|
|
@ -152,7 +153,7 @@ size_t pa_mix(
|
|||
if (d >= length)
|
||||
return d;
|
||||
|
||||
if (volume->values[channel] != PA_VOLUME_MUTED) {
|
||||
if (!mute && volume->values[channel] != PA_VOLUME_MUTED) {
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < nstreams; i++) {
|
||||
|
|
@ -204,7 +205,7 @@ size_t pa_mix(
|
|||
if (d >= length)
|
||||
return d;
|
||||
|
||||
if (volume->values[channel] != PA_VOLUME_MUTED) {
|
||||
if (!mute && volume->values[channel] != PA_VOLUME_MUTED) {
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < nstreams; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue