diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-04-08 03:49:16 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-04-08 03:49:16 +0200 |
commit | c32c6c833e328610729ec034801ea110f5178cc1 (patch) | |
tree | 87b7a442fc3fc611f6ebc36eafa8dd01fb9319d4 /src/pulsecore/sink-input.h | |
parent | 14e89d4ecdded1d201ac3a382d265f117988c369 (diff) |
introduce relative_volume field in sink_input and make use of it on sink flat volume change
Diffstat (limited to 'src/pulsecore/sink-input.h')
-rw-r--r-- | src/pulsecore/sink-input.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h index 6ecb5d73..96ad2baf 100644 --- a/src/pulsecore/sink-input.h +++ b/src/pulsecore/sink-input.h @@ -91,7 +91,10 @@ struct pa_sink_input { pa_sink_input *sync_prev, *sync_next; - pa_cvolume virtual_volume, soft_volume, volume_factor; + pa_cvolume virtual_volume; /* The volume clients are informed about */ + pa_cvolume volume_factor; /* An internally used volume factor that can be used by modules to apply effects and suchlike without having that visible to the outside */ + double relative_volume[PA_CHANNELS_MAX]; /* The calculated volume relative to the sink volume as linear factors. */ + pa_cvolume soft_volume; /* The internal software volume we apply to all PCM data while it passes through. Usually calculated as relative_volume * volume_factor */ pa_bool_t muted:1; /* if TRUE then the source we are connected to and/or the volume @@ -349,4 +352,7 @@ pa_bool_t pa_sink_input_safe_to_remove(pa_sink_input *i); pa_memchunk* pa_sink_input_get_silence(pa_sink_input *i, pa_memchunk *ret); +/* To be used by sink.c only */ +void pa_sink_input_set_relative_volume(pa_sink_input *i, const pa_cvolume *v); + #endif |