summaryrefslogtreecommitdiffstats
path: root/src/read-sound-file.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-05-26 03:32:26 +0200
committerLennart Poettering <lennart@poettering.net>2009-05-26 03:32:26 +0200
commit65837e669bf8b02819f02db9d7d21a47babe1356 (patch)
tree9f1e30ae457fd8f20fe93f9f94d5d331733dd3df /src/read-sound-file.c
parenta094ed99c3231baf9a9ae1d003c67b86fd7faa59 (diff)
add proper multichannel support (includes of WAVEX files)
Diffstat (limited to 'src/read-sound-file.c')
-rw-r--r--src/read-sound-file.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/read-sound-file.c b/src/read-sound-file.c
index bbadb02..ef20010 100644
--- a/src/read-sound-file.c
+++ b/src/read-sound-file.c
@@ -121,6 +121,15 @@ ca_sample_type_t ca_sound_file_get_sample_type(ca_sound_file *f) {
return f->type;
}
+const ca_channel_position_t* ca_sound_file_get_channel_map(ca_sound_file *f) {
+ ca_assert(f);
+
+ if (f->wav)
+ return ca_wav_get_channel_map(f->wav);
+ else
+ return ca_vorbis_get_channel_map(f->vorbis);
+}
+
int ca_sound_file_read_int16(ca_sound_file *f, int16_t *d, size_t *n) {
ca_return_val_if_fail(f, CA_ERROR_INVALID);
ca_return_val_if_fail(d, CA_ERROR_INVALID);