summaryrefslogtreecommitdiffstats
path: root/src/pulse/volume.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse/volume.h')
-rw-r--r--src/pulse/volume.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
index 5815c906..38da5dfc 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
@@ -154,20 +154,20 @@ char *pa_sw_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c);
* pa_volume_snprint(). Please note that this value can change with
* any release without warning and without being considered API or ABI
* breakage. You should not use this definition anywhere where it
- * might become part of an ABI. \since 0.9.14 */
+ * might become part of an ABI. \since 0.9.15 */
#define PA_VOLUME_SNPRINT_MAX 10
-/** Pretty print a volume \since 0.9.14 */
+/** Pretty print a volume \since 0.9.15 */
char *pa_volume_snprint(char *s, size_t l, pa_volume_t v);
/** Maximum length of the strings returned by
* pa_volume_snprint_dB(). Please note that this value can change with
* any release without warning and without being considered API or ABI
* breakage. You should not use this definition anywhere where it
- * might become part of an ABI. \since 0.9.14 */
+ * might become part of an ABI. \since 0.9.15 */
#define PA_SW_VOLUME_SNPRINT_DB_MAX 10
-/** Pretty print a volume but show dB values. \since 0.9.14 */
+/** Pretty print a volume but show dB values. \since 0.9.15 */
char *pa_sw_volume_snprint_dB(char *s, size_t l, pa_volume_t v);
/** Return the average volume of all channels */
@@ -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