summaryrefslogtreecommitdiffstats
path: root/src/pulse
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse')
-rw-r--r--src/pulse/introspect.c10
-rw-r--r--src/pulse/introspect.h2
2 files changed, 10 insertions, 2 deletions
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c
index 38091581..5b905b7d 100644
--- a/src/pulse/introspect.c
+++ b/src/pulse/introspect.c
@@ -154,6 +154,7 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, u
memset(&i, 0, sizeof(i));
i.proplist = pa_proplist_new();
+ i.base_volume = PA_VOLUME_NORM;
if (pa_tagstruct_getu32(t, &i.index) < 0 ||
pa_tagstruct_gets(t, &i.name) < 0 ||
@@ -170,7 +171,9 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, u
pa_tagstruct_getu32(t, &flags) < 0 ||
(o->context->version >= 13 &&
(pa_tagstruct_get_proplist(t, i.proplist) < 0 ||
- pa_tagstruct_get_usec(t, &i.configured_latency) < 0))) {
+ pa_tagstruct_get_usec(t, &i.configured_latency) < 0)) ||
+ (o->context->version >= 14 &&
+ pa_tagstruct_get_volume(t, &i.base_volume) < 0)) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
pa_proplist_free(i.proplist);
@@ -275,6 +278,7 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command,
memset(&i, 0, sizeof(i));
i.proplist = pa_proplist_new();
+ i.base_volume = PA_VOLUME_NORM;
if (pa_tagstruct_getu32(t, &i.index) < 0 ||
pa_tagstruct_gets(t, &i.name) < 0 ||
@@ -291,7 +295,9 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command,
pa_tagstruct_getu32(t, &flags) < 0 ||
(o->context->version >= 13 &&
(pa_tagstruct_get_proplist(t, i.proplist) < 0 ||
- pa_tagstruct_get_usec(t, &i.configured_latency) < 0))) {
+ pa_tagstruct_get_usec(t, &i.configured_latency) < 0)) ||
+ (o->context->version >= 14 &&
+ pa_tagstruct_get_volume(t, &i.base_volume) < 0)) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
pa_proplist_free(i.proplist);
diff --git a/src/pulse/introspect.h b/src/pulse/introspect.h
index 087bd9f9..b409cadb 100644
--- a/src/pulse/introspect.h
+++ b/src/pulse/introspect.h
@@ -231,6 +231,7 @@ typedef struct pa_sink_info {
pa_sink_flags_t flags; /**< Flags */
pa_proplist *proplist; /**< Property list \since 0.9.11 */
pa_usec_t configured_latency; /**< The latency this device has been configured to. \since 0.9.11 */
+ pa_volume_t base_volume; /**< Some kind of "base" volume that refers to unamplified/unattenuated volume in the context of the output device. \since 0.9.14 */
} pa_sink_info;
/** Callback prototype for pa_context_get_sink_info_by_name() and friends */
@@ -286,6 +287,7 @@ typedef struct pa_source_info {
pa_source_flags_t flags; /**< Flags */
pa_proplist *proplist; /**< Property list \since 0.9.11 */
pa_usec_t configured_latency; /**< The latency this device has been configured to. \since 0.9.11 */
+ pa_volume_t base_volume; /**< Some kind of "base" volume that refers to unamplified/unattenuated volume in the context of the input device. \since 0.9.14 */
} pa_source_info;
/** Callback prototype for pa_context_get_source_info_by_name() and friends */