summaryrefslogtreecommitdiffstats
path: root/src/polyp/channelmap.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-05-17 13:06:04 +0000
committerLennart Poettering <lennart@poettering.net>2006-05-17 13:06:04 +0000
commited3606c88480de9b348dee451e7ebfd1f6bd15d7 (patch)
tree137e6e340e852eaa508f9967c05429d8cdf1861a /src/polyp/channelmap.c
parente767fda182739827c6e8a4b843c826409b8fbc80 (diff)
add new channel mapping standard PA_CHANNEL_MAP_OSS
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@895 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/polyp/channelmap.c')
-rw-r--r--src/polyp/channelmap.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/polyp/channelmap.c b/src/polyp/channelmap.c
index 1e6347d6..7266a0a0 100644
--- a/src/polyp/channelmap.c
+++ b/src/polyp/channelmap.c
@@ -273,6 +273,41 @@ pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, p
return NULL;
}
+ case PA_CHANNEL_MAP_OSS:
+
+ switch (channels) {
+ case 1:
+ m->map[0] = PA_CHANNEL_POSITION_MONO;
+ return m;
+
+ case 8:
+ m->map[6] = PA_CHANNEL_POSITION_REAR_LEFT;
+ m->map[7] = PA_CHANNEL_POSITION_REAR_RIGHT;
+ /* Fall through */
+
+ case 6:
+ m->map[4] = PA_CHANNEL_POSITION_SIDE_LEFT;
+ m->map[5] = PA_CHANNEL_POSITION_SIDE_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;
}