mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
* modify pa_channel_map_init_auto() to take an extra argument specifying the standard to use (ALSA, AIFF, ...)
* add some more validity checks to pa_source_new(),pa_sink_new(),pa_sink_input_new(),pa_source_output_new() git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@888 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
c63cc7bb79
commit
4b6ab291a7
27 changed files with 237 additions and 191 deletions
|
|
@ -280,7 +280,7 @@ int pa_modargs_get_channel_map(pa_modargs *ma, pa_channel_map *rmap) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int pa_modargs_get_sample_spec_and_channel_map(pa_modargs *ma, pa_sample_spec *rss, pa_channel_map *rmap) {
|
||||
int pa_modargs_get_sample_spec_and_channel_map(pa_modargs *ma, pa_sample_spec *rss, pa_channel_map *rmap, pa_channel_map_def_t def) {
|
||||
pa_sample_spec ss;
|
||||
pa_channel_map map;
|
||||
|
||||
|
|
@ -293,7 +293,8 @@ int pa_modargs_get_sample_spec_and_channel_map(pa_modargs *ma, pa_sample_spec *r
|
|||
if (pa_modargs_get_sample_spec(ma, &ss) < 0)
|
||||
return -1;
|
||||
|
||||
pa_channel_map_init_auto(&map, ss.channels);
|
||||
if (!pa_channel_map_init_auto(&map, ss.channels, def))
|
||||
map.channels = 0;
|
||||
|
||||
if (pa_modargs_get_channel_map(ma, &map) < 0)
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue