Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30949/src

Modified Files:
	data.c defaults.c sound.c 
Log Message:
New rc option, newSoundAngles on/off, to lose the stereo 3D component but still keep the layered, scaling with distance SDL sound.

Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- data.c	26 Apr 2006 02:04:24 -0000	1.12
+++ data.c	27 Apr 2006 22:38:42 -0000	1.13
@@ -722,4 +722,5 @@
 
 int richText = 0;   /* temporary variable to select rich text message windows */
 
-int newSound = 1;   /* use new SDL sound */
\ No newline at end of file
+int newSound = 1;   /* use new SDL sound */
+int newSoundAngles = 1; /* use new SDL sound with angular 3d component */
\ No newline at end of file

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- defaults.c	27 Apr 2006 16:48:24 -0000	1.10
+++ defaults.c	27 Apr 2006 22:38:42 -0000	1.11
@@ -287,6 +287,12 @@
             NULL
         }
     },
+    {"newSoundAngles", &newSoundAngles, RC_BOOL,
+        {
+            "Use 3D sound effects (only works if newSound is on)",
+            NULL
+        }
+    },
     {"omitTeamLetter", &omitTeamLetter, RC_BOOL,
         {
             "Omit team letter on galaxy",
@@ -1358,6 +1364,7 @@
 
     allowWheelActions = booleanDefault ("allowWheelActions", allowWheelActions);
     newSound = booleanDefault ("newSound", newSound);
+    newSoundAngles = booleanDefault ("newSoundAngles", newSoundAngles);
     tpDotDist = intDefault ("tpDotDist", tpDotDist);
     omitTeamLetter = booleanDefault ("omitTeamLetter", omitTeamLetter);
 	beepOnPrivateMessage = booleanDefault ("beepOnPrivateMessage", beepOnPrivateMessage);

Index: sound.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- sound.c	26 Apr 2006 23:18:14 -0000	1.7
+++ sound.c	27 Apr 2006 22:38:42 -0000	1.8
@@ -277,11 +277,23 @@
     	distance = 0;
     if (distance > 255)
     	distance = 255;
-    // Adjust volume with distance and angle
-    if (Mix_SetPosition(channel, angle, distance) == 0)
+    if (newSoundAngles)
     {
-        LineToConsole("Mix_SetPosition: %s\n", Mix_GetError());
-        return;
+        // Adjust volume with distance and angle
+        if (Mix_SetPosition(channel, angle, distance) == 0)
+        {
+           LineToConsole("Mix_SetPosition: %s\n", Mix_GetError());
+            return;
+        }
+    }
+    else
+    {
+        // Adjust volume with distance
+        if (Mix_SetDistance(channel, distance) == 0)
+        {
+           LineToConsole("Mix_SetDistance: %s\n", Mix_GetError());
+            return;
+        }
     }
         
     Group_Sound(type, channel);