summaryrefslogtreecommitdiffstats
path: root/src/pulse/volume.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-01-19 21:45:58 +0100
committerLennart Poettering <lennart@poettering.net>2009-01-19 21:45:58 +0100
commit723d71a021d3693941c98648c24d0db17ea16117 (patch)
treea84c5eeae6c2128b06fb805f32a4a8752204835e /src/pulse/volume.h
parent606cf8a2ec9d5f84b88039b14e17a93b706be9da (diff)
add api for manipulating volume balances
Diffstat (limited to 'src/pulse/volume.h')
-rw-r--r--src/pulse/volume.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
index 5815c906..08683ac7 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
@@ -233,6 +233,20 @@ pa_cvolume *pa_cvolume_remap(pa_cvolume *v, pa_channel_map *from, pa_channel_map
* the specified sample spec. \since 0.9.13 */
int pa_cvolume_compatible(const pa_cvolume *v, const pa_sample_spec *ss) PA_GCC_PURE;
+/** Calculate a 'balance' value for the specified volume with the
+ * specified channel map. The return value will range from -1.0f
+ * (left) to +1.0f (right) \since 0.9.15 */
+float pa_cvolume_get_balance(const pa_channel_map *map, const pa_cvolume *v) PA_GCC_PURE;
+
+/** Adjust the 'balance' value for the specified volume with the
+ * specified channel map. v will be modified in place and
+ * returned. The balance is a value between -1.0f and +1.0f. This
+ * operation might not be reversable! Also, after this call
+ * pa_cvolume_get_balance() is not guaranteed to actually return the
+ * requested balance (e.g. when the input volume was zero anyway for
+ * all channels)- \since 0.9.15 */
+pa_cvolume* pa_cvolume_set_balance(const pa_channel_map *map, pa_cvolume *v, float new_balance);
+
PA_C_DECL_END
#endif