diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-04-13 15:37:25 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-05-15 10:09:35 +0530 |
commit | 1404db3d47c77ef3a360feed4ae8932cc8e443a0 (patch) | |
tree | c45b8378c27865ada0ef586d0cc17a03ef25f742 /src/pulse/format.h | |
parent | 8d076d09902fe618e69f3d71e42299bffe2af437 (diff) |
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.
Diffstat (limited to 'src/pulse/format.h')
-rw-r--r-- | src/pulse/format.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pulse/format.h b/src/pulse/format.h index 0498e68a..06e1fe62 100644 --- a/src/pulse/format.h +++ b/src/pulse/format.h @@ -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 |