[polypaudio-commits] r491 - in /trunk/src/polyp: channelmap.c channelmap.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Thu Feb 16 14:34:52 PST 2006
Author: lennart
Date: Thu Feb 16 23:34:52 2006
New Revision: 491
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=491&root=polypaudio&view=rev
Log:
make channel naming somewhat RFC2551 compliant
Modified:
trunk/src/polyp/channelmap.c
trunk/src/polyp/channelmap.h
Modified: trunk/src/polyp/channelmap.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/channelmap.c?rev=491&root=polypaudio&r1=490&r2=491&view=diff
==============================================================================
--- trunk/src/polyp/channelmap.c (original)
+++ trunk/src/polyp/channelmap.c Thu Feb 16 23:34:52 2006
@@ -71,33 +71,45 @@
pa_channel_map_init(m);
m->channels = channels;
+
+ /* This is somewhat compatible with RFC3551 */
switch (channels) {
case 1:
m->map[0] = PA_CHANNEL_POSITION_MONO;
return m;
- case 8:
- m->map[6] = PA_CHANNEL_POSITION_SIDE_LEFT;
- m->map[7] = PA_CHANNEL_POSITION_SIDE_RIGHT;
- /* Fall through */
-
case 6:
+ m->map[0] = PA_CHANNEL_POSITION_FRONT_LEFT;
+ m->map[1] = PA_CHANNEL_POSITION_SIDE_LEFT;
+ m->map[2] = PA_CHANNEL_POSITION_FRONT_CENTER;
+ m->map[3] = PA_CHANNEL_POSITION_FRONT_RIGHT;
+ m->map[4] = PA_CHANNEL_POSITION_SIDE_RIGHT;
m->map[5] = PA_CHANNEL_POSITION_LFE;
- /* Fall through */
+ return m;
case 5:
- m->map[4] = PA_CHANNEL_POSITION_FRONT_CENTER;
- /* Fall through */
-
- case 4:
- m->map[2] = PA_CHANNEL_POSITION_REAR_LEFT;
- m->map[3] = PA_CHANNEL_POSITION_REAR_RIGHT;
+ m->map[2] = PA_CHANNEL_POSITION_FRONT_CENTER;
+ m->map[3] = PA_CHANNEL_POSITION_REAR_LEFT;
+ m->map[4] = PA_CHANNEL_POSITION_REAR_RIGHT;
/* Fall through */
case 2:
m->map[0] = PA_CHANNEL_POSITION_FRONT_LEFT;
m->map[1] = PA_CHANNEL_POSITION_FRONT_RIGHT;
+ return m;
+
+ case 3:
+ m->map[0] = PA_CHANNEL_POSITION_LEFT;
+ m->map[1] = PA_CHANNEL_POSITION_RIGHT;
+ m->map[2] = PA_CHANNEL_POSITION_CENTER;
+ return m;
+
+ case 4:
+ m->map[0] = PA_CHANNEL_POSITION_LEFT;
+ m->map[1] = PA_CHANNEL_POSITION_CENTER;
+ m->map[2] = PA_CHANNEL_POSITION_RIGHT;
+ m->map[3] = PA_CHANNEL_POSITION_LFE;
return m;
default:
Modified: trunk/src/polyp/channelmap.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/channelmap.h?rev=491&root=polypaudio&r1=490&r2=491&view=diff
==============================================================================
--- trunk/src/polyp/channelmap.h (original)
+++ trunk/src/polyp/channelmap.h Thu Feb 16 23:34:52 2006
@@ -36,10 +36,11 @@
PA_CHANNEL_POSITION_LEFT,
PA_CHANNEL_POSITION_RIGHT,
-
- PA_CHANNEL_POSITION_FRONT_CENTER,
+ PA_CHANNEL_POSITION_CENTER,
+
PA_CHANNEL_POSITION_FRONT_LEFT = PA_CHANNEL_POSITION_LEFT,
PA_CHANNEL_POSITION_FRONT_RIGHT = PA_CHANNEL_POSITION_RIGHT,
+ PA_CHANNEL_POSITION_FRONT_CENTER = PA_CHANNEL_POSITION_CENTER,
PA_CHANNEL_POSITION_REAR_CENTER,
PA_CHANNEL_POSITION_REAR_LEFT,
More information about the pulseaudio-commits
mailing list