From 1404db3d47c77ef3a360feed4ae8932cc8e443a0 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Wed, 13 Apr 2011 15:37:25 +0530 Subject: 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. --- src/pulse/format.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/pulse/format.h') 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 #include +#include +#include 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 -- cgit