[polypaudio-commits] r890 - in /trunk/src/polyp: channelmap.c channelmap.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue May 16 23:58:44 PDT 2006


Author: ossman
Date: Wed May 17 08:58:43 2006
New Revision: 890

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=890&root=polypaudio&view=rev
Log:
Add Microsoft's WAVEFORMWATEEXTENSIBLE channel mapping.

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=890&root=polypaudio&r1=889&r2=890&view=diff
==============================================================================
--- trunk/src/polyp/channelmap.c (original)
+++ trunk/src/polyp/channelmap.c Wed May 17 08:58:43 2006
@@ -214,6 +214,65 @@
             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;
     }

Modified: trunk/src/polyp/channelmap.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/channelmap.h?rev=890&root=polypaudio&r1=889&r2=890&view=diff
==============================================================================
--- trunk/src/polyp/channelmap.h (original)
+++ trunk/src/polyp/channelmap.h Wed May 17 08:58:43 2006
@@ -125,6 +125,7 @@
     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;




More information about the pulseaudio-commits mailing list