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

Modified Files:
	beeplite.c cowmain.c data.c death.c defaults.c dmessage.c 
	findslot.c input.c local.c map.c newwin.c playback.c socket.c 
	sound.c warning.c 
Removed Files:
	winsndlib.c 
Log Message:
Completely gutted the old windows sound system.  Resulting in removal of
nt_intro.wav (yay!), audio.h and winsndlib.c (bigger yay!).  All the clunky old
windows code for loading sound, checking if sound is enabled, and changing
volume is now handled by 20x less code using SDL.  And it's done better,
too.  All references to "newSound" have been renamed to "sound".  No
longer support the old sound menu/loading of sounds, so that got gutted too.
Still todo: menu option for removing other ship's sounds, ability to toggle
certain sound categories on/off, and to control starting volume.  All to be
netrekrc entries.

Index: findslot.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/findslot.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- findslot.c	7 May 2006 16:59:27 -0000	1.6
+++ findslot.c	28 Feb 2007 09:35:20 -0000	1.7
@@ -113,14 +113,6 @@
         socketPause ();
         if (isServerDead ())
         {
-        	
-#if defined(SOUND)
-            if (!newSound)
-                Exit_Sound();
-            else
-                Mix_CloseAudio();
-#endif
-
             LineToConsole ("Shit!  Ghostbusted!\n");
             terminate (0);
         }
@@ -162,14 +154,6 @@
         readFromServer (NULL);
         if (isServerDead ())
         {
-
-#if defined(SOUND)
-            if (!newSound)
-                Exit_Sound();
-            else
-                Mix_CloseAudio();
-#endif
-
             LineToConsole ("Damn, We've been ghostbusted!\n");
             terminate (0);
         }
@@ -224,14 +208,6 @@
                 }
                 else if (event.Window == waitqWin)
                 {
-
-#if defined(SOUND)
-                    if (!newSound)
-                        Exit_Sound();
-                    else
-                        Mix_CloseAudio();
-#endif
-
                     LineToConsole ("OK, bye!\n");
                     terminate (0);
                 }

Index: dmessage.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/dmessage.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- dmessage.c	1 May 2006 00:55:11 -0000	1.6
+++ dmessage.c	28 Feb 2007 09:35:20 -0000	1.7
@@ -217,12 +217,7 @@
 #ifdef SOUND          
             if (why_dead &&
                (instr (message, "[plasma]") || instr (message, "[zapped plasma]")))
-            {
-            	if (newSound)
-            	    Play_Sound(PLASMA_KILL_WAV);
-            	else          	
-            	    Play_Sound(PLASMA_KILL_SOUND);
-            }
+            	Play_Sound(PLASMA_KILL_WAV);
 #endif
 
         }
@@ -279,12 +274,7 @@
 #ifdef SOUND          
             if (why_dead &&
                (instr (message, "[plasma]") || instr (message, "[zapped plasma]")))
-            {
-            	if (newSound)
-            	    Play_Sound(PLASMA_KILL_WAV);
-            	else          	
-            	    Play_Sound(PLASMA_KILL_SOUND);
-            }
+                Play_Sound(PLASMA_KILL_WAV);
 #endif
 
             if (logging)

Index: sound.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- sound.c	28 Feb 2007 07:44:01 -0000	1.29
+++ sound.c	28 Feb 2007 09:35:20 -0000	1.30
@@ -25,64 +25,13 @@
 #include "defs.h"
 #include "struct.h"
 #include "data.h"
-#include "audio.h"
 #include "proto.h"
 
-static Mix_Chunk *newsounds[NUM_WAVES];
-static Mix_Music *newmusic[NUM_MUSIC];
-/* Each sound has a priority which controls what can override what
-   Currently these are set as follows:
+static void soundrefresh (int i);
 
-   11: death sounds
-   10: explosion
-   9: phaser,plasma
-   8: torp/plasma hit
-   7: torp fire, cloak
-   6: alert
-   4: "informational" sounds (self destruct, enter ship, message, etc.)
-   3: shield up/down, other people's sounds (phaser, torp, plasma, explode)
-   0: background or ambient (engine?)
-*/
-static struct Sound sounds[NUM_SOUNDS + 1] = {
-    {"", 0, 0},
-    {"nt_fire_torp", 7, 1},
-    {"nt_phaser", 9, 1},
-    {"nt_fire_plasma", 9, 1},
-    {"nt_explosion", 10, 1},
-    {"nt_base_explosion", 10, 1},
-    {"nt_cloaked", 7, 1},
-    {"nt_uncloak", 7, 1},
-    {"nt_shield_down", 3, 1},
-    {"nt_shield_up", 3, 1},
-    {"nt_torp_hit", 8, 1},
-    {"nt_warning", 5, 1},
-    {"nt_red_alert", 5, 1},
-    {"nt_engine", 0, 0},
-    {"nt_enter_ship", 4, 1},
-    {"nt_self_destruct", 6, 1},
-    {"nt_plasma_hit", 8, 1},
-    {"nt_plasma_kill", 11, 1},
-    {"nt_enter_warp", 4, 1},
-    {"nt_exit_warp", 4, 1},
-    {"nt_start_tmode", 6, 1},
-    {"nt_stop_tmode", 6, 1},
-    {"nt_message", 4, 1},
-    {"nt_message1", 4, 1},
-    {"nt_message2", 4, 1},
-    {"nt_message3", 4, 1},
-    {"nt_message4", 4, 1},
-    {"nt_message5", 4, 1},
-    {"nt_message6", 4, 1},
-    {"nt_message7", 4, 1},
-    {"nt_message8", 4, 1},
-    {"nt_message9", 4, 1},
-    {"nt_fire_torp_other", 3, 1},
-    {"nt_phaser_other", 3, 1},
-    {"nt_fire_plasma_other", 3, 1},
-    {"nt_explosion_other", 10, 1}
-};
+static Mix_Chunk *sounds[NUM_WAVES];
+static Mix_Music *music[NUM_MUSIC];
 
-static int current_sound = NO_SOUND;
 static int sound_other = 1;     /* Play other ship's sounds? */
 
 static char sound_prefix[PATH_MAX];
