mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
introduce default channel map in addition to the default sample spec
This commit is contained in:
parent
27bfa607b9
commit
4505bc9cc6
24 changed files with 180 additions and 147 deletions
|
|
@ -110,12 +110,17 @@ static void context_get_server_info_callback(pa_pdispatch *pd, uint32_t command,
|
|||
pa_tagstruct_gets(t, &i.default_sink_name) < 0 ||
|
||||
pa_tagstruct_gets(t, &i.default_source_name) < 0 ||
|
||||
pa_tagstruct_getu32(t, &i.cookie) < 0 ||
|
||||
(o->context->version >= 15 &&
|
||||
pa_tagstruct_get_channel_map(t, &i.channel_map) < 0) ||
|
||||
!pa_tagstruct_eof(t)) {
|
||||
|
||||
pa_context_fail(o->context, PA_ERR_PROTOCOL);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (p && o->context->version < 15)
|
||||
pa_channel_map_init_extend(&i.channel_map, i.sample_spec.channels, PA_CHANNEL_MAP_DEFAULT);
|
||||
|
||||
if (o->callback) {
|
||||
pa_server_info_cb_t cb = (pa_server_info_cb_t) o->callback;
|
||||
cb(o->context, p, o->userdata);
|
||||
|
|
|
|||
|
|
@ -317,6 +317,7 @@ typedef struct pa_server_info {
|
|||
const char *default_sink_name; /**< Name of default sink. */
|
||||
const char *default_source_name; /**< Name of default sink. */
|
||||
uint32_t cookie; /**< A random cookie for identifying this instance of PulseAudio. */
|
||||
pa_channel_map channel_map; /**< Default channel map. \since 0.9.15 */
|
||||
} pa_server_info;
|
||||
|
||||
/** Callback prototype for pa_context_get_server_info() */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue