summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-05-17 06:58:43 +0000
committerPierre Ossman <ossman@cendio.se>2006-05-17 06:58:43 +0000
commitc752e11c02b0059b0212c3c3358b3cc0ebe902ac (patch)
tree7be7daf1a2e69c434e7e67f503cacefcfc2433b6 /src
parent05c14685203b5ced74bfec0e6a3b3aa3f8721c51 (diff)
Add Microsoft's WAVEFORMWATEEXTENSIBLE channel mapping.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@890 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src')
-rw-r--r--src/polyp/channelmap.c59
-rw-r--r--src/polyp/channelmap.h1
2 files changed, 60 insertions, 0 deletions
diff --git a/src/polyp/channelmap.c b/src/polyp/channelmap.c
index 8d16f7b3..1e6347d6 100644
--- a/src/polyp/channelmap.c
+++ b/src/polyp/channelmap.c
@@ -214,6 +214,65 @@ pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, p
return m;
}
+ case PA_CHANNEL_MAP_WAVEEX:
+
+ switch (channels) {
+ case 1:
+ m->map[0] = PA_CHANNEL_POSITION_MONO;
+ return m;
+
+ case 18:
+ m->map[15] = PA_CHANNEL_POSITION_TOP_REAR_LEFT;
+ m->map[16] = PA_CHANNEL_POSITION_TOP_REAR_CENTER;
+ m->map[17] = PA_CHANNEL_POSITION_TOP_REAR_RIGHT;
+ /* Fall through */
+
+ case 15:
+ m->map[12] = PA_CHANNEL_POSITION_TOP_FRONT_LEFT;
+ m->map[13] = PA_CHANNEL_POSITION_TOP_FRONT_CENTER;
+ m->map[14] = PA_CHANNEL_POSITION_TOP_FRONT_RIGHT;
+ /* Fall through */
+
+ case 12:
+ m->map[11] = PA_CHANNEL_POSITION_TOP_CENTER;
+ /* Fall through */
+
+ case 11:
+ m->map[9] = PA_CHANNEL_POSITION_SIDE_LEFT;
+ m->map[10] = PA_CHANNEL_POSITION_SIDE_RIGHT;
+ /* Fall through */
+
+ case 9:
+ m->map[8] = PA_CHANNEL_POSITION_REAR_CENTER;
+ /* Fall through */
+
+ case 8:
+ m->map[6] = PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER;
+ m->map[7] = PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER;
+ /* Fall through */
+
+ case 6:
+ m->map[4] = PA_CHANNEL_POSITION_REAR_LEFT;
+ m->map[5] = PA_CHANNEL_POSITION_REAR_RIGHT;
+ /* Fall through */
+
+ case 4:
+ m->map[3] = PA_CHANNEL_POSITION_LFE;
+ /* Fall through */
+
+ case 3:
+ m->map[2] = PA_CHANNEL_POSITION_FRONT_CENTER;
+ /* Fall through */
+
+ case 2:
+ m->map[0] = PA_CHANNEL_POSITION_FRONT_LEFT;
+ m->map[1] = PA_CHANNEL_POSITION_FRONT_RIGHT;
+ return m;
+
+ default:
+ return NULL;
+ }
+
default:
return NULL;
}
diff --git a/src/polyp/channelmap.h b/src/polyp/channelmap.h
index 8270a5b3..c9fae17e 100644
--- a/src/polyp/channelmap.h
+++ b/src/polyp/channelmap.h
@@ -125,6 +125,7 @@ typedef enum pa_channel_map_def {
PA_CHANNEL_MAP_AIFF, /**< The mapping from RFC3551, which is based on AIFF-C */
PA_CHANNEL_MAP_ALSA, /**< The default mapping used by ALSA */
PA_CHANNEL_MAP_AUX, /**< Only aux channels */
+ PA_CHANNEL_MAP_WAVEEX, /**< Microsoft's WAVEFORMATEXTENSIBLE mapping */
PA_CHANNEL_MAP_DEFAULT = PA_CHANNEL_MAP_AIFF /**< The default channel map */
} pa_channel_map_def_t;