diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-01-27 04:39:07 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-01-27 04:39:07 +0100 |
commit | d5f46e824e3f8a042e6f67dd4c3fc385545edd74 (patch) | |
tree | 8c36ed55541b3aa5429c537498b47f29fc590222 /src/pulse/introspect.c | |
parent | 4bfa5d7d13350bd0eac439dbe251812ce437ea43 (diff) |
move flat volume logic into the core. while doing so add n_volume_steps field to sinks/sources
Diffstat (limited to 'src/pulse/introspect.c')
-rw-r--r-- | src/pulse/introspect.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c index c5c96784..1d50939c 100644 --- a/src/pulse/introspect.c +++ b/src/pulse/introspect.c @@ -159,6 +159,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; + i.n_volume_steps = PA_VOLUME_NORM+1; mute = FALSE; state = PA_SINK_INVALID_STATE; @@ -180,7 +181,8 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, u pa_tagstruct_get_usec(t, &i.configured_latency) < 0)) || (o->context->version >= 15 && (pa_tagstruct_get_volume(t, &i.base_volume) < 0 || - pa_tagstruct_getu32(t, &state) < 0))) { + pa_tagstruct_getu32(t, &state) < 0 || + pa_tagstruct_getu32(t, &i.n_volume_steps) < 0))) { pa_context_fail(o->context, PA_ERR_PROTOCOL); pa_proplist_free(i.proplist); @@ -288,6 +290,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; + i.n_volume_steps = PA_VOLUME_NORM+1; mute = FALSE; state = PA_SOURCE_INVALID_STATE; @@ -309,7 +312,8 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command, pa_tagstruct_get_usec(t, &i.configured_latency) < 0)) || (o->context->version >= 15 && (pa_tagstruct_get_volume(t, &i.base_volume) < 0 || - pa_tagstruct_getu32(t, &state) < 0))) { + pa_tagstruct_getu32(t, &state) < 0 || + pa_tagstruct_getu32(t, &i.n_volume_steps) < 0))) { pa_context_fail(o->context, PA_ERR_PROTOCOL); pa_proplist_free(i.proplist); |