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

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Wed May 17 06:06:05 PDT 2006


Author: lennart
Date: Wed May 17 15:06:04 2006
New Revision: 895

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=895&root=polypaudio&view=rev
Log:
add new channel mapping standard PA_CHANNEL_MAP_OSS

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=895&root=polypaudio&r1=894&r2=895&view=diff
==============================================================================
--- trunk/src/polyp/channelmap.c (original)
+++ trunk/src/polyp/channelmap.c Wed May 17 15:06:04 2006
@@ -273,6 +273,41 @@
                     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;
     }

Modified: trunk/src/polyp/channelmap.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/channelmap.h?rev=895&root=polypaudio&r1=894&r2=895&view=diff
==============================================================================
--- trunk/src/polyp/channelmap.h (original)
+++ trunk/src/polyp/channelmap.h Wed May 17 15:06:04 2006
@@ -122,10 +122,11 @@
 
 /** A list of channel mapping definitions for pa_channel_map_init_auto() */
 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_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_OSS,    /**< The default channel mapping used by OSS as defined in the OSS 4.0 API specs */
     
     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