mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
format: Add some convenience API for setting properties
Adds functions to set sample format, rate, channels and channel map on a format to make life easier for users of the API.
This commit is contained in:
parent
8d076d0990
commit
1404db3d47
3 changed files with 38 additions and 3 deletions
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include <pulse/cdecl.h>
|
||||
#include <pulse/proplist.h>
|
||||
#include <pulse/sample.h>
|
||||
#include <pulse/channelmap.h>
|
||||
|
||||
PA_C_DECL_BEGIN
|
||||
|
||||
|
|
@ -113,6 +115,15 @@ void pa_format_info_set_prop_string(pa_format_info *f, const char *key, const ch
|
|||
/** Sets a property with a list of string values on the given format info */
|
||||
void pa_format_info_set_prop_string_array(pa_format_info *f, const char *key, const char **values, int n_values);
|
||||
|
||||
/** Convenience method to set the sample format as a property on the given format */
|
||||
void pa_format_info_set_sample_format(pa_format_info *f, pa_sample_format_t sf);
|
||||
/** Convenience method to set the sampling rate as a property on the given format */
|
||||
void pa_format_info_set_rate(pa_format_info *f, int rate);
|
||||
/** Convenience method to set the number of channels as a property on the given format */
|
||||
void pa_format_info_set_channels(pa_format_info *f, int channels);
|
||||
/** Convenience method to set the channel map as a property on the given format */
|
||||
void pa_format_info_set_channel_map(pa_format_info *f, const pa_channel_map *map);
|
||||
|
||||
PA_C_DECL_END
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue