shithub: duke3d

Download patch

ref: a53c7b8d90c5c5b02de54bca36e4c049d1788421
parent: 2138873185eb82ef50e89b0229c5f12576b09083
author: Tanguy Fautre <[email protected]>
date: Sun Feb 16 08:19:27 EST 2020

Removed PLAT_DOS.
Removed no-op functions.

--- a/Game/CMakeLists.txt
+++ b/Game/CMakeLists.txt
@@ -10,7 +10,6 @@
 	src/audiolib/dpmi.h
 	src/audiolib/dsl.h
 	src/audiolib/fx_man.h
-	src/audiolib/interrup.h
 	src/audiolib/linklist.h
 	src/audiolib/ll_man.h
 	src/audiolib/multivoc.h
@@ -18,7 +17,6 @@
 	src/audiolib/pitch.h
 	src/audiolib/sndcards.h
 	src/audiolib/standard.h
-	src/audiolib/user.h
 	src/audiolib/usrhooks.h
 	src/audiolib/util.h
 )
@@ -32,7 +30,6 @@
 	src/audiolib/mvreverb.c
 	src/audiolib/nodpmi.c
 	src/audiolib/pitch.c
-	src/audiolib/user.c
 	# TODO source contains loads of files that are not used (only DOS). Delete them?
 )
 
--- a/Game/src/audiolib/_multivc.h
+++ b/Game/src/audiolib/_multivc.h
@@ -232,31 +232,8 @@
 //static void       MV_CalcVolume( int MaxLevel );
 //static void       MV_CalcPanTable( void );
 
-#ifdef PLAT_DOS
-#define ATR_INDEX               0x3c0
-#define STATUS_REGISTER_1       0x3da
-
-#define SetBorderColor(color) \
-   { \
-   inp  (STATUS_REGISTER_1); \
-   outp (ATR_INDEX,0x31);    \
-   outp (ATR_INDEX,color);   \
-   }
-#endif
-
 void ClearBuffer_DW( void *ptr, unsigned data, int length );
 
-#ifdef PLAT_DOS
-#pragma aux ClearBuffer_DW = \
-   "cld",                    \
-   "push   es",              \
-   "push   ds",              \
-   "pop    es",              \
-   "rep    stosd",           \
-   "pop    es",              \
-parm [ edi ] [ eax ] [ ecx ] modify exact [ ecx edi ];
-#endif
-
 /*
 void MV_Mix8BitMono( unsigned long position, unsigned long rate,
    const char *start, unsigned long length );
@@ -308,11 +285,5 @@
 
 void MV_8BitReverbFast( const signed char *src, signed char *dest, int count, int shift );
 */
-#ifdef PLAT_DOS
-#pragma aux MV_16BitReverb parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
-#pragma aux MV_8BitReverb parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
-#pragma aux MV_16BitReverbFast parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
-#pragma aux MV_8BitReverbFast parm [eax] [edx] [ebx] [ecx] modify exact [eax ebx ecx edx esi edi]
-#endif
 
 #endif
--- a/Game/src/audiolib/dsl.c
+++ b/Game/src/audiolib/dsl.c
@@ -223,12 +223,3 @@
 {
 	return _SampleRate;
 }
-
-uint32_t DisableInterrupts( void )
-{
-	return 0;
-}
-
-void RestoreInterrupts( uint32_t flags )
-{
-}
--- a/Game/src/audiolib/fx_man.c
+++ b/Game/src/audiolib/fx_man.c
@@ -36,9 +36,7 @@
 
 
 #include "dsl.h"
-
 #include "ll_man.h"
-#include "user.h"
 #include "fx_man.h"
 
 #define TRUE  ( 1 == 1 )
@@ -124,12 +122,6 @@
    int status;
    int DeviceStatus;
 
-   if ( USER_CheckParameter( "ASSVER" ) )
-      {
-      FX_SetErrorCode( FX_ASSVersion );
-      return( FX_Error );
-      }
-
    FX_SoundDevice = SoundCard;
 
    status = FX_Ok;
@@ -216,12 +208,6 @@
       FX_Shutdown();
       }
 
-   if ( USER_CheckParameter( "ASSVER" ) )
-      {
-      FX_SetErrorCode( FX_ASSVersion );
-      return( FX_Error );
-      }
-
    status = LL_LockMemory();
    if ( status != LL_Ok )
       {
@@ -1029,48 +1015,13 @@
    Starts the sound recording engine.
 ---------------------------------------------------------------------*/
 
-int FX_StartRecording
-   (
-   int MixRate,
-   void ( *function )( char *ptr, int length )
-   )
+int FX_StartRecording(int MixRate, void (*function)(char* ptr, int length))
+{
+    FX_SetErrorCode(FX_InvalidCard);
+    return FX_Warning;
+}
 
-   {
-   int status;
 
-#ifdef PLAT_DOS
-   switch( FX_SoundDevice )
-      {
-      case SoundBlaster :
-      case Awe32 :
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         status = MV_StartRecording( MixRate, function );
-         if ( status != MV_Ok )
-            {
-            FX_SetErrorCode( FX_MultiVocError );
-            status = FX_Warning;
-            }
-         else
-            {
-            status = FX_Ok;
-            }
-         break;
-
-      default :
-         FX_SetErrorCode( FX_InvalidCard );
-         status = FX_Warning;
-         break;
-      }
-#else
-   FX_SetErrorCode( FX_InvalidCard );
-   status = FX_Warning;
-#endif
-
-   return( status );
-   }
-
-
 /*---------------------------------------------------------------------
    Function: FX_StopRecord
 
@@ -1077,22 +1028,6 @@
    Stops the sound record engine.
 ---------------------------------------------------------------------*/
 
-void FX_StopRecord
-   (
-   void
-   )
-
-   {
-#ifdef PLAT_DOS
-   // Stop sound playback
-   switch( FX_SoundDevice )
-      {
-      case SoundBlaster :
-      case Awe32 :
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         MV_StopRecord();
-         break;
-      }
-#endif
-   }
+void FX_StopRecord(void)
+{
+}
--- a/Game/src/audiolib/interrup.h
+++ /dev/null
@@ -1,50 +1,0 @@
-/*
-Copyright (C) 1994-1995 Apogee Software, Ltd.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-*/
-/**********************************************************************
-   module: INTERRUP.H
-
-   author: James R. Dose
-   date:   March 31, 1994
-
-   Inline functions for disabling and restoring the interrupt flag.
-
-   (c) Copyright 1994 James R. Dose.  All Rights Reserved.
-**********************************************************************/
-
-#ifndef __INTERRUPT_H
-#define __INTERRUPT_H
-
-unsigned long DisableInterrupts( void );
-void          RestoreInterrupts( unsigned long flags );
-
-#ifdef PLAT_DOS
-#pragma aux DisableInterrupts = \
-   "pushfd",                    \
-   "pop    eax",                \
-   "cli"                        \
-   modify [ eax ];
-
-#pragma aux RestoreInterrupts = \
-   "push   eax",                \
-   "popfd"                      \
-   parm [ eax ];
-#endif
-
-#endif
--- a/Game/src/audiolib/multivoc.c
+++ b/Game/src/audiolib/multivoc.c
@@ -34,11 +34,6 @@
 #include <string.h>
 #include <time.h>
 
-#ifdef PLAT_DOS
-#include <dos.h>
-#include <conio.h>
-#endif
-
 #include "util.h"
 #include "dpmi.h"
 #include "usrhooks.h"
@@ -45,16 +40,7 @@
 #include "dma.h"
 #include "linklist.h"
 #include "sndcards.h"
-
-#ifdef PLAT_DOS
-#include "blaster.h"
-#include "sndscape.h"
-#include "sndsrc.h"
-#include "pas16.h"
-#include "guswave.h"
-#else
 #include "dsl.h"
-#endif
 
 #include "pitch.h"
 #include "multivoc.h"
@@ -199,26 +185,6 @@
          ErrorString = "No voice with matching handle found.\n";
          break;
 
-#ifdef PLAT_DOS
-      case MV_BlasterError :
-         ErrorString = BLASTER_ErrorString( BLASTER_Error );
-         break;
-
-      case MV_PasError :
-         ErrorString = PAS_ErrorString( PAS_Error );
-         break;
-
-      case MV_SoundScapeError :
-         ErrorString = SOUNDSCAPE_ErrorString( SOUNDSCAPE_Error );
-         break;
-
-      #ifndef SOUNDSOURCE_OFF
-      case MV_SoundSourceError :
-         ErrorString = SS_ErrorString( SS_Error );
-         break;
-      #endif
-#endif
-
       case MV_DPMI_Error :
          ErrorString = "DPMI Error in Multivoc.\n";
          break;
@@ -375,15 +341,10 @@
 
 void MV_PlayVoice( VoiceNode *voice )
 {
-   unsigned flags;
-
-   flags = DisableInterrupts();
    LL_SortedInsertion( &VoiceList, voice, prev, next, VoiceNode, priority );
 
    ++sounddebugActiveSounds;
    ++sounddebugAllocateSoundCalls;
-
-   RestoreInterrupts( flags );
 }
 
 
@@ -398,11 +359,6 @@
    VoiceNode* pPrev;
    VoiceNode* pNext;
 
-   unsigned  flags;
-
-   flags = DisableInterrupts();
-
-   
    pPrev = voice->prev;
    pNext = voice->next;
 
@@ -422,9 +378,6 @@
 
    --sounddebugActiveSounds;
    ++sounddebugDeallocateSoundCalls;
-   
-
-   RestoreInterrupts( flags );
 }
 
 
@@ -919,35 +872,6 @@
 
 
 /*---------------------------------------------------------------------
-   Function: MV_ServiceRecord
-
-   Starts recording of the waiting buffer.
----------------------------------------------------------------------*/
-
-#ifdef PLAT_DOS
-static void MV_ServiceRecord
-   (
-   void
-   )
-
-   {
-   if ( MV_RecordFunc )
-      {
-      MV_RecordFunc( MV_MixBuffer[ 0 ] + MV_MixPage * MixBufferSize,
-         MixBufferSize );
-      }
-
-   // Toggle which buffer we'll mix next
-   MV_MixPage++;
-   if ( MV_MixPage >= NumberOfBuffers )
-      {
-      MV_MixPage = 0;
-      }
-   }
-#endif
-
-
-/*---------------------------------------------------------------------
    Function: MV_GetVoice
 
    Locates the voice with the specified handle.
@@ -960,10 +884,7 @@
 
    {
    VoiceNode *voice;
-   unsigned  flags;
 
-   flags = DisableInterrupts();
-
    for( voice = VoiceList.next; voice != &VoiceList; voice = voice->next )
       {
       if ( handle == voice->handle )
@@ -972,8 +893,6 @@
          }
       }
 
-   RestoreInterrupts( flags );
-
    if ( voice == &VoiceList )
       {
       MV_SetErrorCode( MV_VoiceNotFound );
@@ -1059,7 +978,6 @@
 
    {
    VoiceNode *voice;
-   unsigned  flags;
    unsigned  long callbackval;
 
    if ( !MV_Installed )
@@ -1068,12 +986,9 @@
       return( MV_Error );
       }
 
-   flags = DisableInterrupts();
-
    voice = MV_GetVoice( handle );
    if ( voice == NULL )
       {
-      RestoreInterrupts( flags );
       MV_SetErrorCode( MV_VoiceNotFound );
       return( MV_Error );
       }
@@ -1082,8 +997,6 @@
 
    MV_StopVoice( voice );
 
-   RestoreInterrupts( flags );
-
    if ( MV_CallBackFunc )
       {
       MV_CallBackFunc( callbackval );
@@ -1107,7 +1020,6 @@
    {
    VoiceNode   *voice;
    int         NumVoices = 0;
-   unsigned    flags;
 
    if ( !MV_Installed )
       {
@@ -1115,15 +1027,11 @@
       return( 0 );
       }
 
-   flags = DisableInterrupts();
-
    for( voice = VoiceList.next; voice != &VoiceList; voice = voice->next )
       {
       NumVoices++;
       }
 
-   RestoreInterrupts( flags );
-
    return( NumVoices );
    }
 
@@ -1142,16 +1050,12 @@
    {
    VoiceNode   *voice;
    VoiceNode   *node;
-   unsigned    flags;
 
-//return( NULL );
    if ( MV_Recording )
       {
       return( NULL );
       }
 
-   flags = DisableInterrupts();
-
    // Check if we have any free voices
    if ( LL_Empty( &VoicePool, next, prev ) )
       {
@@ -1175,13 +1079,11 @@
    if ( LL_Empty( &VoicePool, next, prev ) )
       {
       // No free voices
-      RestoreInterrupts( flags );
       return( NULL );
       }
 
    voice = VoicePool.next;
    LL_Remove( voice, next, prev );
-   RestoreInterrupts( flags );
 
    // Find a free voice handle
    do
@@ -1222,8 +1124,6 @@
       return( TRUE );
       }
 
-   flags = DisableInterrupts();
-
    // check if we have a higher priority than a voice that is playing.
    voice = VoiceList.next;
    for( node = VoiceList.next; node != &VoiceList; node = node->next )
@@ -1234,8 +1134,6 @@
          }
       }
 
-   RestoreInterrupts( flags );
-
    if ( ( voice != &VoiceList ) && ( priority >= voice->priority ) )
       {
       return( TRUE );
@@ -1387,11 +1285,8 @@
    )
 
    {
-   unsigned flags;
    int test;
 
-   flags = DisableInterrupts();
-
    test = T_DEFAULT;
    if ( voice->bits == 16 )
       {
@@ -1453,7 +1348,6 @@
       default :
          voice->mix = MV_MixFPMono8;
       }
-   RestoreInterrupts( flags );
    }
 
 
@@ -1517,12 +1411,9 @@
       return( MV_Error );
       }
 
-   flags = DisableInterrupts();
-
    voice = MV_GetVoice( handle );
    if ( voice == NULL )
       {
-      RestoreInterrupts( flags );
       MV_SetErrorCode( MV_VoiceNotFound );
       return( MV_Warning );
       }
@@ -1531,8 +1422,6 @@
    voice->LoopStart = NULL;
    voice->LoopEnd   = NULL;
 
-   RestoreInterrupts( flags );
-
    return( MV_Ok );
    }
 
@@ -1740,37 +1629,7 @@
       mode |= SIXTEEN_BIT;
       }
 
-#ifdef PLAT_DOS
-   switch( MV_SoundCard )
-      {
-      case UltraSound :
-         MV_MixMode = mode;
-         break;
-
-      case SoundBlaster :
-      case Awe32 :
-         MV_MixMode = BLASTER_SetMixMode( mode );
-         break;
-
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         MV_MixMode = PAS_SetMixMode( mode );
-         break;
-
-      case SoundScape :
-         MV_MixMode = SOUNDSCAPE_SetMixMode( mode );
-         break;
-
-      #ifndef SOUNDSOURCE_OFF
-      case SoundSource :
-      case TandySoundSource :
-         MV_MixMode = SS_SetMixMode( mode );
-         break;
-      #endif
-      }
-#else
    MV_MixMode = mode;
-#endif
 
    MV_Channels = 1;
    if ( MV_MixMode & STEREO )
@@ -1804,16 +1663,6 @@
 
    MV_RightChannelOffset = MV_SampleSize / 2;
 
-#ifdef PLAT_DOS
-   if ( ( MV_SoundCard == UltraSound ) && ( MV_Channels == 2 ) )
-      {
-      MV_SampleSize         /= 2;
-      MV_BufferSize         /= 2;
-      MV_RightChannelOffset  = MV_BufferSize * MV_NumberOfBuffers;
-      MV_BufferLength       /= 2;
-      }
-#endif
-
    return( MV_Ok );
    }
 
@@ -1882,42 +1731,9 @@
    VoiceNode   *next;
    unsigned    flags;
 
-#ifdef PLAT_DOS
-   // Stop sound playback
-   switch( MV_SoundCard )
-      {
-      case SoundBlaster :
-      case Awe32 :
-         BLASTER_StopPlayback();
-         break;
-
-      case UltraSound :
-         GUSWAVE_KillAllVoices();
-         break;
-
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         PAS_StopPlayback();
-         break;
-
-      case SoundScape :
-         SOUNDSCAPE_StopPlayback();
-         break;
-
-      #ifndef SOUNDSOURCE_OFF
-      case SoundSource :
-      case TandySoundSource :
-         SS_StopPlayback();
-         break;
-      #endif
-      }
-#else
    DSL_StopPlayback();
-#endif
 
    // Make sure all callbacks are done.
-   flags = DisableInterrupts();
-
    for( voice = VoiceList.next; voice != &VoiceList; voice = next )
       {
       next = voice->next;
@@ -1929,8 +1745,6 @@
          MV_CallBackFunc( voice->callbackval );
          }
       }
-
-   RestoreInterrupts( flags );
    }
 
 
@@ -1940,85 +1754,13 @@
    Starts the sound recording engine.
 ---------------------------------------------------------------------*/
 
-int MV_StartRecording
-   (
-   int MixRate,
-   void ( *function )( char *ptr, int length )
-   )
+int MV_StartRecording(int MixRate, void ( *function )( char *ptr, int length ))
+{
+	MV_SetErrorCode( MV_UnsupportedCard );
+	return( MV_Error );
+}
 
-   {
-#ifdef PLAT_DOS
-   int status;
 
-   switch( MV_SoundCard )
-      {
-      case SoundBlaster :
-      case Awe32 :
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         break;
-
-      default :
-         MV_SetErrorCode( MV_UnsupportedCard );
-         return( MV_Error );
-         break;
-      }
-
-   if ( function == NULL )
-      {
-      MV_SetErrorCode( MV_NullRecordFunction );
-      return( MV_Error );
-      }
-
-   MV_StopPlayback();
-
-   // Initialize the buffers
-   ClearBuffer_DW( MV_MixBuffer[ 0 ], SILENCE_8BIT, TotalBufferSize >> 2 );
-
-   // Set the mix buffer variables
-   MV_MixPage  = 0;
-
-   MV_RecordFunc = function;
-
-   // Start playback
-   switch( MV_SoundCard )
-      {
-      case SoundBlaster :
-      case Awe32 :
-         status = BLASTER_BeginBufferedRecord( MV_MixBuffer[ 0 ],
-            TotalBufferSize, NumberOfBuffers, MixRate, MONO_8BIT,
-            MV_ServiceRecord );
-
-         if ( status != BLASTER_Ok )
-            {
-            MV_SetErrorCode( MV_BlasterError );
-            return( MV_Error );
-            }
-         break;
-
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         status = PAS_BeginBufferedRecord( MV_MixBuffer[ 0 ],
-            TotalBufferSize, NumberOfBuffers, MixRate, MONO_8BIT,
-            MV_ServiceRecord );
-
-         if ( status != PAS_Ok )
-            {
-            MV_SetErrorCode( MV_PasError );
-            return( MV_Error );
-            }
-         break;
-      }
-
-   MV_Recording = TRUE;
-   return( MV_Ok );
-#else
-   MV_SetErrorCode( MV_UnsupportedCard );
-   return( MV_Error );
-#endif
-   }
-
-
 /*---------------------------------------------------------------------
    Function: MV_StopRecord
 
@@ -2025,33 +1767,11 @@
    Stops the sound record engine.
 ---------------------------------------------------------------------*/
 
