mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
when loading sound files, initialize channel map data properly
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@777 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
5e50f84e71
commit
ec65ca6ae7
3 changed files with 10 additions and 5 deletions
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#define MAX_FILE_SIZE (1024*1024)
|
||||
|
||||
int pa_sound_file_load(const char *fname, pa_sample_spec *ss, pa_memchunk *chunk, pa_memblock_stat *s) {
|
||||
int pa_sound_file_load(const char *fname, pa_sample_spec *ss, pa_channel_map *map, pa_memchunk *chunk, pa_memblock_stat *s) {
|
||||
SNDFILE*sf = NULL;
|
||||
SF_INFO sfinfo;
|
||||
int ret = -1;
|
||||
|
|
@ -74,6 +74,9 @@ int pa_sound_file_load(const char *fname, pa_sample_spec *ss, pa_memchunk *chunk
|
|||
pa_log(__FILE__": Unsupported sample format in file %s", fname);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (map)
|
||||
pa_channel_map_init_auto(map, ss->channels);
|
||||
|
||||
if ((l = pa_frame_size(ss)*sfinfo.frames) > MAX_FILE_SIZE) {
|
||||
pa_log(__FILE__": File too large");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue