X-Git-Url: https://code.delx.au/pulseaudio/blobdiff_plain/dfa3c507001d583574a04cf87ed1f0123553ddac..30a32d35c8b91cafc004961828a7d0acbce74f1f:/src/pulsecore/core-format.h diff --git a/src/pulsecore/core-format.h b/src/pulsecore/core-format.h index 086cbed8..9342acc3 100644 --- a/src/pulsecore/core-format.h +++ b/src/pulsecore/core-format.h @@ -42,6 +42,18 @@ int pa_format_info_get_channels(pa_format_info *f, uint8_t *channels); * -PA_ERR_NOENTITY. */ int pa_format_info_get_channel_map(pa_format_info *f, pa_channel_map *map); +/* Convert the format info into a sample spec and a channel map. If the format + * info doesn't contain some information, the fallback sample spec and channel + * map are used to populate the output. + * + * pa_format_info_to_sample_spec() exists too. This "version 2" was created, + * because the original function doesn't provide the possibility of specifying + * a fallback sample spec and channel map. That functionality can't be added to + * the original function, because the function is part of the public API and + * adding parameters to it would break the API. */ +int pa_format_info_to_sample_spec2(pa_format_info *f, pa_sample_spec *ss, pa_channel_map *map, pa_sample_spec *fallback_ss, + pa_channel_map *fallback_map); + /* For compressed formats. Converts the format info into a sample spec and a * channel map that an ALSA device can use as its configuration parameters when * playing back the compressed data. That is, the returned sample spec doesn't