diff options
author | Lennart Poettering <lennart@poettering.net> | 2006-04-22 21:50:15 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2006-04-22 21:50:15 +0000 |
commit | ec65ca6ae758610a46c95fbf589729fb15cf1daf (patch) | |
tree | 65de55e9d9ef6eea03c6834be3d4a7f7658f167c /src/polypcore/sound-file.c | |
parent | 5e50f84e71b948b4737fe8b5860e5fe414258570 (diff) |
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
Diffstat (limited to 'src/polypcore/sound-file.c')
-rw-r--r-- | src/polypcore/sound-file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/polypcore/sound-file.c b/src/polypcore/sound-file.c index d86141ce..7a4ef075 100644 --- a/src/polypcore/sound-file.c +++ b/src/polypcore/sound-file.c @@ -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"); |