mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-09 13:29:59 -05:00
core-format: Add pa_format_info_get_rate()
This also fixes an issue in pa_format_info_to_sample_spec(): it did no validation for the rate value. Now the validation is taken care of in pa_format_info_get_rate().
This commit is contained in:
parent
eae16f41a4
commit
85a3f560d1
3 changed files with 28 additions and 3 deletions
|
|
@ -27,6 +27,11 @@
|
|||
* -PA_ERR_NOENTITY. */
|
||||
int pa_format_info_get_sample_format(pa_format_info *f, pa_sample_format_t *sf);
|
||||
|
||||
/* Gets the sample rate stored in the format info. Returns a negative error
|
||||
* code on failure. If the sample rate property is not set at all, returns
|
||||
* -PA_ERR_NOENTITY. */
|
||||
int pa_format_info_get_rate(pa_format_info *f, uint32_t *rate);
|
||||
|
||||
/* 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue