summaryrefslogtreecommitdiffstats
path: root/src/pulse/volume.h
diff options
context:
space:
mode:
authorVladimir Kokarev <matrix47@gmail.com>2009-09-19 19:43:24 +0400
committerLennart Poettering <lennart@poettering.net>2009-11-05 04:56:47 +0100
commitd2c59354d554f136739be7bbcd326f1d254f778e (patch)
tree01ada5237cb00c14333028717e10b9917109af95 /src/pulse/volume.h
parent53b046d5c9593d848270e85017c2999a61256e0e (diff)
volume: add pa_cvolume_inc_clamp function
added function to increase volume not exceeding specified limit simply changed PA_VOLUME_MAX to 'limit' in pa_cvolume_inc pa_cvolume_inc now calls pa_cvolume_inc_clamp with PA_VOLUME_MAX limit
Diffstat (limited to 'src/pulse/volume.h')
-rw-r--r--src/pulse/volume.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
index c964020a..ded4422e 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
@@ -348,6 +348,10 @@ pa_volume_t pa_cvolume_get_position(pa_cvolume *cv, const pa_channel_map *map, p
* and dest may point to the same structure. \since 0.9.16 */
pa_cvolume* pa_cvolume_merge(pa_cvolume *dest, const pa_cvolume *a, const pa_cvolume *b);
+/** Increase the volume passed in by 'inc', but not exceeding 'limit'.
+ * The proportions between the channels are kept. \since 0.9.19 */
+pa_cvolume* pa_cvolume_inc_clamp(pa_cvolume *v, pa_volume_t inc, pa_volume_t limit);
+
/** Increase the volume passed in by 'inc'. The proportions between
* the channels are kept. \since 0.9.16 */
pa_cvolume* pa_cvolume_inc(pa_cvolume *v, pa_volume_t inc);