-void MV_StopRecord
-   (
-   void
-   )
+void MV_StopRecord(void)
+{
+}
 
-   {
-#ifdef PLAT_DOS
-   // Stop sound playback
-   switch( MV_SoundCard )
-      {
-      case SoundBlaster :
-      case Awe32 :
-         BLASTER_StopPlayback();
-         break;
 
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         PAS_StopPlayback();
-         break;
-      }
-
-   MV_Recording = FALSE;
-   MV_StartPlayback();
-#endif
-   }
-
-
 /*---------------------------------------------------------------------
    Function: MV_StartDemandFeedPlayback
 
@@ -2803,100 +2523,12 @@
    Checks if playback has started.
 ---------------------------------------------------------------------*/
 
-int MV_TestPlayback
-   (
-   void
-   )
+int MV_TestPlayback(void)
+{
+    return MV_Ok;
+}
 
-   {
-#ifdef PLAT_DOS
-   unsigned flags;
-   long time;
-   int  start;
-   int  status;
-   int  pos;
 
-   if ( MV_SoundCard == UltraSound )
-      {
-      return( MV_Ok );
-      }
-
-   flags = DisableInterrupts();
-   _enable();
-
-   status = MV_Error;
-   start  = MV_MixPage;
-   time   = clock() + CLOCKS_PER_SEC * 2;
-
-   while( clock() < time )
-      {
-      if ( MV_MixPage != start )
-         {
-         status = MV_Ok;
-         }
-      }
-
-   RestoreInterrupts( flags );
-
-   if ( status != MV_Ok )
-      {
-      // Just in case an error doesn't get reported
-      MV_SetErrorCode( MV_DMAFailure );
-
-      switch( MV_SoundCard )
-         {
-         case SoundBlaster :
-         case Awe32 :
-            pos = BLASTER_GetCurrentPos();
-            break;
-
-         case ProAudioSpectrum :
-         case SoundMan16 :
-            pos = PAS_GetCurrentPos();
-            break;
-
-         case SoundScape :
-            pos = SOUNDSCAPE_GetCurrentPos();
-            break;
-
-         #ifndef SOUNDSOURCE_OFF
-         case SoundSource :
-         case TandySoundSource :
-            MV_SetErrorCode( MV_SoundSourceFailure );
-            pos = -1;
-            break;
-         #endif
-
-         default :
-            MV_SetErrorCode( MV_UnsupportedCard );
-            pos = -2;
-            break;
-         }
-
-      if ( pos > 0 )
-         {
-         MV_SetErrorCode( MV_IrqFailure );
-         }
-      else if ( pos == 0 )
-         {
-         if ( MV_Bits == 16 )
-            {
-            MV_SetErrorCode( MV_DMA16Failure );
-            }
-         else
-            {
-            MV_SetErrorCode( MV_DMAFailure );
-            }
-         }
-      }
-
-   return( status );
-#else
-   return MV_Ok;
-#endif
-   }
-
-
 /*---------------------------------------------------------------------
    Function: MV_Init
 
@@ -2982,72 +2614,11 @@
    MV_SetReverseStereo( FALSE );
 
    // Initialize the sound card
-#ifdef PLAT_DOS
-   switch( soundcard )
-      {
-      case UltraSound :
-         status = GUSWAVE_Init( 2 );
-         if ( status != GUSWAVE_Ok )
-            {
-            //JIM
-            MV_SetErrorCode( MV_BlasterError );
-            }
-         break;
-
-      case SoundBlaster :
-      case Awe32 :
-         status = BLASTER_Init();
-         if ( status != BLASTER_Ok )
-            {
-            MV_SetErrorCode( MV_BlasterError );
-            }
-
-         if ( ( BLASTER_Config.Type == SBPro ) ||
-            ( BLASTER_Config.Type == SBPro2 ) )
-            {
-            MV_SetReverseStereo( TRUE );
-            }
-         break;
-
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         status = PAS_Init();
-         if ( status != PAS_Ok )
-            {
-            MV_SetErrorCode( MV_PasError );
-            }
-         break;
-
-      case SoundScape :
-         status = SOUNDSCAPE_Init();
-         if ( status != SOUNDSCAPE_Ok )
-            {
-            MV_SetErrorCode( MV_SoundScapeError );
-            }
-         break;
-
-      #ifndef SOUNDSOURCE_OFF
-      case SoundSource :
-      case TandySoundSource :
-         status = SS_Init( soundcard );
-         if ( status != SS_Ok )
-            {
-            MV_SetErrorCode( MV_SoundSourceError );
-            }
-         break;
-      #endif
-
-      default :
-         MV_SetErrorCode( MV_UnsupportedCard );
-         break;
-      }
-#else
    status = DSL_Init();
    if ( status != DSL_Ok )
       {
       MV_SetErrorCode( MV_BlasterError );
       }
-#endif
 
    if ( MV_ErrorCode != MV_Ok )
       {
@@ -3082,14 +2653,6 @@
    //InitializeCriticalSection(&reverbCS);
    reverbMutex = SDL_CreateMutex();
 
-#ifdef PLAT_DOS
-   // Make sure we don't cross a physical page
-   if ( ( ( unsigned long )ptr & 0xffff ) + TotalBufferSize > 0x10000 )
-      {
-      ptr = ( char * )( ( ( unsigned long )ptr & 0xff0000 ) + 0x10000 );
-      }
-#endif
-
    MV_MixBuffer[ MV_NumberOfBuffers ] = ptr;
    for( buffer = 0; buffer < MV_NumberOfBuffers; buffer++ )
       {
@@ -3167,7 +2730,6 @@
 
    {
    int      buffer;
-   unsigned flags;
 
    if ( !MV_Installed )
       {
@@ -3174,8 +2736,6 @@
       return( MV_Ok );
       }
 
-   flags = DisableInterrupts();
-
    MV_KillAllVoices();
 
    MV_Installed = FALSE;
@@ -3195,40 +2755,8 @@
    SDL_DestroyMutex(reverbMutex);
 
    // Shutdown the sound card
-#ifdef PLAT_DOS
-   switch( MV_SoundCard )
-      {
-      case UltraSound :
-         GUSWAVE_Shutdown();
-         break;
-
-      case SoundBlaster :
-      case Awe32 :
-         BLASTER_Shutdown();
-         break;
-
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         PAS_Shutdown();
-         break;
-
-      case SoundScape :
-         SOUNDSCAPE_Shutdown();
-         break;
-
-      #ifndef SOUNDSOURCE_OFF
-      case SoundSource :
-      case TandySoundSource :
-         SS_Shutdown();
-         break;
-      #endif
-      }
-#else
    DSL_Shutdown();
-#endif
 
-   RestoreInterrupts( flags );
-
    // Free any voices we allocated
    DPMI_UnlockMemory( MV_FooBuffer, MV_FooMemory );
    USRHOOKS_FreeMem( MV_FooBuffer );
@@ -3384,7 +2912,6 @@
    return( MV_Ok );
    }
 
-#ifndef PLAT_DOS
 void ClearBuffer_DW( void *ptr, unsigned data, int length )
 {
 	unsigned *d = (unsigned *)ptr;
@@ -3395,4 +2922,3 @@
 		d++;
 	}
 }
-#endif
--- a/Game/src/audiolib/music.h
+++ b/Game/src/audiolib/music.h
@@ -35,10 +35,6 @@
 
 #include "sndcards.h"
 
-#ifndef PLAT_DOS
-#define cdecl
-#endif
-
 extern int MUSIC_ErrorCode;
 
 enum MUSIC_ERRORS
--- a/Game/src/audiolib/user.c
+++ /dev/null
@@ -1,100 +1,0 @@
-/*
-Copyright (C) 1994-1995 Apogee Software, Ltd.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-*/
-/**********************************************************************
-   module: USER.C
-
-   author: James R. Dose
-   date:   April 26, 1994
-
-   Routines to parse command line options.
-
-   (c) Copyright 1994 James R. Dose.  All Rights Reserved.
-**********************************************************************/
-
-#include <string.h>
-#include "user.h"
-
-#define TRUE  ( 1 == 1 )
-#define FALSE ( !TRUE )
-
-#ifdef PLAT_DOS
-extern int   _argc;
-extern char **_argv;
-#endif
-
-/*---------------------------------------------------------------------
-   Function: USER_CheckParameter
-
-   Checks if the specified string is present in the command line.
----------------------------------------------------------------------*/
-
-int USER_CheckParameter
-   (
-   const char *parameter
-   )
-
-   {
-#ifdef PLAT_DOS
-   int i;
-   int found;
-   char *ptr;
-
-   found = FALSE;
-   i = 1;
-   while( i < _argc )
-      {
-      ptr = _argv[ i ];
-
-      // Only check parameters preceded by - or /
-      if ( ( *ptr == '-' ) || ( *ptr == '/' ) )
-         {
-         ptr++;
-         if ( stricmp( parameter, ptr ) == 0 )
-            {
-            found = TRUE;
-            break;
-            }
-         }
-
-      i++;
-      }
-
-   return( found );
-#else
-   return FALSE;
-#endif
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: USER_GetText
-
-   Checks if the specified string is present in the command line
-   and returns a pointer to the text following it.
----------------------------------------------------------------------*/
-
-char *USER_GetText
-   (
-   const char *parameter
-   )
-
-   {
-   return NULL;
-   }
--- a/Game/src/audiolib/user.h
+++ /dev/null
@@ -1,38 +1,0 @@
-/*
-Copyright (C) 1994-1995 Apogee Software, Ltd.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-*/
-/**********************************************************************
-   module: USER.H
-
-   author: James R. Dose
-   phone:  (214)-271-1365 Ext #221
-   date:   April 26, 1994
-
-   Public header for USER.C
-
-   (c) Copyright 1994 James R. Dose.  All Rights Reserved.
-**********************************************************************/
-
-#ifndef __USER_H
-#define __USER_H
-
-int   USER_CheckParameter( const char *parameter );
-char *USER_GetText( const char *parameter );
-
-#endif