@@ -100,44 +49,44 @@
 int loadSounds(void) {
   int i;
 
-  newsounds[CLOAKED_WAV] = Mix_LoadWAV(DATAFILE("nt_cloaked.wav"));
-  newsounds[ENGINE_WAV] = Mix_LoadWAV(DATAFILE("nt_engine.wav"));
-  newsounds[ENTER_SHIP_WAV] = Mix_LoadWAV(DATAFILE("nt_enter_ship.wav"));
-  newsounds[ENTER_WARP_WAV] = Mix_LoadWAV(DATAFILE("nt_enter_warp.wav"));
-  newsounds[EXIT_WARP_WAV] = Mix_LoadWAV(DATAFILE("nt_exit_warp.wav"));
-  newsounds[EXPLOSION_WAV] = Mix_LoadWAV(DATAFILE("nt_explosion.wav"));
-  newsounds[BASE_EXPLOSION_WAV] = Mix_LoadWAV(DATAFILE("nt_base_explosion.wav"));
-  newsounds[EXPLOSION_OTHER_WAV] = Mix_LoadWAV(DATAFILE("nt_explosion_other.wav"));
-  newsounds[FIRE_PLASMA_WAV] = Mix_LoadWAV(DATAFILE("nt_fire_plasma.wav"));
-  newsounds[OTHER_FIRE_PLASMA_WAV] = Mix_LoadWAV(DATAFILE("nt_fire_plasma_other.wav"));
-  newsounds[FIRE_TORP_WAV] = Mix_LoadWAV(DATAFILE("nt_fire_torp.wav"));
-  newsounds[OTHER_FIRE_TORP_WAV] = Mix_LoadWAV(DATAFILE("nt_fire_torp_other.wav"));
-  newsounds[INTRO_WAV] = Mix_LoadWAV(DATAFILE("nt_intro.wav"));
-  newsounds[MESSAGE_WAV] = Mix_LoadWAV(DATAFILE("nt_message.wav"));
-  newsounds[MESSAGE1_WAV] = Mix_LoadWAV(DATAFILE("nt_message1.wav"));
-  newsounds[MESSAGE2_WAV] = Mix_LoadWAV(DATAFILE("nt_message2.wav"));
-  newsounds[MESSAGE3_WAV] = Mix_LoadWAV(DATAFILE("nt_message3.wav"));
-  newsounds[MESSAGE4_WAV] = Mix_LoadWAV(DATAFILE("nt_message4.wav"));
-  newsounds[MESSAGE5_WAV] = Mix_LoadWAV(DATAFILE("nt_message5.wav"));
-  newsounds[MESSAGE6_WAV] = Mix_LoadWAV(DATAFILE("nt_message6.wav"));
-  newsounds[MESSAGE7_WAV] = Mix_LoadWAV(DATAFILE("nt_message7.wav"));
-  newsounds[PHASER_WAV] = Mix_LoadWAV(DATAFILE("nt_phaser.wav"));
-  newsounds[PHASER_OTHER_WAV] = Mix_LoadWAV(DATAFILE("nt_phaser_other.wav"));
-  newsounds[PLASMA_HIT_WAV] = Mix_LoadWAV(DATAFILE("nt_plasma_hit.wav"));
-  newsounds[PLASMA_KILL_WAV] = Mix_LoadWAV(DATAFILE("nt_plasma_kill.wav"));
-  newsounds[RED_ALERT_WAV] = Mix_LoadWAV(DATAFILE("nt_red_alert.wav"));
-  newsounds[SELF_DESTRUCT_WAV] = Mix_LoadWAV(DATAFILE("nt_self_destruct.wav"));
-  newsounds[SHIELD_DOWN_WAV] = Mix_LoadWAV(DATAFILE("nt_shield_down.wav"));
-  newsounds[SHIELD_UP_WAV] = Mix_LoadWAV(DATAFILE("nt_shield_up.wav"));
-  newsounds[START_TMODE_WAV] = Mix_LoadWAV(DATAFILE("nt_start_tmode.wav"));
-  newsounds[STOP_TMODE_WAV] = Mix_LoadWAV(DATAFILE("nt_stop_tmode.wav"));
-  newsounds[TORP_HIT_WAV] = Mix_LoadWAV(DATAFILE("nt_torp_hit.wav"));
-  newsounds[UNCLOAK_WAV] = Mix_LoadWAV(DATAFILE("nt_uncloak.wav"));
-  newsounds[WARNING_WAV] = Mix_LoadWAV(DATAFILE("nt_warning.wav"));
+  sounds[CLOAKED_WAV] = Mix_LoadWAV(DATAFILE("nt_cloaked.wav"));
+  sounds[ENGINE_WAV] = Mix_LoadWAV(DATAFILE("nt_engine.wav"));
+  sounds[ENTER_SHIP_WAV] = Mix_LoadWAV(DATAFILE("nt_enter_ship.wav"));
+  sounds[ENTER_WARP_WAV] = Mix_LoadWAV(DATAFILE("nt_enter_warp.wav"));
+  sounds[EXIT_WARP_WAV] = Mix_LoadWAV(DATAFILE("nt_exit_warp.wav"));
+  sounds[EXPLOSION_WAV] = Mix_LoadWAV(DATAFILE("nt_explosion.wav"));
+  sounds[BASE_EXPLOSION_WAV] = Mix_LoadWAV(DATAFILE("nt_base_explosion.wav"));
+  sounds[EXPLOSION_OTHER_WAV] = Mix_LoadWAV(DATAFILE("nt_explosion_other.wav"));
+  sounds[FIRE_PLASMA_WAV] = Mix_LoadWAV(DATAFILE("nt_fire_plasma.wav"));
+  sounds[OTHER_FIRE_PLASMA_WAV] = Mix_LoadWAV(DATAFILE("nt_fire_plasma_other.wav"));
+  sounds[FIRE_TORP_WAV] = Mix_LoadWAV(DATAFILE("nt_fire_torp.wav"));
+  sounds[OTHER_FIRE_TORP_WAV] = Mix_LoadWAV(DATAFILE("nt_fire_torp_other.wav"));
+  sounds[INTRO_WAV] = Mix_LoadWAV(DATAFILE("nt_intro.wav"));
+  sounds[MESSAGE_WAV] = Mix_LoadWAV(DATAFILE("nt_message.wav"));
+  sounds[MESSAGE1_WAV] = Mix_LoadWAV(DATAFILE("nt_message1.wav"));
+  sounds[MESSAGE2_WAV] = Mix_LoadWAV(DATAFILE("nt_message2.wav"));
+  sounds[MESSAGE3_WAV] = Mix_LoadWAV(DATAFILE("nt_message3.wav"));
+  sounds[MESSAGE4_WAV] = Mix_LoadWAV(DATAFILE("nt_message4.wav"));
+  sounds[MESSAGE5_WAV] = Mix_LoadWAV(DATAFILE("nt_message5.wav"));
+  sounds[MESSAGE6_WAV] = Mix_LoadWAV(DATAFILE("nt_message6.wav"));
+  sounds[MESSAGE7_WAV] = Mix_LoadWAV(DATAFILE("nt_message7.wav"));
+  sounds[PHASER_WAV] = Mix_LoadWAV(DATAFILE("nt_phaser.wav"));
+  sounds[PHASER_OTHER_WAV] = Mix_LoadWAV(DATAFILE("nt_phaser_other.wav"));
+  sounds[PLASMA_HIT_WAV] = Mix_LoadWAV(DATAFILE("nt_plasma_hit.wav"));
+  sounds[PLASMA_KILL_WAV] = Mix_LoadWAV(DATAFILE("nt_plasma_kill.wav"));
+  sounds[RED_ALERT_WAV] = Mix_LoadWAV(DATAFILE("nt_red_alert.wav"));
+  sounds[SELF_DESTRUCT_WAV] = Mix_LoadWAV(DATAFILE("nt_self_destruct.wav"));
+  sounds[SHIELD_DOWN_WAV] = Mix_LoadWAV(DATAFILE("nt_shield_down.wav"));
+  sounds[SHIELD_UP_WAV] = Mix_LoadWAV(DATAFILE("nt_shield_up.wav"));
+  sounds[START_TMODE_WAV] = Mix_LoadWAV(DATAFILE("nt_start_tmode.wav"));
+  sounds[STOP_TMODE_WAV] = Mix_LoadWAV(DATAFILE("nt_stop_tmode.wav"));
+  sounds[TORP_HIT_WAV] = Mix_LoadWAV(DATAFILE("nt_torp_hit.wav"));
+  sounds[UNCLOAK_WAV] = Mix_LoadWAV(DATAFILE("nt_uncloak.wav"));
+  sounds[WARNING_WAV] = Mix_LoadWAV(DATAFILE("nt_warning.wav"));
 
   for (i=0; i < NUM_WAVES; i++) {
-    if (!newsounds[i]) {
-      LineToConsole("Mix_LoadWAV newsound[%d] could not be loaded. Check soundDir in your .netrekrc: %s\n", i, Mix_GetError());
+    if (!sounds[i]) {
+      LineToConsole("Mix_LoadWAV sounds[%d] could not be loaded. Check soundDir in your .netrekrc: %s\n", i, Mix_GetError());
       return(-1);
     }
   }
@@ -151,19 +100,19 @@
 int loadMusic(void) {
   int i;
 
-  newmusic[INTRO1_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_TOS.ogg"));
-  newmusic[INTRO2_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_TNG.ogg"));
-  newmusic[INTRO3_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_VOY.ogg"));
-  newmusic[INTRO4_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_DS9.ogg"));
-  newmusic[INTRO5_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_ST2.ogg"));
-  newmusic[END1_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_TOS.ogg"));
-  newmusic[END2_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_TNG.ogg"));
-  newmusic[END3_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_VOY.ogg"));
-  newmusic[END4_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_DS9.ogg"));
+  music[INTRO1_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_TOS.ogg"));
+  music[INTRO2_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_TNG.ogg"));
+  music[INTRO3_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_VOY.ogg"));
+  music[INTRO4_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_DS9.ogg"));
+  music[INTRO5_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_ST2.ogg"));
+  music[END1_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_TOS.ogg"));
+  music[END2_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_TNG.ogg"));
+  music[END3_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_VOY.ogg"));
+  music[END4_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_DS9.ogg"));
 
   for (i=0; i < NUM_MUSIC; i++) {
-    if (!newmusic[i]) {
-      LineToConsole("Mix_LoadMUS newmusic[%d] could not be loaded. Check soundDir in your .netrekrc: %s\n", i, Mix_GetError());
+    if (!music[i]) {
+      LineToConsole("Mix_LoadMUS music[%d] could not be loaded. Check soundDir in your .netrekrc: %s\n", i, Mix_GetError());
       return(-1);
     }
   }
@@ -177,11 +126,11 @@
     
     //Free the sound effects
     for (i = 0; i < NUM_WAVES; i++)
-    	Mix_FreeChunk(newsounds[i]);
+    	Mix_FreeChunk(sounds[i]);
 
     //Free the music
     for (i = 0; i < NUM_MUSIC; i++)
-        Mix_FreeMusic(newmusic[i]);
+        Mix_FreeMusic(music[i]);
     
     //Quit SDL_mixer
     Mix_CloseAudio();
@@ -190,18 +139,9 @@
     SDL_Quit();
 }
 
-extern void Exit_Sound (void)
-{
-    if (sound_init)
-        ExitSound ();
-    sound_init = 0;
-    sound_toggle = 0;
-}
-
-
 extern void Init_Sound (void)
 {
-    char buf[PATH_MAX];
+    int i;
 
 #ifdef DEBUG
     LineToConsole ("Init_Sound\n");
@@ -216,129 +156,78 @@
             }
             else
                 sounddir = "./sounds";
-        }
-        
-        if (newSound)
-        {
-            int i;
+        }       
 
 #ifdef DEBUG
-	    LineToConsole ("Init_Sound using SDL\n");
+        LineToConsole ("Init_Sound using SDL\n");
 #endif
 
-    	    /* Initialize the SDL library */
-    	    if (SDL_Init(SDL_INIT_AUDIO) < 0)
-      		LineToConsole("Couldn't initialize SDL: %s\n",SDL_GetError());
+        /* Initialize the SDL library */
+        if (SDL_Init(SDL_INIT_AUDIO) < 0)
+            LineToConsole("Couldn't initialize SDL: %s\n",SDL_GetError());
 
-    	    atexit(sound_cleanup);
+        atexit(sound_cleanup);
 
-    	    /* Open the audio device at 22050 Hz 8 bit Microsoft PCM with stereo */
-    	    if (Mix_OpenAudio(22050, AUDIO_S16SYS, 2, 1024) < 0)
-    	    {
-      		LineToConsole("Mix_OpenAudio: %s\n", Mix_GetError());
-      		sound_init = 0;
-      		return;
-    	    }
+        /* Open the audio device at 22050 Hz 8 bit Microsoft PCM with stereo */
+        if (Mix_OpenAudio(22050, AUDIO_S16SYS, 2, 1024) < 0)
+        {
+            LineToConsole("Mix_OpenAudio: %s\n", Mix_GetError());
+            sound_init = 0;
+            return;
+        }
 
-            /* Set sound and music volume to half (128 is MAXVOLUME) */
-            Mix_Volume(-1, 64);
-            Mix_VolumeMusic(64);
+        /* Set sound and music volume to half (128 is MAXVOLUME) */
+        Mix_Volume(-1, 64);
+        Mix_VolumeMusic(64);
 
-            /* Toggle on sound, and load sound files */
-      	    sound_toggle = 1;
-      	    loadSounds();
- 
-      	    /* Load music files, and play random intro music */
-      	    loadMusic();
-      	    i = RANDOM() % MUSIC_OFFSET;
-      	    Play_Music(i);
-      	    /* See if volume is adjustable */
-      	    CheckVolumeSettings ();
-      	    /* Default of 8 channels not enough */
-       	    Mix_AllocateChannels(16);
-        }
-        else
-        {
-            if (InitSound () == -1)
-            {
-                sound_toggle = 0;
-                sound_init = 0;
-            }
-            else
-            {
-                sound_init = 1;
-                sound_toggle = 1;
-                /* See if volume is adjustable */
-                CheckVolumeSettings ();
-            }
+        /* Toggle on sound, and load sound files */
+      	sound_toggle = 1;
+      	loadSounds();
 
-            strcpy (sound_prefix, sounddir);
-            strcat (sound_prefix, "/");
+      	/* Load music files, and play random intro music */
+      	loadMusic();
+        i = RANDOM() % MUSIC_OFFSET;
+        Play_Music(i);
 
-            if (sound_toggle)
-            {
-                strcpy (buf, sounddir);
-                strcat (buf, "/nt_intro");
-                StartSound (buf);
-            }
-        }
+      	/* Default of 8 channels not enough */
+       	Mix_AllocateChannels(16);
     }
 }
 
 extern void Play_Sound (int type)
 {
-    if (newSound)
-    {
-    	int channel;
+    int channel;
     	
-        if (!sound_init || !newSoundEffects || !sound_toggle)
-	    return;
+    if (!sound_init || !soundEffects || !sound_toggle)
+        return;
 
-        if ((type >= NUM_WAVES) || (type < 0))
-        {
-            LineToConsole("Invalid sound type %d\n", type);
-            return;
-        }
+    /*  Don't play other ship's sounds if turned off */
+    if (type > OTHER_SOUND_OFFSET && !sound_other)
+        return;
 
-        if ((channel = Mix_PlayChannel(-1, newsounds[type], 0)) < 0)
-        {
+    if ((type >= NUM_WAVES) || (type < 0))
+    {
+        LineToConsole("Invalid sound type %d\n", type);
+        return;
+    }
+
+    if ((channel = Mix_PlayChannel(-1, sounds[type], 0)) < 0)
+    {
 #ifdef DEBUG
-            /* Frequent occurence is more than 16 channels playing sound */
-            LineToConsole("Mix_PlayChannel: %s\n", Mix_GetError());
+        /* Frequent occurence is more than 16 channels playing sound */
+        LineToConsole("Mix_PlayChannel: %s\n", Mix_GetError());
 #endif
-            return;
-        }
-            
-        Group_Sound(type, channel);
+        return;
     }
-    else
-    {
-        char buf[PATH_MAX];
-
-        /*  Don't play other ship's sounds if turned off */
-        if (type > OTHER_SOUND_OFFSET && !sound_other)
-            return;
-
-        if (sound_toggle && sounds[type].flag &&
-        ((sounds[type].priority >= sounds[current_sound].priority) ||
-         !SoundPlaying ()))
-        {
-            STRNCPY (buf, sound_prefix, PATH_MAX);
-            strcat (buf, sounds[type].name);
-            StartSound (buf);
-            current_sound = type;
-        }
-
-        if (!(sound_toggle))
-            current_sound = NO_SOUND;
-     }
+            
+    Group_Sound(type, channel);
 }
 
 extern void Play_Sound_Loc (int type, int angle, int distance)
 {
     int channel;
     
-    if (!sound_init || !newSoundEffects || !sound_toggle)
+    if (!sound_init || !soundEffects || !sound_toggle)
         return;
 
     if ((type >= NUM_WAVES) || (type < 0))
@@ -347,7 +236,7 @@
         return;
     }
 
-    if ((channel = Mix_PlayChannel(-1, newsounds[type], 0)) < 0)
+    if ((channel = Mix_PlayChannel(-1, sounds[type], 0)) < 0)
     {
 #ifdef DEBUG
         /* Frequent occurence is more than 16 channels playing sound */
@@ -360,7 +249,7 @@
     	distance = 0;
     if (distance > 255)
     	distance = 255;
-    if (newSoundAngles)
+    if (soundAngles)
     {
         // Adjust volume with distance and angle
         if (Mix_SetPosition(channel, angle, distance) == 0)
@@ -383,10 +272,9 @@
     return;
 }
 
-/* Only works with SDL, i.e. newSound */
 extern void Play_Music (int type)
 {
-    if (!sound_init || !sound_toggle || !newSound || !newSoundMusic)
+    if (!sound_init || !sound_toggle || !soundMusic)
         return;
 
     if ((type >= NUM_MUSIC) || (type < 0))
@@ -395,19 +283,18 @@
         return;
     }
 
-    if (Mix_PlayMusic(newmusic[type], 1) < 0)
+    if (Mix_PlayMusic(music[type], 1) < 0)
     {
         LineToConsole("Mix_PlayMusic: %s\n", Mix_GetError());
         return;
     }
 }
 
-/* Only works with SDL, i.e. newSound */
 extern void Play_Music_Bkgd (void)
 {
     int i;
 
-    if (!sound_init || !sound_toggle || !newSound || !newSoundMusic || !newSoundMusicBkgd)
+    if (!sound_init || !sound_toggle || !soundMusic || !soundMusicBkgd)
         return;
 
     if (Mix_PlayingMusic())
@@ -415,14 +302,13 @@
 
     i = RANDOM() % NUM_MUSIC;
 
-    if (Mix_PlayMusic(newmusic[i], 1) < 0)
+    if (Mix_PlayMusic(music[i], 1) < 0)
     {
         LineToConsole("Mix_PlayMusic: %s\n", Mix_GetError());
         return;
     }
     /* So we play another one when done */
-    Mix_HookMusicFinished(Play_Music_Bkgd);
-    
+    Mix_HookMusicFinished(Play_Music_Bkgd);  
 }
 
 void Group_Sound (int type, int channel)
@@ -462,8 +348,7 @@
     }
 }
 
-/* Only works with SDL, i.e. newSound */
-extern void ChangeNewsoundVolume (int vol)
+extern void ChangeVolume (int vol)
 {
     int mvolume, volume;
     
@@ -484,48 +369,28 @@
     Mix_VolumeMusic(mvolume);
 }
 
-extern void Abort_Sound (int type)
-{
-    if ((current_sound != NO_SOUND) && (type == current_sound))
-        StopSound ();
-}
-
-
 /* Sound options window stuff */
 
 #define SOUND_TOGGLE  0
-#define SOUND_OTHER   MESSAGE_SOUND + 1
-#define SOUND_INIT    MESSAGE_SOUND + 2
-#define SOUND_DONE    MESSAGE_SOUND + 3
-
-#define SDL_EFFECTS_TOGGLE 1
-#define SDL_MUSIC_TOGGLE 2
-#define SDL_MUSIC_BKGD 3
-#define SDL_SOUND_ANGLE 4
-#define SDL_SOUND_DONE 5
-
-static void soundrefresh (int i);
-static void sdlsoundrefresh (int i);
+#define EFFECTS_TOGGLE 1
+#define MUSIC_TOGGLE 2
+#define MUSIC_BKGD 3
+#define SOUND_ANGLE 4
+#define SOUND_OTHER 5
+#define SOUND_DONE 6
 
 extern void soundwindow (void)
 {
     int i;
-    if (newSound)
-    {
-        for (i = 0; i <= SDL_SOUND_DONE; i++)
-            sdlsoundrefresh (i);
-    }
-    else
-    {
-        for (i = 0; i <= SOUND_DONE; i++)
-            soundrefresh (i);
-    }
+
+    for (i = 0; i <= SOUND_DONE; i++)
+        soundrefresh (i);
+
     /* Map window */
     W_MapWindow (soundWin);
 }
 
-
-static void sdlsoundrefresh (int i)
+static void soundrefresh (int i)
 {
     char buf[BUFSIZ];
 
@@ -534,134 +399,30 @@
         sprintf (buf, "Sound is turned %s",
                  (sound_toggle == 1) ? "ON" : "OFF");
     }
-    else if (i == SDL_EFFECTS_TOGGLE)
+    else if (i == EFFECTS_TOGGLE)
     {
         sprintf (buf, "Sound effects are turned %s",
-                 (newSoundEffects == 1) ? "ON" : "OFF");
+                 (soundEffects == 1) ? "ON" : "OFF");
     }
-    else if (i == SDL_MUSIC_TOGGLE)
+    else if (i == MUSIC_TOGGLE)
     {
         sprintf (buf, "Music is turned %s",
-                 (newSoundMusic == 1) ? "ON" : "OFF");
+                 (soundMusic == 1) ? "ON" : "OFF");
     }
-    else if (i == SDL_MUSIC_BKGD)
+    else if (i == MUSIC_BKGD)
     {
         sprintf (buf, "Background music is turned %s",
-                 (newSoundMusicBkgd == 1) ? "ON" : "OFF");
+                 (soundMusicBkgd == 1) ? "ON" : "OFF");
     }
-    else if (i == SDL_SOUND_ANGLE)
+    else if (i == SOUND_ANGLE)
     {
         sprintf (buf, "Angular sound is turned %s",
-                 (newSoundAngles) ? "ON" : "OFF");
-    }
-    else if (i == SDL_SOUND_DONE)
-    {
-        strcpy (buf, "Done");
-    }
-    else
-    {
-        LineToConsole ("Uh oh, bogus refresh number in sdlsoundrefresh\n");
-    }
-
-    W_WriteText (soundWin, 0, i, textColor, buf, strlen (buf), 0);
-}
-
-static void soundrefresh (int i)
-{
-    char buf[BUFSIZ], *flag;
-
-    if (i == SOUND_TOGGLE)
-    {
-        sprintf (buf, "Sound is turned %s",
-                 (sound_toggle == 1) ? "ON" : "OFF");
-    }
-    else if (i < SOUND_OTHER)
-    {
-        flag = ((sounds[i].flag == 1) ? "ON" : "OFF");
-        switch (i)
-        {
-        case CLOAK_SOUND:
-            sprintf (buf, "Cloak sound is %s", flag);
-            break;
-        case UNCLOAK_SOUND:
-            sprintf (buf, "Uncloak sound is %s", flag);
-            break;
-        case ENGINE_SOUND:
-            sprintf (buf, "Engine sound is not supported");
-            /* sprintf (buf, "Engine sound is %s",  flag); */
-            break;
-        case ENTER_SHIP_SOUND:
-            sprintf (buf, "Enter ship sound is %s", flag);
-            break;
-        case ENTER_WARP_SOUND:
-            sprintf (buf, "Enter warp sound is %s", flag);
-            break;
-        case EXIT_WARP_SOUND:
-            sprintf (buf, "Exit warp sound is %s", flag);
-            break;
-        case EXPLOSION_SOUND:
-            sprintf (buf, "Explosion sound is %s", flag);
-            break;
-        case BASE_EXPLOSION_SOUND:
-            sprintf (buf, "Base explosion sound is %s", flag);
-            break;
-        case FIRE_TORP_SOUND:
-            sprintf (buf, "Fire torp sound is %s", flag);
-            break;
-        case MESSAGE_SOUND:
-            sprintf (buf, "Message sound is %s", flag);
-            break;
-        case PHASER_SOUND:
-            sprintf (buf, "Phaser sound is %s", flag);
-            break;
-        case WARNING_SOUND:
-            sprintf (buf, "Warning sound is %s", flag);
-            break;
-        case RED_ALERT_SOUND:
-            sprintf (buf, "Red alert sound is %s", flag);
-            break;
-        case SHIELD_DOWN_SOUND:
-            sprintf (buf, "Shield down sound is %s", flag);
-            break;
-        case SHIELD_UP_SOUND:
-            sprintf (buf, "Shield up sound is %s", flag);
-            break;
-        case START_TMODE_SOUND:
-            sprintf (buf, "Start tmode sound is %s", flag);
-            break;
-        case STOP_TMODE_SOUND:
-            sprintf (buf, "Stop tmode sound is %s", flag);
-            break;
-        case TORP_HIT_SOUND:
-            sprintf (buf, "Torp hit sound is %s", flag);
-            break;
-        case SELF_DESTRUCT_SOUND:
-            sprintf (buf, "Self destruct sound is %s", flag);
-            break;
-        case FIRE_PLASMA_SOUND:
-            sprintf (buf, "Fire plasma sound is %s", flag);
-            break;
-        case PLASMA_HIT_SOUND:
-            sprintf (buf, "Plasma hit sound is %s", flag);
-            break;
-        case PLASMA_KILL_SOUND:
-            sprintf (buf, "Plasma kill sound is %s", flag);
-            break;
-        }
+                 (soundAngles) ? "ON" : "OFF");
     }
     else if (i == SOUND_OTHER)
     {
-        if (sound_other)
-            strcpy (buf, "Other ship's sound is ON");
-        else
-            strcpy (buf, "Other ship's sound is OFF");
-    }
-    else if (i == SOUND_INIT)
-    {
-        if (sound_init)
-            strcpy (buf, "Restart external sound player");
-        else
-            strcpy (buf, "Initialize external sound player");
+        sprintf (buf, "Other ship's sound is turned %s",
+                 (sound_other) ? "ON" : "OFF");
     }
     else if (i == SOUND_DONE)
     {
@@ -675,7 +436,7 @@
     W_WriteText (soundWin, 0, i, textColor, buf, strlen (buf), 0);
 }
 
-void sdlsoundaction (W_Event * data)
+void soundaction (W_Event * data)
 {
     int i;
 
@@ -691,96 +452,43 @@
             Mix_HaltChannel(-1);
             Mix_HaltMusic();
         }
-        sdlsoundrefresh (SOUND_TOGGLE);
+        soundrefresh (SOUND_TOGGLE);
     }
-    else if (i == SDL_EFFECTS_TOGGLE)
+    else if (i == EFFECTS_TOGGLE)
     {
     	if (sound_init)
-            newSoundEffects = (newSoundEffects) ? 0 : 1;
-        if (!newSoundEffects)
+            soundEffects = (soundEffects) ? 0 : 1;
+        if (!soundEffects)
             Mix_HaltChannel(-1);
-    	sdlsoundrefresh (SDL_EFFECTS_TOGGLE);
+    	soundrefresh (EFFECTS_TOGGLE);
     }
-    else if (i == SDL_MUSIC_TOGGLE)
+    else if (i == MUSIC_TOGGLE)
     {
     	if (sound_init)
-            newSoundMusic = (newSoundMusic) ? 0 : 1;
-        if (!newSoundMusic)
+            soundMusic = (soundMusic) ? 0 : 1;
+        if (!soundMusic)
             Mix_HaltMusic();
-    	sdlsoundrefresh (SDL_MUSIC_TOGGLE);
+    	soundrefresh (MUSIC_TOGGLE);
     }
-    else if (i == SDL_MUSIC_BKGD)
+    else if (i == MUSIC_BKGD)
     {
     	if (sound_init)
-    	    newSoundMusicBkgd = (newSoundMusicBkgd) ? 0 : 1;
-    	if (!newSoundMusicBkgd)
+    	    soundMusicBkgd = (soundMusicBkgd) ? 0 : 1;
+    	if (!soundMusicBkgd)
     	    Mix_HaltMusic();
     	else
     	    Play_Music_Bkgd();
-    	sdlsoundrefresh (SDL_MUSIC_BKGD);
-    }
-    else if (i == SDL_SOUND_ANGLE)
-    {
-    	newSoundAngles = (newSoundAngles) ? 0 : 1;
-    	sdlsoundrefresh (SDL_SOUND_ANGLE);
-    }
-    else
-    {
-        sounddone ();
-    }
-}
-
-
-void soundaction (W_Event * data)
-{
-    int i, j;
-
-    i = data->y;
-
-    if (i == SOUND_TOGGLE)
-    {
-        if (sound_init)
-            sound_toggle = (sound_toggle == 1) ? 0 : 1;
-        soundrefresh (SOUND_TOGGLE);
-        if (!sound_toggle)
-        {
-            Abort_Sound (ENGINE_SOUND);
-        }
-        else
-        {
-            Play_Sound (ENGINE_SOUND);
-        }
+    	soundrefresh (MUSIC_BKGD);
     }
-    else if (i < SOUND_OTHER)
+    else if (i == SOUND_ANGLE)
     {
-        sounds[i].flag = (sounds[i].flag == 1) ? 0 : 1;
-        if (i + OTHER_SOUND_OFFSET <= NUM_SOUNDS)
-            sounds[i + OTHER_SOUND_OFFSET].flag = sounds[i].flag;
-
-        soundrefresh (i);
-        Play_Sound (i);
-        if (i == MESSAGE_SOUND)
-        {
-            for (j = MESSAGE1_SOUND; j <= MESSAGE9_SOUND; j++)
-                sounds[j].flag = sounds[MESSAGE_SOUND].flag;
-        }
-        /* case ENGINE: st_engine = (st_engine == 1) ? 0 : 0; soundrefresh
-         * (ENGINE); if (st_engine && sound_toggle) { Play_Sound
-         * (ENGINE_SOUND); } else { Abort_Sound (ENGINE_SOUND); } break; */
-
+    	soundAngles = (soundAngles) ? 0 : 1;
+    	soundrefresh (SOUND_ANGLE);
     }
     else if (i == SOUND_OTHER)
     {
-        sound_other = !sound_other;
-        soundrefresh (SOUND_OTHER);
-    }
-    else if (i == SOUND_INIT)
-    {
-        Exit_Sound ();
-        sound_init = 1;
-        Init_Sound ();
-        soundrefresh (SOUND_INIT);
-        soundrefresh (SOUND_TOGGLE);
+    	sound_other = (sound_other) ? 0 : 1;
+    	soundrefresh (SOUND_OTHER);
     }
     else
     {
@@ -788,6 +496,7 @@
     }
 }
 
+
 extern void sounddone (void)
 {
     W_UnmapWindow (soundWin);

Index: newwin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- newwin.c	21 Feb 2007 15:17:06 -0000	1.47
+++ newwin.c	28 Feb 2007 09:35:20 -0000	1.48
@@ -927,6 +927,14 @@
     W_SetWindowButtonHandler (spWin, spaction);
 #endif
 
+#if defined(SOUND)
+    soundWin = W_MakeMenu("sound", WINSIDE + 20, -BORDER + 10, 33,
+                        7, NULL, 2);
+    W_SetWindowKeyDownHandler(soundWin, soundaction);
+    W_SetWindowButtonHandler(soundWin, soundaction);
+    W_DefineArrowCursor(soundWin);
+#endif
+
 #ifdef TOOLS
     toolsWin = W_MakeScrollingWindow ("tools", WINSIDE + BORDER, BORDER,
                                         80, TOOLSWINLEN, NULL, BORDER);
@@ -1002,33 +1010,6 @@
     getResources (progname);
 }
 
-#if defined(SOUND)
-/******************************************************************************/
-/***  newsoundwin() - Need to map it after reset_defaults, so pulled out of newwin
-/******************************************************************************/
-void
-newsoundwin (char *hostmon,
-        char *progname)
-{
-    if (newSound)
-    {
-        soundWin = W_MakeMenu("sound", WINSIDE + 20, -BORDER + 10, 33,
-                        6, NULL, 2);
-        W_SetWindowKeyDownHandler(soundWin, sdlsoundaction);
-        W_SetWindowButtonHandler(soundWin, sdlsoundaction);
-        W_DefineArrowCursor(soundWin);
-    }
-    else
-    {
-        soundWin = W_MakeMenu("sound", WINSIDE + 20, -BORDER + 10, 30,
-			MESSAGE_SOUND + 4, NULL, 2);
-        W_SetWindowKeyDownHandler(soundWin, soundaction);
-        W_SetWindowButtonHandler(soundWin, soundaction);
-        W_DefineArrowCursor(soundWin);
-    }
-}
-#endif
-
 /******************************************************************************/
 /***  mapAll()
 /******************************************************************************/

Index: input.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- input.c	28 Feb 2007 07:44:00 -0000	1.24
+++ input.c	28 Feb 2007 09:35:20 -0000	1.25
@@ -28,9 +28,6 @@
 #include "spopt.h"
 #include "map.h"
 #include "proto.h"
-#ifdef SOUND
-#include "audio.h"
-#endif
 
 #ifdef __BORLANDC__
 #ifndef CYGWIN
@@ -1521,10 +1518,7 @@
             /* Here we will have to enter message_on () followed by
                smessage to player */
 #ifdef SOUND
-            if (newSound)
-                Play_Sound(MESSAGE_WAV);
-            else
-                Play_Sound(MESSAGE_SOUND);
+            Play_Sound(MESSAGE_WAV);
 #endif
             message_on ();
             data->key = players[target->o_num].p_mapchars[1];
@@ -1538,10 +1532,7 @@
             /* Here we will have to enter message_on () followed by
                smessage to player */
 #ifdef SOUND
-            if (newSound)
-                Play_Sound(MESSAGE_WAV);
-            else
-                Play_Sound(MESSAGE_SOUND);
+            Play_Sound(MESSAGE_WAV);
 #endif
             message_on ();
             data->key = 'T';
@@ -1555,10 +1546,7 @@
            /* Here we will have to enter message_on () followed by
               smessage to player */
 #ifdef SOUND
-           if (newSound)
-               Play_Sound(MESSAGE_WAV);
-           else
-               Play_Sound(MESSAGE_SOUND);
+           Play_Sound(MESSAGE_WAV);
 #endif
            message_on ();
            data->key = 'A';
@@ -2765,10 +2753,7 @@
 {
 
 #ifdef SOUND
-    if (newSound)
-        Play_Sound(SELF_DESTRUCT_WAV);
-    else
-        Play_Sound(SELF_DESTRUCT_SOUND);
+    Play_Sound(SELF_DESTRUCT_WAV);
 #endif
 
     sendQuitReq ();
@@ -2849,10 +2834,7 @@
 Key86 (void)
 {
 #ifdef SOUND
-    if (newSound)
-        ChangeNewsoundVolume (1);
-    else
-        ChangeVolume (1);
+    ChangeVolume (1);
 #else
     emptyKey ();
 #endif
@@ -3196,10 +3178,7 @@
 {
 
 #ifdef SOUND
-    if (newSound)
-        Play_Sound(MESSAGE_WAV);
-    else
-        Play_Sound(MESSAGE_SOUND);
+    Play_Sound(MESSAGE_WAV);
 #endif
 
     message_on ();
@@ -3263,10 +3242,7 @@
 {
 
 #ifdef SOUND
-    if (newSound)
-        Play_Sound(SELF_DESTRUCT_WAV);
-    else
-        Play_Sound(SELF_DESTRUCT_SOUND);
+    Play_Sound(SELF_DESTRUCT_WAV);
 #endif
 
     fastQuit = 1;
@@ -3331,10 +3307,7 @@
 Key118 (W_Event * data)
 {
 #ifdef SOUND
-    if (newSound)
-        ChangeNewsoundVolume (-1);
-    else
-        ChangeVolume (-1);
+    ChangeVolume (-1);
 #else
     emptyKey ();
 #endif

Index: local.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- local.c	28 Feb 2007 07:44:00 -0000	1.63
+++ local.c	28 Feb 2007 09:35:20 -0000	1.64
@@ -641,7 +641,7 @@
     const int view = SCALE * WINSIDE / 2 + BMP_SHIELD_WIDTH * SCALE / 2;
     int dx, dy, px, py, wx, wy, tx, ty, lx, ly;
     int new_dx, new_dy;
-    int newdx, newdy, distance, angle; /* For newSound */
+    int newdx, newdy, distance, angle;
 
     W_Icon (*ship_bits)[SHIP_VIEWS];
     W_Icon (*ship_bitsHR);
@@ -659,7 +659,6 @@
 
 /* Twarp sounds put up here so observers can hear them */            
 #ifdef SOUND
-
        /* Have to use me->p_flags because server doesn't send us twarp flag info
         on other players.  Current Vanilla does not let observer change players
         if the player they are observing is transwarping. */
@@ -674,27 +673,17 @@
         {
             if (warpchange && (j->p_flags & PFTWARP))
             {
-            	if (newSound) // Kill any channels with ENTER_WARP_WAV or EXIT_WARP_WAV (group 3)
-	    	{
-	    	    Mix_HaltGroup(3);
-	            Play_Sound(ENTER_WARP_WAV);
-	        }
-	        else
-	            Play_Sound(ENTER_WARP_SOUND);
-	                
+            	// Kill any channels with ENTER_WARP_WAV or EXIT_WARP_WAV (group 3)
+	    	Mix_HaltGroup(3);
+	        Play_Sound(ENTER_WARP_WAV);                
 	        warpchange = 0;
 	    }
 	    if (warpchange && !(j->p_flags & PFTWARP))
 	    {
-	    	if (newSound) // Kill any channels with ENTER_WARP_WAV or EXIT_WARP_WAV (group 3)
-	    	{
-	    	    Mix_HaltGroup(3);
-	    	    Play_Sound(EXIT_WARP_WAV);
-	    	}
-	        else
-	            Play_Sound(EXIT_WARP_SOUND);
-	                
-	            warpchange = 0;
+	    	// Kill any channels with ENTER_WARP_WAV or EXIT_WARP_WAV (group 3)
+	    	Mix_HaltGroup(3);
+	    	Play_Sound(EXIT_WARP_WAV);
+	        warpchange = 0;
 	    }
 	}
 #endif
@@ -733,36 +722,28 @@
                 {
                     // To avoid hearing twarp cloak sounds as the twarper/observer
                     if ( (myPlayer(j) || isObsLockPlayer(j)) ? ((me->p_flags & PFTWARP) ? 0 : 1) : 1 )
-                    {
-                        if (newSound)
-                        {               
-                            newdx = dx - WINSIDE/2;
-                            newdy = dy - WINSIDE/2;
-                        
-                            distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
-                            // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
-                            // which would be a diagonal from player to corner of tactical
-                            // Reason for normalization is Mix_SetDistance requires that range        
-                            distance = (int)((255 * distance)/CORNER_DIST);
-                            // Calculate angle, then adjust as necessary for Mix_SetDistance
-                            if (distance != 0)
-                            {
-                                angle = (int)(atan2(-newdy, newdx)*180/XPI);
-                                angle = 90 - angle;
-                            }
-                            else
-                                angle = 0;
-                            // At short distances, don't use angular sound
-                            if (distance < SCALE/2)
-                                Play_Sound(CLOAKED_WAV);
-                            else
-                                Play_Sound_Loc(CLOAKED_WAV, angle, distance);
-                        }
-                        else
+                    {            
+                        newdx = dx - WINSIDE/2;
+                        newdy = dy - WINSIDE/2;
+
+                        distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
+                        // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
+                        // which would be a diagonal from player to corner of tactical
+                        // Reason for normalization is Mix_SetDistance requires that range        
+                        distance = (int)((255 * distance)/CORNER_DIST);
+                        // Calculate angle, then adjust as necessary for Mix_SetDistance
+                        if (distance != 0)
                         {
-                            if (myPlayer(j) || isObsLockPlayer(j))
-                                Play_Sound(CLOAK_SOUND);
+                            angle = (int)(atan2(-newdy, newdx)*180/XPI);
+                            angle = 90 - angle;
                         }
+                        else
+                            angle = 0;
+                        // At short distances, don't use angular sound
+                        if (distance < SCALE/2)
+                            Play_Sound(CLOAKED_WAV);
+                        else
+                            Play_Sound_Loc(CLOAKED_WAV, angle, distance);
                     }
                 }
 #endif
@@ -779,45 +760,32 @@
                 // To avoid twarp cloak sounds as the twarper/observer
                 if ( (myPlayer(j) || isObsLockPlayer(j)) ? ((me->p_flags & PFTWARP) ? 0 : 1) : 1 )
                 {
-                    if (newSound)
+                    if (j->p_cloakphase == cloak_phases - 1)
                     {
-                        if (j->p_cloakphase == cloak_phases - 1)
-                        {
-                            newdx = dx - WINSIDE/2;
-                            newdy = dy - WINSIDE/2;
+                        newdx = dx - WINSIDE/2;
+                        newdy = dy - WINSIDE/2;
                         
-                            distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
-                            // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
-                            // which would be a diagonal from player to corner of tactical
-                            // Reason for normalization is Mix_SetDistance requires that range        
-                            distance = (int)((255 * distance)/CORNER_DIST);
-                            // Calculate angle, then adjust as necessary for Mix_SetDistance
-                            if (distance != 0)
-                            {
-                                angle = (int)(atan2(-newdy, newdx)*180/XPI);
-                                angle = 90 - angle;
-                            }
-                            else
-                                angle = 0;
-                             // At short distances, don't use angular sound
-                            if (distance < SCALE/2)
-                                Play_Sound(UNCLOAK_WAV);
-                            else
-                                Play_Sound_Loc(UNCLOAK_WAV, angle, distance);
-                        }
-                        else    // Kill any channels with CLOAKED_WAV on them (group 1)
-                            Mix_HaltGroup(1);
-                    }
-                    else
-                    {
-                        if (myPlayer(j) || isObsLockPlayer(j))
+                        distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
+                        // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
+                        // which would be a diagonal from player to corner of tactical
+                        // Reason for normalization is Mix_SetDistance requires that range        
+                        distance = (int)((255 * distance)/CORNER_DIST);
+                        // Calculate angle, then adjust as necessary for Mix_SetDistance
+                        if (distance != 0)
                         {
-                            if (j->p_cloakphase == cloak_phases - 1)
-                                Play_Sound(UNCLOAK_SOUND);
-                            else
-                                Abort_Sound(CLOAK_SOUND);
+                            angle = (int)(atan2(-newdy, newdx)*180/XPI);
+                            angle = 90 - angle;
                         }
+                        else
+                            angle = 0;
+                         // At short distances, don't use angular sound
+                        if (distance < SCALE/2)
+                            Play_Sound(UNCLOAK_WAV);
+                        else
+                            Play_Sound_Loc(UNCLOAK_WAV, angle, distance);
                     }
+                    else    // Kill any channels with CLOAKED_WAV on them (group 1)
+                        Mix_HaltGroup(1);
                 }            
 #endif
 
@@ -1055,25 +1023,15 @@
             {
                 if ((sound_flags & PFSHIELD) && !(j->p_flags & PFSHIELD))
                 {
-                    if (newSound)
-                    {
-                        // Kill any channels with SHIELD_UP/DOWN_WAV on them (group 4)
-                        Mix_HaltGroup(4);
-                        Play_Sound(SHIELD_DOWN_WAV);
-                    }
-                    else
-                        Play_Sound(SHIELD_DOWN_SOUND);
+                    // Kill any channels with SHIELD_UP/DOWN_WAV on them (group 4)
+                    Mix_HaltGroup(4);
+                    Play_Sound(SHIELD_DOWN_WAV);
                 }
                 if (!(sound_flags & PFSHIELD) && (j->p_flags & PFSHIELD))
                 {
-                    if (newSound)
-                    {
-                        // Kill any channels with SHIELD_UP/DOWN_WAV on them (group 4)
-                        Mix_HaltGroup(4);
-                        Play_Sound(SHIELD_UP_WAV);
-                    }
-                    else
-                        Play_Sound(SHIELD_UP_SOUND);
+                    // Kill any channels with SHIELD_UP/DOWN_WAV on them (group 4)
+                    Mix_HaltGroup(4);
+                    Play_Sound(SHIELD_UP_WAV);
                 }
             }
 #endif
@@ -1330,60 +1288,48 @@
 #ifdef SOUND
             if (j->p_explode == 1)
             {
-                if (newSound)
+                if (myPlayer(j) || isObsLockPlayer(j))
                 {
-                    if (myPlayer(j) || isObsLockPlayer(j))
+                 if (j->p_ship.s_type == STARBASE)
+                     Play_Sound(BASE_EXPLOSION_WAV);
+                 else
+                     Play_Sound(EXPLOSION_WAV);
+                }
+                else
+                {
+                    int newdx, newdy, distance, angle;
+
+                    newdx = dx - WINSIDE/2;
+                    newdy = dy - WINSIDE/2;
+
+                    distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
+                    // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
+                    // which would be a diagonal from player to corner of tactical
+                    // Reason for normalization is Mix_SetDistance requires that range        
+                    distance = (int)((255 * distance)/CORNER_DIST);
+                    // Calculate angle, then adjust as necessary for Mix_SetDistance
+                    if (distance != 0)
                     {
-                    	if (j->p_ship.s_type == STARBASE)
-                    	    Play_Sound(BASE_EXPLOSION_WAV);
-                    	else
-                            Play_Sound(EXPLOSION_WAV);
+                        angle = (int)(atan2(-newdy, newdx)*180/XPI);
+                        angle = 90 - angle;
                     }
                     else
+                        angle = 0;
+                    // At short distances, don't use angular sound
+                    if (distance < SCALE/2)
                     {
-                        int newdx, newdy, distance, angle;
-                    
-                        newdx = dx - WINSIDE/2;
-                        newdy = dy - WINSIDE/2;
-                        
-                        distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
-                        // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
-                        // which would be a diagonal from player to corner of tactical
-                        // Reason for normalization is Mix_SetDistance requires that range        
-                        distance = (int)((255 * distance)/CORNER_DIST);
-                        // Calculate angle, then adjust as necessary for Mix_SetDistance
-                        if (distance != 0)
-                        {
-                            angle = (int)(atan2(-newdy, newdx)*180/XPI);
-                            angle = 90 - angle;
-                        }
-                        else
-                            angle = 0;
-                        // At short distances, don't use angular sound
-                        if (distance < SCALE/2)
-                        {
-                            if (j->p_ship.s_type == STARBASE)
-                    	        Play_Sound(BASE_EXPLOSION_WAV);
-                    	    else
-                                Play_Sound(EXPLOSION_OTHER_WAV);
-                        }
-                        else
-                        {
-                            if (j->p_ship.s_type == STARBASE)
-                    	        Play_Sound_Loc(BASE_EXPLOSION_WAV, angle, distance);
-                    	    else
-                                Play_Sound_Loc(EXPLOSION_OTHER_WAV, angle, distance);
-                        }
+                        if (j->p_ship.s_type == STARBASE)
+                            Play_Sound(BASE_EXPLOSION_WAV);
+                    	else
+                            Play_Sound(EXPLOSION_OTHER_WAV);
                     }
-                }
-                else
-                {
-                    if (j->p_ship.s_type == STARBASE)
-                        Play_Sound(BASE_EXPLOSION_SOUND);
-                    else if (myPlayer(j) || isObsLockPlayer(j))
-                        Play_Sound(EXPLOSION_SOUND);
                     else
-                        Play_Sound(OTHER_EXPLOSION_SOUND);
+                    {
+                        if (j->p_ship.s_type == STARBASE)
+                    	    Play_Sound_Loc(BASE_EXPLOSION_WAV, angle, distance);
+                    	else
+                            Play_Sound_Loc(EXPLOSION_OTHER_WAV, angle, distance);
+                    }
                 }
             }
 #endif
@@ -1433,41 +1379,34 @@
 #ifdef SOUND
             if (php->sound_phaser)
             {           
-                if (newSound)
+                if (myPlayer(j) || isObsLockPlayer(j))
+                    Play_Sound(PHASER_WAV);
+                else
                 {
-                    if (myPlayer(j) || isObsLockPlayer(j))
-                        Play_Sound(PHASER_WAV);
-                    else
+                    int newdx, newdy, distance, angle;
+
+                    newdx = dx - WINSIDE/2;
+                    newdy = dy - WINSIDE/2;
+
+                    distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
+                    // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
+                    // which would be a diagonal from player to corner of tactical
+                    // Reason for normalization is Mix_SetDistance requires that range        
+                    distance = (int)((255 * distance)/CORNER_DIST);
+                    // Calculate angle, then adjust as necessary for Mix_SetDistance
+                    if (distance != 0)
                     {
-                        int newdx, newdy, distance, angle;
-                    
-                        newdx = dx - WINSIDE/2;
-                        newdy = dy - WINSIDE/2;
-                        
-                        distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
-                        // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
-                        // which would be a diagonal from player to corner of tactical
-                        // Reason for normalization is Mix_SetDistance requires that range        
-                        distance = (int)((255 * distance)/CORNER_DIST);
-                        // Calculate angle, then adjust as necessary for Mix_SetDistance
-                        if (distance != 0)
-                        {
-                            angle = (int)(atan2(-newdy, newdx)*180/XPI);
-                            angle = 90 - angle;
-                        }
-                        else
-                            angle = 0;
-                        // At short distances, don't use angular sound
-                        if (distance < SCALE/2)
-                            Play_Sound(PHASER_OTHER_WAV);
-                        else
-                            Play_Sound_Loc(PHASER_OTHER_WAV, angle, distance);
+                        angle = (int)(atan2(-newdy, newdx)*180/XPI);
+                        angle = 90 - angle;
                     }
+                    else
+                        angle = 0;
+                    // At short distances, don't use angular sound
+                    if (distance < SCALE/2)
+                        Play_Sound(PHASER_OTHER_WAV);
+                    else
+                        Play_Sound_Loc(PHASER_OTHER_WAV, angle, distance);
                 }
-                else
-                    Play_Sound((myPlayer(j) || isObsLockPlayer(j))
-                               ? PHASER_SOUND : OTHER_PHASER_SOUND);
-                
                 php->sound_phaser = 0;
             }
 #endif
@@ -1870,7 +1809,7 @@
             }
 
 #ifdef SOUND
-            if (j != me && newSound)
+            if (j != me)
             {
             	int new_angle;
 		int newdy, newdx;
@@ -1922,34 +1861,29 @@
 #ifdef SOUND
                 if (k->t_fuse == (MAX(2, BMP_TORPDET_FRAMES * server_ups / 10) - 1))
                 {
-                    if (newSound)
+                    int newdx, newdy, distance, angle;
+
+                    newdx = dx - WINSIDE/2;
+                    newdy = dy - WINSIDE/2;
+
+                    distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
+                    // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
+                    // which would be a diagonal from player to corner of tactical
+                    // Reason for normalization is Mix_SetDistance requires that range        
+                    distance = (int)((255 * distance)/CORNER_DIST);
+                    // Calculate angle, then adjust as necessary for Mix_SetDistance
+                    if (distance != 0)
                     {
-                        int newdx, newdy, distance, angle;
-                    
-                        newdx = dx - WINSIDE/2;
-                        newdy = dy - WINSIDE/2;
-                        
-                        distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
-                        // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
-                        // which would be a diagonal from player to corner of tactical
-                        // Reason for normalization is Mix_SetDistance requires that range        
-                        distance = (int)((255 * distance)/CORNER_DIST);
-                        // Calculate angle, then adjust as necessary for Mix_SetDistance
-                        if (distance != 0)
-                        {
-                            angle = (int)(atan2(-newdy, newdx)*180/XPI);
-                            angle = 90 - angle;
-                        }
-                        else
-                            angle = 0;
-                        // At short distances, don't use angular sound
-                        if (distance < SCALE/2)
-                            Play_Sound(TORP_HIT_WAV);
-                        else
-                            Play_Sound_Loc(TORP_HIT_WAV, angle, distance);
+                        angle = (int)(atan2(-newdy, newdx)*180/XPI);
+                        angle = 90 - angle;
                     }
                     else
-                        Play_Sound(TORP_HIT_SOUND);
+                        angle = 0;
+                    // At short distances, don't use angular sound
+                    if (distance < SCALE/2)
+                        Play_Sound(TORP_HIT_WAV);
+                    else
+                        Play_Sound_Loc(TORP_HIT_WAV, angle, distance);
                 }
 #endif
                 if (colorWeapons)
@@ -2137,7 +2071,7 @@
 
 
 #ifdef SOUND
-        if (pt->pt_owner != me->p_no && newSound)
+        if (pt->pt_owner != me->p_no)
         {
             int new_angle;
             int newdy, newdx;
@@ -2189,34 +2123,29 @@
 #ifdef SOUND
             if (pt->pt_fuse == (MAX(2, BMP_TORPDET_FRAMES * server_ups / 10) - 1))
             {
-                if (newSound)
+                int newdx, newdy, distance, angle;
+
+                newdx = dx - WINSIDE/2;
+                newdy = dy - WINSIDE/2;
+    
+                distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
+                // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
+                // which would be a diagonal from player to corner of tactical
+                // Reason for normalization is Mix_SetDistance requires that range        
+                distance = (int)((255 * distance)/CORNER_DIST);
+                // Calculate angle, then adjust as necessary for Mix_SetDistance
+                if (distance != 0)
                 {
-                    int newdx, newdy, distance, angle;
-                    
-                    newdx = dx - WINSIDE/2;
-                    newdy = dy - WINSIDE/2;
-                        
-                    distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
-                    // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
-                    // which would be a diagonal from player to corner of tactical
-                    // Reason for normalization is Mix_SetDistance requires that range        
-                    distance = (int)((255 * distance)/CORNER_DIST);
-                    // Calculate angle, then adjust as necessary for Mix_SetDistance
-                    if (distance != 0)
-                    {
-                        angle = (int)(atan2(-newdy, newdx)*180/XPI);
-                        angle = 90 - angle;
-                    }
-                    else
-                        angle = 0;
-                    // At short distances, don't use angular sound
-                    if (distance < SCALE/2)
-                        Play_Sound(PLASMA_HIT_WAV);
-                    else
-                        Play_Sound_Loc(PLASMA_HIT_WAV, angle, distance);
+                    angle = (int)(atan2(-newdy, newdx)*180/XPI);
+                    angle = 90 - angle;
                 }
                 else
-                    Play_Sound(PLASMA_HIT_SOUND);
+                    angle = 0;
+                // At short distances, don't use angular sound
+                if (distance < SCALE/2)
+                    Play_Sound(PLASMA_HIT_WAV);
+                else
+                    Play_Sound_Loc(PLASMA_HIT_WAV, angle, distance);
             }
 #endif
 
@@ -2521,14 +2450,8 @@
             W_ChangeBorder (baseWin, gColor);
 
 #if defined(SOUND)
-            if (newSound) // Kill any channels with WARNING_WAV or RED_ALERT_WAV (group 2)
-                Mix_HaltGroup(2);
-            else
-            {
-                Abort_Sound(WARNING_SOUND);
-                Abort_Sound(RED_ALERT_SOUND);
-            }
-                
+            // Kill any channels with WARNING_WAV or RED_ALERT_WAV (group 2)
+            Mix_HaltGroup(2);
 #endif
 
             break;
@@ -2544,18 +2467,9 @@
             W_ChangeBorder (baseWin, yColor);
 
 #if defined(SOUND)
-
-            if (newSound) // Kill any channels with RED_ALERT_WAV (group 2)
-            {
-            	Mix_HaltGroup(2);
-                Play_Sound(WARNING_WAV);
-            }
-            else
-            {
-            	Abort_Sound(RED_ALERT_SOUND);
-                Play_Sound(WARNING_SOUND);
-            }
-
+            // Kill any channels with RED_ALERT_WAV (group 2)
+            Mix_HaltGroup(2);
+            Play_Sound(WARNING_WAV);
 #endif
 
             break;
@@ -2571,10 +2485,7 @@
             W_ChangeBorder (baseWin, rColor);
             
 #if defined(SOUND)
-            if (newSound)
-                Play_Sound(RED_ALERT_WAV);
-            else
-                Play_Sound(RED_ALERT_SOUND);
+            Play_Sound(RED_ALERT_WAV);
 #endif
 
             break;
@@ -2598,45 +2509,31 @@
     }
 
 #if defined(SOUND)
-    if (newSound)
+    if (sound_torps < me->p_ntorp)
+        Play_Sound(FIRE_TORP_WAV);
+    if (sound_other_torps < num_other_torps)
     {
-        if (sound_torps < me->p_ntorp)
-            Play_Sound(FIRE_TORP_WAV);
-        if (sound_other_torps < num_other_torps)
-        {
-            if (other_torp_dist < SCALE/2)
-                Play_Sound(OTHER_FIRE_TORP_WAV);
-            else
-                Play_Sound_Loc(OTHER_FIRE_TORP_WAV, other_torp_angle, other_torp_dist);
-        }
-        if (sound_plasma < me->p_nplasmatorp)
-            Play_Sound(FIRE_PLASMA_WAV);
-        if (sound_other_plasmas < num_other_plasmas)
-        {
-            if (other_plasma_dist < SCALE/2)
-                Play_Sound(OTHER_FIRE_PLASMA_WAV);
-            else
-                Play_Sound_Loc(OTHER_FIRE_PLASMA_WAV, other_plasma_angle, other_plasma_dist);
-        }
-        // Reset locations and fuses of other's closest torps and plasmas
-        other_torp_dist = CORNER_DIST;
-        new_other_torp_dist = 0;
-        other_torp_angle = 0;
-        other_plasma_dist = CORNER_DIST;
-        new_other_plasma_dist = 0;
-        other_plasma_angle = 0;
+        if (other_torp_dist < SCALE/2)
+            Play_Sound(OTHER_FIRE_TORP_WAV);
+        else
+            Play_Sound_Loc(OTHER_FIRE_TORP_WAV, other_torp_angle, other_torp_dist);
     }
-    else
+    if (sound_plasma < me->p_nplasmatorp)
+        Play_Sound(FIRE_PLASMA_WAV);
+    if (sound_other_plasmas < num_other_plasmas)
     {
-        if (sound_torps < me->p_ntorp)
-            Play_Sound(FIRE_TORP_SOUND);
-        if (sound_other_torps < num_other_torps)
-            Play_Sound(OTHER_FIRE_TORP_SOUND);
-        if (sound_plasma < me->p_nplasmatorp)
-            Play_Sound(FIRE_PLASMA_SOUND);
-        if (sound_other_plasmas < num_other_plasmas)
-            Play_Sound(OTHER_FIRE_PLASMA_SOUND);
+        if (other_plasma_dist < SCALE/2)
+            Play_Sound(OTHER_FIRE_PLASMA_WAV);
+        else
+            Play_Sound_Loc(OTHER_FIRE_PLASMA_WAV, other_plasma_angle, other_plasma_dist);
     }
+    // Reset locations and fuses of other's closest torps and plasmas
+    other_torp_dist = CORNER_DIST;
+    new_other_torp_dist = 0;
+    other_torp_angle = 0;
+    other_plasma_dist = CORNER_DIST;
+    new_other_plasma_dist = 0;
+    other_plasma_angle = 0;
 
     sound_flags = me->p_flags;
     sound_torps = me->p_ntorp;

Index: death.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/death.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- death.c	7 Feb 2007 23:04:57 -0000	1.13
+++ death.c	28 Feb 2007 09:35:20 -0000	1.14
@@ -153,11 +153,8 @@
                 break;
         }
 #ifdef SOUND
-        if (newSound)
-        {
-            i = MUSIC_OFFSET + (RANDOM() % (NUM_MUSIC - MUSIC_OFFSET)); // Play random end theme
-            Play_Music(i);
-        }
+        i = MUSIC_OFFSET + (RANDOM() % (NUM_MUSIC - MUSIC_OFFSET)); // Play random end theme
+        Play_Music(i);
 #endif
         break;
     case KGHOST:
@@ -184,11 +181,8 @@
                 break;
         }
 #ifdef SOUND
-        if (newSound)
-        {
-            i = MUSIC_OFFSET + (RANDOM() % (NUM_MUSIC - MUSIC_OFFSET)); // Play random end theme
-            Play_Music(i);
-        }
+        i = MUSIC_OFFSET + (RANDOM() % (NUM_MUSIC - MUSIC_OFFSET)); // Play random end theme
+        Play_Music(i);
 #endif
         break;
     case KPROVIDENCE:

Index: playback.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/playback.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- playback.c	26 Feb 2007 06:54:49 -0000	1.16
+++ playback.c	28 Feb 2007 09:35:20 -0000	1.17
@@ -293,7 +293,6 @@
 #endif
 
 #ifdef SOUND
-    newsoundwin (display_host, name);
     Init_Sound ();
 #endif
 
@@ -307,11 +306,6 @@
     if (i >= RETURNBASE)
         return (i - RETURNBASE);        /* Terminate with retcode */
 
-#if defined(SOUND)
-    if (!newSound)
-        Abort_Sound(ENGINE_SOUND);
-#endif
-
 //#ifdef nodef
     /* Code from entrywindow() */
     {
@@ -352,16 +346,8 @@
         redrawPStats ();
 
 #ifdef SOUND
-    if (newSound)
-    { 
-        Mix_HaltChannel(-1); /* Kill all currently playing sounds when entering game */
-        Play_Sound(ENTER_SHIP_WAV);
-    }
-    else
-    {
-        Play_Sound(ENTER_SHIP_SOUND);
-        Play_Sound(ENGINE_SOUND);
-    }
+    Mix_HaltChannel(-1); /* Kill all currently playing sounds when entering game */
+    Play_Sound(ENTER_SHIP_WAV);
 #endif
 
     while (1)

Index: map.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- map.c	28 Feb 2007 07:44:00 -0000	1.25
+++ map.c	28 Feb 2007 09:35:20 -0000	1.26
@@ -814,8 +814,6 @@
             	/* Just increment the counter instead */
                 lastRedraw[i]++;
             }
-            if (&players[i] == me)
-            LineToConsole("Last redraw %d ", lastRedraw[i]);
         }
     }
 

--- winsndlib.c DELETED ---

Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- data.c	28 Feb 2007 07:44:00 -0000	1.55
+++ data.c	28 Feb 2007 09:35:20 -0000	1.56
@@ -794,10 +794,9 @@
 
 int richText = 0;   		/* temporary variable to select rich text message windows */
 int newQuit = 0;    		/* new quit clock */
-int newSound = 1;   		/* Use new SDL sound interface */
-int newSoundEffects = 1;	/* Use SDL sound effects playback */
-int newSoundMusic = 1;		/* Use SDL music playback */
-int newSoundMusicBkgd = 0;	/* Play random background music continuously */
-int newSoundAngles = 1; 	/* Use SDL with angular 3D sound */
+int soundEffects = 1;		/* Use sound effects playback */
+int soundMusic = 1;		/* Use music playback */
+int soundMusicBkgd = 0;		/* Play random background music continuously */
+int soundAngles = 0; 		/* Use 3D sound */
 
 int useFullShipInfo = 1;  /* Prefer SP_PLAYER packets over SP_S_PLAYER packets */
\ No newline at end of file

Index: beeplite.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/beeplite.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- beeplite.c	23 Feb 2007 13:43:56 -0000	1.13
+++ beeplite.c	28 Feb 2007 09:35:20 -0000	1.14
@@ -193,15 +193,10 @@
 		{
 
 #if defined(SOUND)
-                    if (newSound)
+                    if (sound_toggle)
                         Play_Sound(MESSAGE_WAV);
                     else
-                    {
-                        if (sound_toggle)
-                            Play_Sound(MESSAGE_SOUND);
-                        else
-		            W_Beep();
-                    }
+		        W_Beep();
 #endif
 		}
 	        break;
@@ -210,84 +205,39 @@
 #ifdef SOUND
 	    case '1':
 	        if (F_beeplite_flags & LITE_SOUNDS)
-	        {
-	          if (newSound)
-	            Play_Sound(MESSAGE1_WAV);
-	          else
-		    Play_Sound(MESSAGE1_SOUND);
-		}
+	          Play_Sound(MESSAGE1_WAV);
 	        break;
 	    case '2':
 	        if (F_beeplite_flags & LITE_SOUNDS)
-	        {
-	          if (newSound)
-	            Play_Sound(MESSAGE2_WAV);
-	          else
-		    Play_Sound(MESSAGE2_SOUND);
-		}
+	          Play_Sound(MESSAGE2_WAV);
 	        break;
 	    case '3':
   	        if (F_beeplite_flags & LITE_SOUNDS)
-  	        {
-	          if (newSound)
-	            Play_Sound(MESSAGE3_WAV);
-	          else
-		    Play_Sound(MESSAGE3_SOUND);
-		}
+	          Play_Sound(MESSAGE3_WAV);
 	        break;
 	    case '4':
 	        if (F_beeplite_flags & LITE_SOUNDS)
-	        {
-	          if (newSound)
-	            Play_Sound(MESSAGE4_WAV);
-	          else
-		    Play_Sound(MESSAGE4_SOUND);
-		}
+	          Play_Sound(MESSAGE4_WAV);
 	        break;
 	    case '5':
 	        if (F_beeplite_flags & LITE_SOUNDS)
-	        {
-	          if (newSound)
-	            Play_Sound(MESSAGE5_WAV);
-	          else
-		    Play_Sound(MESSAGE5_SOUND);
-		}
+	          Play_Sound(MESSAGE5_WAV);
 	        break;
 	    case '6':
 	        if (F_beeplite_flags & LITE_SOUNDS)
-	        {
-	          if (newSound)
-	            Play_Sound(MESSAGE6_WAV);
-	          else
-		    Play_Sound(MESSAGE6_SOUND);
-		}
+	          Play_Sound(MESSAGE6_WAV);
 	        break;
 	    case '7':
 	        if (F_beeplite_flags & LITE_SOUNDS)
-	        {
-	          if (newSound)
-	            Play_Sound(MESSAGE7_WAV);
-	          else
-		    Play_Sound(MESSAGE7_SOUND);
-		}
+	          Play_Sound(MESSAGE7_WAV);
 	        break;
 	    case '8':
 	        if (F_beeplite_flags & LITE_SOUNDS)
-	        {
-	          if (newSound)
-	            Play_Sound(MESSAGE_WAV);
-	          else
-		    Play_Sound(MESSAGE8_SOUND);
-		}
+	          Play_Sound(MESSAGE_WAV);
 	        break;
 	    case '9':
 	        if (F_beeplite_flags & LITE_SOUNDS)
-	        {
-	          if (newSound)
-	            Play_Sound(MESSAGE_WAV);
-	          else
-		    Play_Sound(MESSAGE9_SOUND);
-		}
+	          Play_Sound(MESSAGE_WAV);
 	        break;
 #endif
 

Index: warning.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/warning.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- warning.c	26 Feb 2007 06:54:50 -0000	1.11
+++ warning.c	28 Feb 2007 09:35:20 -0000	1.12
@@ -47,10 +47,7 @@
     if (doRefit)
     {
 #ifdef SOUND
-        if (newSound)
-            Play_Sound(ENTER_SHIP_WAV);
-        else
-            Play_Sound(ENTER_SHIP_SOUND);
+        Play_Sound(ENTER_SHIP_WAV);
 #endif
        rdelay = time (0) + REFITTIME;
     }

Index: cowmain.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- cowmain.c	28 Feb 2007 07:44:00 -0000	1.24
+++ cowmain.c	28 Feb 2007 09:35:20 -0000	1.25
@@ -804,9 +804,9 @@
     savebitmaps ();
     
 #if defined(SOUND)
-    newsoundwin (display_host, name);
-    if (newSound)
-        Init_Sound();
+    /* Moved sound initialization to right after readdefaults() so
+     * the intro can start playing ASAP */
+    Init_Sound();
 #endif
 
     /* open memory...? */
@@ -932,25 +932,12 @@
     init_hockey_lines ();
 #endif
 
-  /* Moved SDL sound initialization to right after readdefaults() so
-   * the intro can start playing ASAP */
-#if defined(SOUND)
-    if (!newSound)
-        Init_Sound();
-#endif
-
-
     isFirstEntry = 1;           /* First entry into game */
 
     i = setjmp (env);           /* Reentry point of game */
     if (i >= RETURNBASE)
         return (i - RETURNBASE);        /* Terminate with retcode */
 
-#if defined(SOUND)
-    if (!newSound)
-        Abort_Sound(ENGINE_SOUND);
-#endif
-
     /* give the player the motd and find out which team he wants */
 
 #ifndef RWATCH
@@ -995,13 +982,6 @@
 
         sendByeReq ();
 
-#if defined(SOUND)
-        if (!newSound)
-            Exit_Sound();
-        else
-            Mix_CloseAudio();
-#endif
-
         sleep (1);
         if (logFile != NULL)
             fclose (logFile);
@@ -1086,24 +1066,16 @@
 
 
 #ifdef SOUND
-    if (newSound)
-    {
-        /* Kill all currently playing sounds when entering game */
-        Mix_HaltChannel(-1);
-        /* Fade out any music playing over 5 seconds */
-        if (Mix_PlayingMusic())
-        {
-            Mix_FadeOutMusic(5000);
-            /* Attempt to start background music once fadeout done */
-            Mix_HookMusicFinished(Play_Music_Bkgd);
-        }
-        Play_Sound(ENTER_SHIP_WAV);
-    }
-    else
+    /* Kill all currently playing sounds when entering game */
+    Mix_HaltChannel(-1);
+    /* Fade out any music playing over 5 seconds */
+    if (Mix_PlayingMusic())
     {
-        Play_Sound(ENTER_SHIP_SOUND);
-        Play_Sound(ENGINE_SOUND);
+        Mix_FadeOutMusic(5000);
+        /* Attempt to start background music once fadeout done */
+        Mix_HookMusicFinished(Play_Music_Bkgd);
     }
+    Play_Sound(ENTER_SHIP_WAV);
 #endif
     promoted = 0;
     ingame = 1;

Index: socket.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- socket.c	26 Feb 2007 06:54:49 -0000	1.19
+++ socket.c	28 Feb 2007 09:35:20 -0000	1.20
@@ -1183,19 +1183,9 @@
       if (!inplayback) {
 #endif
         if (status->tourn)
-        {
-            if (newSound)
-                Play_Sound(START_TMODE_WAV);
-            else
-                Play_Sound(START_TMODE_SOUND);
-        }
+            Play_Sound(START_TMODE_WAV);
         else
-        {
-            if (newSound)
-                Play_Sound(STOP_TMODE_WAV);
-            else
-                Play_Sound(STOP_TMODE_SOUND);
-        }
+            Play_Sound(STOP_TMODE_WAV);
 #ifdef RECORDGAME
       }
 #endif	

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- defaults.c	25 Feb 2007 14:12:10 -0000	1.45
+++ defaults.c	28 Feb 2007 09:35:20 -0000	1.46
@@ -341,36 +341,6 @@
             NULL
         }
     },
-    {"newSound", &newSound, RC_BOOL,
-        {
-            "Use new layered, stereo sound",
-            NULL
-        }
-    },
-    {"newSoundEffects", &newSoundEffects, RC_BOOL,
-        {
-            "Play sound effects (newSound only)",
-            NULL
-        }
-    },
-    {"newSoundMusic", &newSoundMusic, RC_BOOL,
-        {
-            "Play music (newSound only)",
-            NULL
-        }
-    },
-    {"newSoundMusicBkgd", &newSoundMusicBkgd, RC_BOOL,
-        {
-            "Play theme music in background (requires newSound and newSoundMusic)",
-            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",
@@ -700,7 +670,31 @@
 #ifdef SOUND
     {"sound", &sound_init, RC_BOOL,
         {
-            "Enable sound",
+            "Enable layered, stereo sound",
+            NULL
+        }
+    },
+    {"soundEffects", &soundEffects, RC_BOOL,
+        {
+            "Play sound effects",
+            NULL
+        }
+    },
+    {"soundMusic", &soundMusic, RC_BOOL,
+        {
+            "Play music",
+            NULL
+        }
+    },
+    {"soundMusicBkgd", &soundMusicBkgd, RC_BOOL,
+        {
+            "Play theme music in background (requires soundMusic)",
+            NULL
+        }
+    },
+    {"soundAngles", &soundAngles, RC_BOOL,
+        {
+            "Use 3D sound effects",
             NULL
         }
     },
@@ -1537,11 +1531,10 @@
     doubleBuffering = booleanDefault ("doubleBuffering", doubleBuffering);
     allowWheelActions = booleanDefault ("allowWheelActions", allowWheelActions);
     newQuit = booleanDefault ("newQuit", newQuit);
-    newSound = booleanDefault ("newSound", newSound);
-    newSoundEffects= booleanDefault ("newSoundEffects", newSoundEffects);
-    newSoundMusic = booleanDefault ("newSoundMusic", newSoundMusic);
-    newSoundMusicBkgd = booleanDefault ("newSoundMusicBkgd", newSoundMusicBkgd);
-    newSoundAngles = booleanDefault ("newSoundAngles", newSoundAngles);
+    soundEffects= booleanDefault ("soundEffects", soundEffects);
+    soundMusic = booleanDefault ("soundMusic", soundMusic);
+    soundMusicBkgd = booleanDefault ("soundMusicBkgd", soundMusicBkgd);
+    soundAngles = booleanDefault ("soundAngles", soundAngles);
     useFullShipInfo = booleanDefault ("useFullShipInfo", useFullShipInfo);
     tpDotDist = intDefault ("tpDotDist", tpDotDist);
     omitTeamLetter = booleanDefault ("omitTeamLetter", omitTeamLetter);