mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
format: Trivial reorganisation
Moves all the property setters together
This commit is contained in:
parent
d9cdaffefe
commit
8f850403c0
1 changed files with 20 additions and 20 deletions
|
|
@ -280,26 +280,6 @@ int pa_format_info_to_sample_spec_fake(pa_format_info *f, pa_sample_spec *ss) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void pa_format_info_set_sample_format(pa_format_info *f, pa_sample_format_t sf) {
|
||||
pa_format_info_set_prop_string(f, PA_PROP_FORMAT_SAMPLE_FORMAT, pa_sample_format_to_string(sf));
|
||||
}
|
||||
|
||||
void pa_format_info_set_rate(pa_format_info *f, int rate) {
|
||||
pa_format_info_set_prop_int(f, PA_PROP_FORMAT_RATE, rate);
|
||||
}
|
||||
|
||||
void pa_format_info_set_channels(pa_format_info *f, int channels) {
|
||||
pa_format_info_set_prop_int(f, PA_PROP_FORMAT_CHANNELS, channels);
|
||||
}
|
||||
|
||||
void pa_format_info_set_channel_map(pa_format_info *f, const pa_channel_map *map) {
|
||||
char map_str[PA_CHANNEL_MAP_SNPRINT_MAX];
|
||||
|
||||
pa_channel_map_snprint(map_str, sizeof(map_str), map);
|
||||
|
||||
pa_format_info_set_prop_string(f, PA_PROP_FORMAT_CHANNEL_MAP, map_str);
|
||||
}
|
||||
|
||||
int pa_format_info_get_prop_int(pa_format_info *f, const char *key, int *v) {
|
||||
const char *str;
|
||||
json_object *o;
|
||||
|
|
@ -491,6 +471,26 @@ void pa_format_info_free_string_array(char **values, int n_values) {
|
|||
pa_xfree(values);
|
||||
}
|
||||
|
||||
void pa_format_info_set_sample_format(pa_format_info *f, pa_sample_format_t sf) {
|
||||
pa_format_info_set_prop_string(f, PA_PROP_FORMAT_SAMPLE_FORMAT, pa_sample_format_to_string(sf));
|
||||
}
|
||||
|
||||
void pa_format_info_set_rate(pa_format_info *f, int rate) {
|
||||
pa_format_info_set_prop_int(f, PA_PROP_FORMAT_RATE, rate);
|
||||
}
|
||||
|
||||
void pa_format_info_set_channels(pa_format_info *f, int channels) {
|
||||
pa_format_info_set_prop_int(f, PA_PROP_FORMAT_CHANNELS, channels);
|
||||
}
|
||||
|
||||
void pa_format_info_set_channel_map(pa_format_info *f, const pa_channel_map *map) {
|
||||
char map_str[PA_CHANNEL_MAP_SNPRINT_MAX];
|
||||
|
||||
pa_channel_map_snprint(map_str, sizeof(map_str), map);
|
||||
|
||||
pa_format_info_set_prop_string(f, PA_PROP_FORMAT_CHANNEL_MAP, map_str);
|
||||
}
|
||||
|
||||
void pa_format_info_set_prop_int(pa_format_info *f, const char *key, int value) {
|
||||
json_object *o;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue