shithub: duke3d

Download patch

ref: a20cc2d81463696a759b130f2d68f0d2f641075b
parent: 9e687f0c3573c7bb93692cd06a5ddcac9e9341be
author: Tanguy Fautre <[email protected]>
date: Sun Feb 16 10:23:52 EST 2020

Remove more legacy no-op functions.

--- a/Game/CMakeLists.txt
+++ b/Game/CMakeLists.txt
@@ -15,7 +15,6 @@
 	src/audiolib/music.h
 	src/audiolib/pitch.h
 	src/audiolib/sndcards.h
-	src/audiolib/standard.h
 	src/audiolib/usrhooks.h
 	src/audiolib/util.h
 )
--- a/Game/src/audiolib/fx_man.c
+++ b/Game/src/audiolib/fx_man.c
@@ -36,8 +36,6 @@
 #define TRUE  ( 1 == 1 )
 #define FALSE ( !TRUE )
 
-static unsigned FX_MixRate;
-
 int FX_SoundDevice = -1;
 int FX_ErrorCode = FX_Ok;
 int FX_Installed = FALSE;
@@ -68,13 +66,6 @@
          ErrorString = "Fx ok\n";
          break;
 
-      case FX_ASSVersion :
-         ErrorString = "Apogee Sound System Version " ASS_VERSION_STRING "  "
-            "Programmed by Jim Dose\n"
-            "(c) Copyright 1995 James R. Dose.  All Rights Reserved.\n";
-         break;
-
-
       case FX_SoundCardError :
          ErrorString = DSL_ErrorString( DSL_Error );
          break;
@@ -101,46 +92,6 @@
 
 
 /*---------------------------------------------------------------------
-   Function: FX_SetupCard
-
-   Sets the configuration of a sound device.
----------------------------------------------------------------------*/
-
-int FX_SetupCard
-   (
-   int SoundCard,
-   fx_device *device
-   )
-
-   {
-   int status;
-   int DeviceStatus;
-
-   FX_SoundDevice = SoundCard;
-
-   status = FX_Ok;
-   FX_SetErrorCode( FX_Ok );
-
-
-      DeviceStatus = DSL_Init();
-      if ( DeviceStatus != DSL_Ok )
-         {
-         FX_SetErrorCode( FX_SoundCardError );
-         status = FX_Error;
-         }
-         else
-         {
-         device->MaxVoices     = 32;
-         device->MaxSampleBits = 0;
-         device->MaxChannels   = 0;
-         }
-
-
-   return( status );
-   }
-
-
-/*---------------------------------------------------------------------
    Function: FX_Init
 
    Selects which sound device to use.
@@ -152,7 +103,7 @@
    int numvoices,
    int numchannels,
    int samplebits,
-   unsigned mixrate
+   int mixrate
    )
 
    {
@@ -164,22 +115,12 @@
       FX_Shutdown();
       }
 
-   FX_MixRate = mixrate;
-
    status = FX_Ok;
    FX_SoundDevice = SoundCard;
    switch( SoundCard )
       {
-      case SoundBlaster :
-      case Awe32 :
-      case ProAudioSpectrum :
-      case SoundMan16 :
-      case SoundScape :
-      case SoundSource :
-      case TandySoundSource :
-      case UltraSound :
-         devicestatus = MV_Init( SoundCard, FX_MixRate, numvoices,
-            numchannels, samplebits );
+      case SC_SoundScape :
+         devicestatus = MV_Init( SoundCard, mixrate, numvoices, numchannels, samplebits );
          if ( devicestatus != MV_Ok )
             {
             FX_SetErrorCode( FX_MultiVocError );
@@ -223,14 +164,7 @@
    status = FX_Ok;
    switch( FX_SoundDevice )
       {
-      case SoundBlaster :
-      case Awe32 :
-      case ProAudioSpectrum :
-      case SoundMan16 :
-      case SoundScape :
-      case SoundSource :
-      case TandySoundSource :
-      case UltraSound :
+      case SC_SoundScape :
          status = MV_Shutdown();
          if ( status != MV_Ok )
             {
@@ -265,14 +199,7 @@
 
    switch( FX_SoundDevice )
       {
-      case SoundBlaster :
-      case Awe32 :
-      case ProAudioSpectrum :
-      case SoundMan16 :
-      case SoundScape :
-      case SoundSource :
-      case TandySoundSource :
-      case UltraSound :
+      case SC_SoundScape :
          MV_SetCallBack( function );
          break;
 
@@ -300,24 +227,6 @@
 
 
 /*---------------------------------------------------------------------
-   Function: FX_GetVolume
-
-   Returns the volume of the current sound device.
----------------------------------------------------------------------*/
-
-int FX_GetVolume(void)
-   {
-   int volume;
-
-
-   volume = MV_GetVolume();
-
-
-   return( volume );
-   }
-
-
-/*---------------------------------------------------------------------
    Function: FX_SetReverseStereo
 
    Set the orientation of the left and right channels.
@@ -360,54 +269,6 @@
 
 
 /*---------------------------------------------------------------------
-   Function: FX_SetFastReverb
-
-   Sets the reverb level.
----------------------------------------------------------------------*/
-
-void FX_SetFastReverb
-   (
-   int reverb
-   )
-
-   {
-   MV_SetFastReverb( reverb );
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: FX_GetMaxReverbDelay
-
-   Returns the maximum delay time for reverb.
----------------------------------------------------------------------*/
-
-int FX_GetMaxReverbDelay
-   (
-   void
-   )
-
-   {
-   return MV_GetMaxReverbDelay();
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: FX_GetReverbDelay
-
-   Returns the current delay time for reverb.
----------------------------------------------------------------------*/
-
-int FX_GetReverbDelay
-   (
-   void
-   )
-
-   {
-   return MV_GetReverbDelay();
-   }
-
-
-/*---------------------------------------------------------------------
    Function: FX_SetReverbDelay
 
    Sets the delay level of reverb to add to mix.
@@ -438,145 +299,8 @@
    return MV_VoiceAvailable( priority );
    }
 
-/*---------------------------------------------------------------------
-   Function: FX_EndLooping
 
-   Stops the voice associated with the specified handle from looping
-   without stoping the sound.
----------------------------------------------------------------------*/
-
-int FX_EndLooping
-   (
-   int handle
-   )
-
-   {
-   int status;
-
-   status = MV_EndLooping( handle );
-   if ( status == MV_Error )
-      {
-      FX_SetErrorCode( FX_MultiVocError );
-      status = FX_Warning;
-      }
-
-   return( status );
-   }
-
 /*---------------------------------------------------------------------
-   Function: FX_SetPan
-
-   Sets the stereo and mono volume level of the voice associated
-   with the specified handle.
----------------------------------------------------------------------*/
-
-int FX_SetPan
-   (
-   int handle,
-   int vol,
-   int left,
-   int right
-   )
-
-   {
-   int status;
-
-   status = MV_SetPan( handle, vol, left, right );
-   if ( status == MV_Error )
-      {
-      FX_SetErrorCode( FX_MultiVocError );
-      status = FX_Warning;
-      }
-
-   return( status );
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: FX_SetPitch
-
-   Sets the pitch of the voice associated with the specified handle.
----------------------------------------------------------------------*/
-
-int FX_SetPitch
-   (
-   int handle,
-   int pitchoffset
-   )
-
-   {
-   int status;
-
-   status = MV_SetPitch( handle, pitchoffset );
-   if ( status == MV_Error )
-      {
-      FX_SetErrorCode( FX_MultiVocError );
-      status = FX_Warning;
-      }
-
-   return( status );
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: FX_SetFrequency
-
-   Sets the frequency of the voice associated with the specified handle.
----------------------------------------------------------------------*/
-
-int FX_SetFrequency
-   (
-   int handle,
-   int frequency
-   )
-
-   {
-   int status;
-
-   status = MV_SetFrequency( handle, frequency );
-   if ( status == MV_Error )
-      {
-      FX_SetErrorCode( FX_MultiVocError );
-      status = FX_Warning;
-      }
-
-   return( status );
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: FX_PlayVOC
-
-   Begin playback of sound data with the given volume and priority.
----------------------------------------------------------------------*/
-
-int FX_PlayVOC
-   (
-   uint8_t *ptr,
-   int pitchoffset,
-   int vol,
-   int left,
-   int right,
-   int priority,
-   uint32_t callbackval
-   )
-
-   {
-   int handle;
-
-   handle = MV_PlayVOC( ptr, pitchoffset, vol, left, right,
-      priority, callbackval );
-   if ( handle < MV_Ok )
-      {
-      FX_SetErrorCode( FX_MultiVocError );
-      handle = FX_Warning;
-      }
-
-   return( handle );
-   }
-
-
-/*---------------------------------------------------------------------
    Function: FX_PlayLoopedVOC
 
    Begin playback of sound data with the given volume and priority.
@@ -616,38 +340,6 @@
    Begin playback of sound data with the given volume and priority.
 ---------------------------------------------------------------------*/
 
-int FX_PlayWAV
-   (
-   uint8_t *ptr,
-   int32_t pitchoffset,
-   int32_t vol,
-   int32_t left,
-   int32_t right,
-   int32_t priority,
-   uint32_t callbackval
-   )
-
-   {
-   int handle;
-
-   handle = MV_PlayWAV( ptr, pitchoffset, vol, left, right,
-      priority, callbackval );
-   if ( handle < MV_Ok )
-      {
-      FX_SetErrorCode( FX_MultiVocError );
-      handle = FX_Warning;
-      }
-
-   return( handle );
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: FX_PlayWAV
-
-   Begin playback of sound data with the given volume and priority.
----------------------------------------------------------------------*/
-
 int FX_PlayLoopedWAV
    (
    uint8_t *ptr,
@@ -741,76 +433,6 @@
 
 
 /*---------------------------------------------------------------------
-   Function: FX_PlayRaw
-
-   Begin playback of raw sound data with the given volume and priority.
----------------------------------------------------------------------*/
-
-int FX_PlayRaw
-   (
-   uint8_t *ptr,
-   uint32_t length,
-   uint32_t rate,
-   int32_t pitchoffset,
-   int32_t vol,
-   int32_t left,
-   int32_t right,
-   int32_t priority,
-   uint32_t callbackval
-   )
-
-   {
-   int handle;
-
-   handle = MV_PlayRaw( ptr, length, rate, pitchoffset,
-      vol, left, right, priority, callbackval );
-   if ( handle < MV_Ok )
-      {
-      FX_SetErrorCode( FX_MultiVocError );
-      handle = FX_Warning;
-      }
-
-   return( handle );
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: FX_PlayLoopedRaw
-
-   Begin playback of raw sound data with the given volume and priority.
----------------------------------------------------------------------*/
-
-int FX_PlayLoopedRaw
-   (
-   uint8_t *ptr,
-   uint32_t length,
-   char *loopstart,
-   char *loopend,
-   uint32_t rate,
-   int32_t pitchoffset,
-   int32_t vol,
-   int32_t left,
-   int32_t right,
-   int32_t priority,
-   uint32_t callbackval
-   )
-
-   {
-   int handle;
-
-   handle = MV_PlayLoopedRaw( ptr, length, loopstart, loopend,
-      rate, pitchoffset, vol, left, right, priority, callbackval );
-   if ( handle < MV_Ok )
-      {
-      FX_SetErrorCode( FX_MultiVocError );
-      handle = FX_Warning;
-      }
-
-   return( handle );
-   }
-
-
-/*---------------------------------------------------------------------
    Function: FX_Pan3D
 
    Set the angle and distance from the listener of the voice associated
@@ -839,38 +461,6 @@
 
 
 /*---------------------------------------------------------------------
-   Function: FX_SoundActive
-
-   Tests if the specified sound is currently playing.
----------------------------------------------------------------------*/
-
-int FX_SoundActive
-   (
-   int handle
-   )
-
-   {
-   return( MV_VoicePlaying( handle ) );
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: FX_SoundsPlaying
-
-   Reports the number of voices playing.
----------------------------------------------------------------------*/
-
-int FX_SoundsPlaying
-   (
-   void
-   )
-
-   {
-   return( MV_VoicesPlaying() );
-   }
-
-
-/*---------------------------------------------------------------------
    Function: FX_StopSound
 
    Halts playback of a specific voice
@@ -918,60 +508,3 @@
 
    return( FX_Ok );
    }
-
-
-/*---------------------------------------------------------------------
-   Function: FX_StartDemandFeedPlayback
-
-   Plays a digitized sound from a user controlled buffering system.
----------------------------------------------------------------------*/
-
-int FX_StartDemandFeedPlayback
-   (
-   void ( *function )( char **ptr, uint32_t *length ),
-   int32_t rate,
-   int32_t pitchoffset,
-   int32_t vol,
-   int32_t left,
-   int32_t right,
-   int32_t priority,
-   uint32_t callbackval
-   )
-
-   {
-   int handle;
-
-   handle = MV_StartDemandFeedPlayback( function, rate,
-      pitchoffset, vol, left, right, priority, callbackval );
-   if ( handle < MV_Ok )
-      {
-      FX_SetErrorCode( FX_MultiVocError );
-      handle = FX_Warning;
-      }
-
-   return( handle );
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: FX_StartRecording
-
-   Starts the sound recording engine.
----------------------------------------------------------------------*/
-
-int FX_StartRecording(int MixRate, void (*function)(char* ptr, int length))
-{
-    FX_SetErrorCode(FX_InvalidCard);
-    return FX_Warning;
-}
-
-
-/*---------------------------------------------------------------------
-   Function: FX_StopRecord
-
-   Stops the sound record engine.
----------------------------------------------------------------------*/
-
-void FX_StopRecord(void)
-{
-}
--- a/Game/src/audiolib/fx_man.h
+++ b/Game/src/audiolib/fx_man.h
@@ -33,23 +33,11 @@
 
 #include <inttypes.h>
 
-typedef struct
-   {
-   int MaxVoices;
-   int MaxSampleBits;
-   int MaxChannels;
-   } fx_device;
-
-#define MonoFx   1
-#define StereoFx 2
-
 enum FX_ERRORS
    {
    FX_Warning = -2,
    FX_Error = -1,
    FX_Ok = 0,
-   FX_ASSVersion,
-   FX_BlasterError,
    FX_SoundCardError,
    FX_InvalidCard,
    FX_MultiVocError,
@@ -56,45 +44,22 @@
    FX_DPMI_Error
    };
 
-enum fx_BLASTER_Types
-   {
-   fx_SB     = 1,
-   fx_SBPro  = 2,
-   fx_SB20   = 3,
-   fx_SBPro2 = 4,
-   fx_SB16   = 6
-   };
-
-
 char *FX_ErrorString( int ErrorNumber );
-int   FX_SetupCard( int SoundCard, fx_device *device );
-int   FX_Init( int SoundCard, int numvoices, int numchannels, int samplebits, unsigned mixrate );
+int   FX_Init( int SoundCard, int numvoices, int numchannels, int samplebits, int mixrate );
 int   FX_Shutdown( void );
 int   FX_SetCallBack( void ( *function )( int32_t ) );
 void  FX_SetVolume( int volume );
-int   FX_GetVolume( void );
 
 void  FX_SetReverseStereo( int setting );
 int   FX_GetReverseStereo( void );
 void  FX_SetReverb( int reverb );
-void  FX_SetFastReverb( int reverb );
-int   FX_GetMaxReverbDelay( void );
-int   FX_GetReverbDelay( void );
 void  FX_SetReverbDelay( int delay );
 
 int FX_VoiceAvailable( int priority );
-int FX_EndLooping( int handle );
-int FX_SetPan( int handle, int vol, int left, int right );
-int FX_SetPitch( int handle, int pitchoffset );
-int FX_SetFrequency( int handle, int frequency );
 
-int FX_PlayVOC( uint8_t *ptr, int pitchoffset, int vol, int left, int right,
-       int priority, uint32_t callbackval );
 int FX_PlayLoopedVOC( uint8_t *ptr, int32_t loopstart, int32_t loopend,
        int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority,
        uint32_t callbackval );
-int FX_PlayWAV( uint8_t *ptr, int pitchoffset, int vol, int left, int right,
-       int priority, uint32_t callbackval );
 int FX_PlayLoopedWAV( uint8_t *ptr, int32_t loopstart, int32_t loopend,
        int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority,
        uint32_t callbackval );
@@ -102,21 +67,8 @@
        int32_t priority, uint32_t callbackval );
 int FX_PlayWAV3D( uint8_t *ptr, int pitchoffset, int angle, int distance,
        int priority, uint32_t callbackval );
-int FX_PlayRaw( uint8_t  *ptr, uint32_t length, uint32_t rate,
-       int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority,
-       uint32_t callbackval );
-int FX_PlayLoopedRaw( uint8_t *ptr, uint32_t length, char *loopstart,
-       char *loopend, uint32_t rate, int32_t pitchoffset, int32_t vol, int32_t left,
-       int32_t right, int32_t priority, uint32_t callbackval );
 int32_t FX_Pan3D( int handle, int angle, int distance );
-int32_t FX_SoundActive( int32_t handle );
-int32_t FX_SoundsPlaying( void );
 int32_t FX_StopSound( int handle );
 int32_t FX_StopAllSounds( void );
-int32_t FX_StartDemandFeedPlayback( void ( *function )( char **ptr, uint32_t *length ),
-       int32_t rate, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right,
-       int32_t priority, uint32_t callbackval );
-int  FX_StartRecording( int MixRate, void ( *function )( char *ptr, int length ) );
-void FX_StopRecord( void );
 
 #endif
--- a/Game/src/audiolib/multivoc.c
+++ b/Game/src/audiolib/multivoc.c
@@ -65,10 +65,9 @@
 static Pan MV_PanTable[ MV_NumPanPositions ][ 63 + 1 ];
 
 static int MV_Installed   = FALSE;
-static int MV_SoundCard   = SoundBlaster;
+static int MV_SoundCard   = SC_Unknown;
 static int MV_TotalVolume = MV_MaxTotalVolume;
 static int MV_MaxVoices   = 1;
-static int MV_Recording;
 
 int MV_BufferSize = MixBufferSize;
 static int MV_BufferLength;
@@ -1038,11 +1037,6 @@
    VoiceNode   *voice;
    VoiceNode   *node;
 
-   if ( MV_Recording )
-      {
-      return( NULL );
-      }
-
    // Check if we have any free voices
    if ( LL_Empty( &VoicePool, next, prev ) )
       {
@@ -1155,74 +1149,6 @@
 
 
 /*---------------------------------------------------------------------
-   Function: MV_SetPitch
-
-   Sets the pitch for the voice associated with the specified handle.
----------------------------------------------------------------------*/
-
-int MV_SetPitch
-   (
-   int handle,
-   int pitchoffset
-   )
-
-   {
-   VoiceNode *voice;
-
-   if ( !MV_Installed )
-      {
-      MV_SetErrorCode( MV_NotInstalled );
-      return( MV_Error );
-      }
-
-   voice = MV_GetVoice( handle );
-   if ( voice == NULL )
-      {
-      MV_SetErrorCode( MV_VoiceNotFound );
-      return( MV_Error );
-      }
-
-   MV_SetVoicePitch( voice, voice->SamplingRate, pitchoffset );
-
-   return( MV_Ok );
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: MV_SetFrequency
-
-   Sets the frequency for the voice associated with the specified handle.
----------------------------------------------------------------------*/
-
-int MV_SetFrequency
-   (
-   int handle,
-   int frequency
-   )
-
-   {
-   VoiceNode *voice;
-
-   if ( !MV_Installed )
-      {
-      MV_SetErrorCode( MV_NotInstalled );
-      return( MV_Error );
-      }
-
-   voice = MV_GetVoice( handle );
-   if ( voice == NULL )
-      {
-      MV_SetErrorCode( MV_VoiceNotFound );
-      return( MV_Error );
-      }
-
-   MV_SetVoicePitch( voice, frequency, 0 );
-
-   return( MV_Ok );
-   }
-
-
-/*---------------------------------------------------------------------
    Function: MV_GetVolumeTable
 
    Returns a pointer to the volume table associated with the specified
@@ -1377,43 +1303,6 @@
 
 
 /*---------------------------------------------------------------------
-   Function: MV_EndLooping
-
-   Stops the voice associated with the specified handle from looping
-   without stoping the sound.
----------------------------------------------------------------------*/
-
-int MV_EndLooping
-   (
-   int handle
-   )
-
-   {
-   VoiceNode *voice;
-   unsigned flags;
-
-   if ( !MV_Installed )
-      {
-      MV_SetErrorCode( MV_NotInstalled );
-      return( MV_Error );
-      }
-
-   voice = MV_GetVoice( handle );
-   if ( voice == NULL )
-      {
-      MV_SetErrorCode( MV_VoiceNotFound );
-      return( MV_Warning );
-      }
-
-   voice->LoopCount = 0;
-   voice->LoopStart = NULL;
-   voice->LoopEnd   = NULL;
-
-   return( MV_Ok );
-   }
-
-
-/*---------------------------------------------------------------------
    Function: MV_SetPan
 
    Sets the stereo and mono volume level of the voice associated
@@ -1511,23 +1400,6 @@
 
 
 /*---------------------------------------------------------------------
-   Function: MV_SetFastReverb
-
-   Sets the level of reverb to add to mix.
----------------------------------------------------------------------*/
-
-void MV_SetFastReverb
-   (
-   int reverb
-   )
-
-   {
-   MV_ReverbLevel = max( 0, min( 16, reverb ) );
-   MV_ReverbTable = -1;
-   }
-
-
-/*---------------------------------------------------------------------
    Function: MV_GetMaxReverbDelay
 
    Returns the maximum delay time for reverb.
@@ -1548,22 +1420,6 @@
 
 
 /*---------------------------------------------------------------------
-   Function: MV_GetReverbDelay
-
-   Returns the current delay time for reverb.
----------------------------------------------------------------------*/
-
-int MV_GetReverbDelay
-   (
-   void
-   )
-
-   {
-   return MV_ReverbDelay; // / MV_SampleSize;
-   }
-
-
-/*---------------------------------------------------------------------
    Function: MV_SetReverbDelay
 
    Sets the delay level of reverb to add to mix.
@@ -1736,196 +1592,6 @@
 
 
 /*---------------------------------------------------------------------
-   Function: MV_StartRecording
-
-   Starts the sound recording engine.
----------------------------------------------------------------------*/
-
-int MV_StartRecording(int MixRate, void ( *function )( char *ptr, int length ))
-{
-	MV_SetErrorCode( MV_UnsupportedCard );
-	return( MV_Error );
-}
-
-
-/*---------------------------------------------------------------------
-   Function: MV_StopRecord
-
-   Stops the sound record engine.
----------------------------------------------------------------------*/
-
-void MV_StopRecord(void)
-{
-}
-
-
-/*---------------------------------------------------------------------
-   Function: MV_StartDemandFeedPlayback
-
-   Plays a digitized sound from a user controlled buffering system.
----------------------------------------------------------------------*/
-
-int MV_StartDemandFeedPlayback
-   (
-   void ( *function )( char **ptr, uint32_t *length ),
-   int rate,
-   int pitchoffset,
-   int vol,
-   int left,
-   int right,
-   int priority,
-   unsigned long callbackval
-   )
-
-   {
-   VoiceNode *voice;
-
-   if ( !MV_Installed )
-      {
-      MV_SetErrorCode( MV_NotInstalled );
-      return( MV_Error );
-      }
-
-   // Request a voice from the voice pool
-   voice = MV_AllocVoice( priority );
-   if ( voice == NULL )
-      {
-      MV_SetErrorCode( MV_NoVoices );
-      return( MV_Error );
-      }
-
-   voice->wavetype    = DemandFeed;
-   voice->bits        = 8;
-   voice->GetSound    = MV_GetNextDemandFeedBlock;
-   voice->NextBlock   = NULL;
-   voice->DemandFeed  = function;
-   voice->LoopStart   = NULL;
-   voice->LoopCount   = 0;
-   voice->GLast       = -1;
-   voice->GPos        = 0;
-   voice->GVal[0]     = 0;
-   voice->GVal[1]     = 0;
-   voice->GVal[2]     = 0;
-   voice->GVal[3]     = 0;
-   voice->BlockLength = 0;
-   voice->position    = 0;
-   voice->sound       = NULL;
-   voice->length      = 0;
-   voice->BlockLength = 0;
-   voice->Playing     = TRUE;
-   voice->next        = NULL;
-   voice->prev        = NULL;
-   voice->priority    = priority;
-   voice->callbackval = callbackval;
-
-   MV_SetVoicePitch( voice, rate, pitchoffset );
-   MV_SetVoiceVolume( voice, vol, left, right );
-   MV_PlayVoice( voice );
-
-   return( voice->handle );
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: MV_PlayRaw
-
-   Begin playback of sound data with the given sound levels and
-   priority.
----------------------------------------------------------------------*/
-
-int MV_PlayRaw
-   (
-   uint8_t *ptr,
-   unsigned long length,
-   unsigned rate,
-   int   pitchoffset,
-   int   vol,
-   int   left,
-   int   right,
-   int   priority,
-   unsigned long callbackval
-   )
-
-   {
-   int status;
-
-   status = MV_PlayLoopedRaw( ptr, length, NULL, NULL, rate, pitchoffset,
-      vol, left, right, priority, callbackval );
-
-   return( status );
-   }
-
-
-/*---------------------------------------------------------------------
-   Function: MV_PlayLoopedRaw
-
-   Begin playback of sound data with the given sound levels and
-   priority.
----------------------------------------------------------------------*/
-
-int MV_PlayLoopedRaw
-   (
-   uint8_t *ptr,
-   unsigned long length,
-   uint8_t *loopstart,
-   uint8_t *loopend,
-   unsigned rate,
-   int   pitchoffset,
-   int   vol,
-   int   left,
-   int   right,
-   int   priority,
-   unsigned long callbackval
-   )
-
-   {
-   VoiceNode *voice;
-
-   if ( !MV_Installed )
-      {
-      MV_SetErrorCode( MV_NotInstalled );
-      return( MV_Error );
-      }
-
-   // Request a voice from the voice pool
-   voice = MV_AllocVoice( priority );
-   if ( voice == NULL )
-      {
-      MV_SetErrorCode( MV_NoVoices );
-      return( MV_Error );
-      }
-
-   voice->wavetype    = Raw;
-   voice->bits        = 8;
-   voice->GetSound    = MV_GetNextRawBlock;
-   voice->Playing     = TRUE;
-   voice->NextBlock   = ptr;
-   voice->position    = 0;
-   voice->BlockLength = length;
-   voice->length      = 0;
-   voice->next        = NULL;
-   voice->prev        = NULL;
-   voice->priority    = priority;
-   voice->GLast       = -1;
-   voice->GPos        = 0;
-   voice->GVal[0]     = 0;
-   voice->GVal[1]     = 0;
-   voice->GVal[2]     = 0;
-   voice->GVal[3]     = 0;
-   voice->callbackval = callbackval;
-   voice->LoopStart   = loopstart;
-   voice->LoopEnd     = loopend;
-   voice->LoopSize    = ( voice->LoopEnd - voice->LoopStart ) + 1;
-
-   MV_SetVoicePitch( voice, rate, pitchoffset );
-   MV_SetVoiceVolume( voice, vol, left, right );
-   MV_PlayVoice( voice );
-
-   return( voice->handle );
-   }
-
-
-/*---------------------------------------------------------------------
    Function: MV_PlayWAV
 
    Begin playback of sound data with the given sound levels and
@@ -2604,7 +2270,6 @@
    MV_Installed    = TRUE;
    MV_CallBackFunc = NULL;
    MV_RecordFunc   = NULL;
-   MV_Recording    = FALSE;
    MV_ReverbLevel  = 0;
    MV_ReverbTable  = -1;
 
@@ -2688,12 +2353,6 @@
    MV_KillAllVoices();
 
    MV_Installed = FALSE;
-
-   // Stop the sound recording engine
-   if ( MV_Recording )
-      {
-      MV_StopRecord();
-      }
 
    // Stop the sound playback engine
    MV_StopPlayback();
--- a/Game/src/audiolib/multivoc.h
+++ b/Game/src/audiolib/multivoc.h
@@ -73,31 +73,14 @@
 int   MV_Kill( int handle );
 int   MV_VoicesPlaying( void );
 int   MV_VoiceAvailable( int priority );
-int   MV_SetPitch( int handle, int pitchoffset );
-int   MV_SetFrequency( int handle, int frequency );
-int   MV_EndLooping( int handle );
 int   MV_SetPan( int handle, int vol, int left, int right );
 int   MV_Pan3D( int handle, int angle, int distance );
 void  MV_SetReverb( int reverb );
-void  MV_SetFastReverb( int reverb );
 int   MV_GetMaxReverbDelay( void );
-int   MV_GetReverbDelay( void );
 void  MV_SetReverbDelay( int delay );
 int   MV_SetMixMode( int numchannels, int samplebits );
 int   MV_StartPlayback( void );
 void  MV_StopPlayback( void );
-int   MV_StartRecording( int MixRate, void ( *function )( char *ptr, int length ) );
-void  MV_StopRecord( void );
-int   MV_StartDemandFeedPlayback( void ( *function )( char **ptr, uint32_t *length ),
-         int rate, int pitchoffset, int vol, int left, int right,
-         int priority, unsigned long callbackval );
-int   MV_PlayRaw( uint8_t *ptr, unsigned long length,
-         unsigned rate, int pitchoffset, int vol, int left,
-         int right, int priority, unsigned long callbackval );
-int   MV_PlayLoopedRaw( uint8_t *ptr, unsigned long length,
-         uint8_t *loopstart, uint8_t *loopend, unsigned rate, int pitchoffset,
-         int vol, int left, int right, int priority,
-         unsigned long callbackval );
 int   MV_PlayWAV( uint8_t *ptr, int pitchoffset, int vol, int left,
          int right, int priority, unsigned long callbackval );
 int   MV_PlayWAV3D( uint8_t *ptr, int pitchoffset, int angle, int distance,
--- a/Game/src/audiolib/pitch.c
+++ b/Game/src/audiolib/pitch.c
@@ -28,10 +28,6 @@
    (c) Copyright 1993 James R. Dose.  All Rights Reserved.
 **********************************************************************/
 
-#include <stdlib.h>
-//#include <math.h>
-#include "dpmi.h"
-#include "standard.h"
 #include "pitch.h"
 
 #define MAXDETUNE 25
--- a/Game/src/audiolib/sndcards.h
+++ b/Game/src/audiolib/sndcards.h
@@ -31,25 +31,10 @@
 #ifndef __SNDCARDS_H
 #define __SNDCARDS_H
 
-#define ASS_VERSION_STRING "1.12"
-
 typedef enum
-   {
-//   ASS_NoSound,
-   SoundBlaster,
-   ProAudioSpectrum,
-   SoundMan16,
-   Adlib,
-   GenMidi,
-   SoundCanvas,
-   Awe32,
-   WaveBlaster,
-   SoundScape,
-   UltraSound,
-   SoundSource,
-   TandySoundSource,
-   PC,
-   NumSoundCards
-   } soundcardnames;
+{
+    SC_SoundScape,
+    SC_Unknown
+} soundcardnames;
 
 #endif
--- a/Game/src/audiolib/standard.h
+++ /dev/null
@@ -1,72 +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: STANDARD.H
-
-   author: James R. Dose
-   date:   May 25, 1994
-
-   Header containing standard definitions.
-
-   (c) Copyright 1994 James R. Dose.  All Rights Reserved.
-**********************************************************************/
-
-#ifndef __STANDARD_H
-#define __STANDARD_H
-
-typedef int boolean;
-typedef int errorcode;
-
-#ifndef TRUE
-   #define TRUE ( 1 == 1 )
-   #define FALSE ( !TRUE )
-#endif
-
-enum STANDARD_ERRORS
-   {
-   Warning = -2,
-   FatalError = -1,
-   Success = 0
-   };
-
-#define BITSET( data, bit ) \
-   ( ( ( data ) & ( bit ) ) == ( bit ) )
-
-#define ARRAY_LENGTH( array ) \
-   ( sizeof( array ) / sizeof( ( array )[ 0 ] ) )
-
-#define WITHIN_BOUNDS( array, index ) \
-   ( ( 0 <= ( index ) ) && ( ( index ) < ARRAY_LENGTH( array ) ) )
-
-#define FOREVER    for( ; ; )
-
-#ifdef NDEBUG
-   #define DEBUGGING 0
-#else
-   #define DEBUGGING 1
-#endif
-
-#define DEBUG_CODE \
-   if ( DEBUGGING == 0 ) \
-      { \
-      } \
-   else
-
-#endif
--- a/Game/src/audiolib/usrhooks.h
+++ b/Game/src/audiolib/usrhooks.h
@@ -33,6 +33,8 @@
 #ifndef __USRHOOKS_H
 #define __USRHOOKS_H
 
+#include <stdint.h>
+
 /*---------------------------------------------------------------------
    Error definitions
 ---------------------------------------------------------------------*/
--- a/Game/src/config.c
+++ b/Game/src/config.c
@@ -213,7 +213,7 @@
    OpponentSoundToggle = 1;
    FXVolume = 220;
    MusicVolume = 200;
-   FXDevice = SoundScape;
+   FXDevice = SC_SoundScape;
    MusicDevice = -1;
    ReverseStereo = 0;
    
@@ -687,8 +687,8 @@
    SCRIPT_GetNumber( scripthandle, "Sound Setup", "FXDevice",&FXDevice);
 
 	// reimplementation of ASS expects a "SoundScape".
-	if (FXDevice != NumSoundCards)
-	    FXDevice = SoundScape;
+	if (FXDevice != SC_Unknown)
+	    FXDevice = SC_SoundScape;
 
    SCRIPT_GetNumber( scripthandle, "Sound Setup", "MusicDevice",&MusicDevice);
    SCRIPT_GetNumber( scripthandle, "Sound Setup", "FXVolume",&FXVolume);
--- a/Game/src/duke3d.h
+++ b/Game/src/duke3d.h
@@ -516,7 +516,6 @@
 extern uint8_t  scantoasc[128],ready2send;
 extern uint8_t  scantoascwithshift[128];
 
-extern fx_device device;
 extern SAMPLE Sound[ NUM_SOUNDS ];
 extern int32 VoiceToggle,AmbienceToggle, OpponentSoundToggle;
 extern int32 mouseSensitivity_X, mouseSensitivity_Y;
--- a/Game/src/game.c
+++ b/Game/src/game.c
@@ -629,7 +629,7 @@
 
                 if(numlumps == 0) break;
 
-                if (SoundToggle == 0 || ud.lockout == 1 || FXDevice == NumSoundCards)
+                if (SoundToggle == 0 || ud.lockout == 1 || FXDevice == SC_Unknown)
                     break;
                 rtsptr = RTS_GetSound(packbuf[1]-1);
                 if (*rtsptr == 'C')
@@ -6866,7 +6866,7 @@
             }
         }
 
-        if(KB_KeyPressed( sc_F4 ) && FXDevice != NumSoundCards )
+        if(KB_KeyPressed( sc_F4 ) && FXDevice != SC_Unknown )
         {
             KB_ClearKeyDown( sc_F4 );
             FX_StopAllSounds();
@@ -6934,7 +6934,7 @@
             FTA(109+ps[myconnectindex].over_shoulder_on,&ps[myconnectindex],1);
         }
 
-        if( KB_KeyPressed( sc_F5 ) && MusicDevice != NumSoundCards )
+        if( KB_KeyPressed( sc_F5 ) && MusicDevice != SC_Unknown )
         {
             KB_ClearKeyDown( sc_F5 );
             strcpy(text,&music_fn[0][music_select][0]);
@@ -8236,7 +8236,7 @@
 
     Startup();
 
-    if( eightytwofifty && numplayers > 1 && (MusicDevice != NumSoundCards) )
+    if( eightytwofifty && numplayers > 1 && (MusicDevice != SC_Unknown) )
     {
         puts("\n=========================================================================");
         puts("WARNING: 8250 UART detected.");
@@ -9951,7 +9951,7 @@
 
     if(playerswhenstarted > 1 && ud.coop != 1 )
     {
-        if(!(MusicToggle == 0 || MusicDevice == NumSoundCards))
+        if(!(MusicToggle == 0 || MusicDevice == SC_Unknown))
             sound(BONUSMUSIC);
 
         rotatesprite(0,0,65536L,0,MENUSCREEN,16,0,2+8+16+64,0,0,xdim-1,ydim-1);
@@ -10059,7 +10059,7 @@
 
     gametext(160,192,"PRESS ANY KEY TO CONTINUE",16,2+8+16);
 
-    if(!(MusicToggle == 0 || MusicDevice == NumSoundCards))
+    if(!(MusicToggle == 0 || MusicDevice == SC_Unknown))
         sound(BONUSMUSIC);
 
     nextpage();
--- a/Game/src/global.c
+++ b/Game/src/global.c
@@ -113,8 +113,6 @@
 
 short title_zoom;
 
-fx_device device;
-
 SAMPLE Sound[ NUM_SOUNDS ];
 SOUNDOWNER SoundOwner[NUM_SOUNDS][4];
 
--- a/Game/src/menues.c
+++ b/Game/src/menues.c
@@ -2518,7 +2518,7 @@
                     break;
 
                 case 0:
-                    if (FXDevice != NumSoundCards)
+                    if (FXDevice != SC_Unknown)
                     {
                         SoundToggle = 1-SoundToggle;
                         if( SoundToggle == 0 )
@@ -2532,7 +2532,7 @@
 				case 1:
 
                     if(eightytwofifty == 0 || numplayers < 2)
-                        if(MusicDevice != NumSoundCards)
+                        if(MusicDevice != SC_Unknown)
                     {
                         MusicToggle = 1-MusicToggle;
                         if( MusicToggle == 0 ) 
@@ -2549,15 +2549,15 @@
                     break;
 
                 case 4:
-                    if(SoundToggle && (FXDevice != NumSoundCards)) VoiceToggle = 1-VoiceToggle;
+                    if(SoundToggle && (FXDevice != SC_Unknown)) VoiceToggle = 1-VoiceToggle;
                     break;
 
 				case 5:
-                    if(SoundToggle && (FXDevice != NumSoundCards)) AmbienceToggle = 1-AmbienceToggle;
+                    if(SoundToggle && (FXDevice != SC_Unknown)) AmbienceToggle = 1-AmbienceToggle;
                     break;
 
 				case 6:
-                    if(SoundToggle && (FXDevice != NumSoundCards))
+                    if(SoundToggle && (FXDevice != SC_Unknown))
                     {
                         ReverseStereo = 1-ReverseStereo;
                         FX_SetReverseStereo(ReverseStereo);
@@ -2565,7 +2565,7 @@
                     break;
 
 				case 7: // xduke: 1.3d sound style - hear opponent
-					if(SoundToggle && (FXDevice != NumSoundCards))
+					if(SoundToggle && (FXDevice != SC_Unknown))
                     {
                         OpponentSoundToggle = 1-OpponentSoundToggle;
                     }
@@ -2575,33 +2575,33 @@
                     break;
             }
 
-            if(SoundToggle && FXDevice != NumSoundCards) menutext(c+160+40,43,0,(FXDevice == NumSoundCards),"ON");
-            else menutext(c+160+40,43,0,(FXDevice == NumSoundCards),"OFF");
+            if(SoundToggle && FXDevice != SC_Unknown) menutext(c+160+40,43,0,(FXDevice == SC_Unknown),"ON");
+            else menutext(c+160+40,43,0,(FXDevice == SC_Unknown),"OFF");
 
-            if(MusicToggle && (MusicDevice != NumSoundCards) && (!eightytwofifty||numplayers<2))
-                menutext(c+160+40,43+16,0,(MusicDevice == NumSoundCards),"ON");
-            else menutext(c+160+40,43+16,0,(MusicDevice == NumSoundCards),"OFF");
+            if(MusicToggle && (MusicDevice != SC_Unknown) && (!eightytwofifty||numplayers<2))
+                menutext(c+160+40,43+16,0,(MusicDevice == SC_Unknown),"ON");
+            else menutext(c+160+40,43+16,0,(MusicDevice == SC_Unknown),"OFF");
 
-            menutext(c,43,SHX(-2),(FXDevice == NumSoundCards),"SOUND");
-            menutext(c,43+16+16,SHX(-4),(FXDevice==NumSoundCards)||SoundToggle==0,"SOUND VOLUME");
+            menutext(c,43,SHX(-2),(FXDevice == SC_Unknown),"SOUND");
+            menutext(c,43+16+16,SHX(-4),(FXDevice==SC_Unknown)||SoundToggle==0,"SOUND VOLUME");
             {
                 l = FXVolume;
                 FXVolume >>= 2;
-                bar(c+167+40,43+16+16,(short *)&FXVolume,4,(FXDevice!=NumSoundCards)&&x==2,SHX(-4),SoundToggle==0||(FXDevice==NumSoundCards));
+                bar(c+167+40,43+16+16,(short *)&FXVolume,4,(FXDevice!=SC_Unknown)&&x==2,SHX(-4),SoundToggle==0||(FXDevice==SC_Unknown));
                 if(l != FXVolume)
                     FXVolume <<= 2;
                 if(l != FXVolume)
                     FX_SetVolume( (short) FXVolume );
             }
-            menutext(c,43+16,SHX(-3),(MusicDevice==NumSoundCards),"MUSIC");
-            menutext(c,43+16+16+16,SHX(-5),(MusicDevice==NumSoundCards)||(numplayers > 1 && eightytwofifty)||MusicToggle==0,"MUSIC VOLUME");
+            menutext(c,43+16,SHX(-3),(MusicDevice==SC_Unknown),"MUSIC");
+            menutext(c,43+16+16+16,SHX(-5),(MusicDevice==SC_Unknown)||(numplayers > 1 && eightytwofifty)||MusicToggle==0,"MUSIC VOLUME");
             {
                 l = MusicVolume;
                 MusicVolume >>= 2;
                 bar(c+167+40,43+16+16+16,
                     (short *)&MusicVolume,4,
-                    (eightytwofifty==0||numplayers < 2) && (MusicDevice!=NumSoundCards) && x==3,SHX(-5),
-                    (numplayers > 1 && eightytwofifty)||MusicToggle==0||(MusicDevice==NumSoundCards));
+                    (eightytwofifty==0||numplayers < 2) && (MusicDevice!=SC_Unknown) && x==3,SHX(-5),
+                    (numplayers > 1 && eightytwofifty)||MusicToggle==0||(MusicDevice==SC_Unknown));
                 MusicVolume <<= 2;
                 if(l != MusicVolume)
                 {
@@ -2610,23 +2610,23 @@
                     MUSIC_SetVolume( (short) MusicVolume );
                 }
             }
-            menutext(c,43+16+16+16+16,SHX(-6),(FXDevice==NumSoundCards)||SoundToggle==0,"DUKE TALK");
-            menutext(c,43+16+16+16+16+16,SHX(-7),(FXDevice==NumSoundCards)||SoundToggle==0,"AMBIENCE");
+            menutext(c,43+16+16+16+16,SHX(-6),(FXDevice==SC_Unknown)||SoundToggle==0,"DUKE TALK");
+            menutext(c,43+16+16+16+16+16,SHX(-7),(FXDevice==SC_Unknown)||SoundToggle==0,"AMBIENCE");
 
-            menutext(c,43+16+16+16+16+16+16,SHX(-8),(FXDevice==NumSoundCards)||SoundToggle==0,"FLIP STEREO");
+            menutext(c,43+16+16+16+16+16+16,SHX(-8),(FXDevice==SC_Unknown)||SoundToggle==0,"FLIP STEREO");
 
-            if(VoiceToggle) menutext(c+160+40,43+16+16+16+16,0,(FXDevice==NumSoundCards)||SoundToggle==0,"ON");
-            else menutext(c+160+40,43+16+16+16+16,0,(FXDevice==NumSoundCards)||SoundToggle==0,"OFF");
+            if(VoiceToggle) menutext(c+160+40,43+16+16+16+16,0,(FXDevice==SC_Unknown)||SoundToggle==0,"ON");
+            else menutext(c+160+40,43+16+16+16+16,0,(FXDevice==SC_Unknown)||SoundToggle==0,"OFF");
 
-            if(AmbienceToggle) menutext(c+160+40,43+16+16+16+16+16,0,(FXDevice==NumSoundCards)||SoundToggle==0,"ON");
-            else menutext(c+160+40,43+16+16+16+16+16,0,(FXDevice==NumSoundCards)||SoundToggle==0,"OFF");
+            if(AmbienceToggle) menutext(c+160+40,43+16+16+16+16+16,0,(FXDevice==SC_Unknown)||SoundToggle==0,"ON");
+            else menutext(c+160+40,43+16+16+16+16+16,0,(FXDevice==SC_Unknown)||SoundToggle==0,"OFF");
 
-            if(ReverseStereo) menutext(c+160+40,43+16+16+16+16+16+16,0,(FXDevice==NumSoundCards)||SoundToggle==0,"ON");
-            else menutext(c+160+40,43+16+16+16+16+16+16,0,(FXDevice==NumSoundCards)||SoundToggle==0,"OFF");
+            if(ReverseStereo) menutext(c+160+40,43+16+16+16+16+16+16,0,(FXDevice==SC_Unknown)||SoundToggle==0,"ON");
+            else menutext(c+160+40,43+16+16+16+16+16+16,0,(FXDevice==SC_Unknown)||SoundToggle==0,"OFF");
 
-            menutext(c,43+16+16+16+16+16+16+16,SHX(-9),(FXDevice==NumSoundCards)||SoundToggle==0,"OPPONENT SOUND");
-			if(OpponentSoundToggle) menutext(c+160+40,43+16+16+16+16+16+16+16,0,(FXDevice==NumSoundCards)||SoundToggle==0,"ON");
-			else menutext(c+160+40,43+16+16+16+16+16+16+16,0,(FXDevice==NumSoundCards)||SoundToggle==0,"OFF");
+            menutext(c,43+16+16+16+16+16+16+16,SHX(-9),(FXDevice==SC_Unknown)||SoundToggle==0,"OPPONENT SOUND");
+			if(OpponentSoundToggle) menutext(c+160+40,43+16+16+16+16+16+16+16,0,(FXDevice==SC_Unknown)||SoundToggle==0,"ON");
+			else menutext(c+160+40,43+16+16+16+16+16+16+16,0,(FXDevice==SC_Unknown)||SoundToggle==0,"OFF");
 
             break;
 
--- a/Game/src/premap.c
+++ b/Game/src/premap.c
@@ -238,7 +238,7 @@
     int32_t   l;
 
     if(num >= NUM_SOUNDS || SoundToggle == 0) return 0;
-    if (FXDevice == NumSoundCards) return 0;
+    if (FXDevice == SC_Unknown) return 0;
 
     fp = TCkopen4load(sounds[num],0);
     if(fp == -1) return 0;
@@ -262,7 +262,7 @@
 {
     short i, j;
 
-    if (FXDevice == NumSoundCards) return;
+    if (FXDevice == SC_Unknown) return;
     j = 0;
 
     for(i=0;i<NUM_SOUNDS;i++)
--- a/Game/src/sounds.c
+++ b/Game/src/sounds.c
@@ -50,7 +50,7 @@
     int32 status;
 
     // if they chose None lets return
-    if (FXDevice == NumSoundCards) return;
+    if (FXDevice == SC_Unknown) return;
 
     if (eightytwofifty && numplayers > 1)
     {
@@ -95,7 +95,7 @@
    int32 status;
 
    // if they chose None lets return
-   if (FXDevice == NumSoundCards)
+   if (FXDevice == SC_Unknown)
       return;
 
    status = FX_Shutdown();
@@ -118,7 +118,7 @@
    int32 status;
 
    // if they chose None lets return
-   if ((MusicDevice == NumSoundCards) || (eightytwofifty && numplayers > 1) )
+   if ((MusicDevice == SC_Unknown) || (eightytwofifty && numplayers > 1) )
       return;
 
    status = MUSIC_Init( MusicDevice, MidiPort );
@@ -154,7 +154,7 @@
    int32 status;
 
    // if they chose None lets return
-   if ((MusicDevice == NumSoundCards) || (eightytwofifty && numplayers > 1) )
+   if ((MusicDevice == SC_Unknown) || (eightytwofifty && numplayers > 1) )
       return;
 
    status = MUSIC_Shutdown();
@@ -213,7 +213,7 @@
 void playmusic(char  *fn)
 {
     if(MusicToggle == 0) return;
-    if(MusicDevice == NumSoundCards) return;
+    if(MusicDevice == SC_Unknown) return;
 
     // the SDL_mixer version does more or less this same thing.  --ryan.
     PlayMusic(fn);
@@ -224,7 +224,7 @@
     int32_t   fp, l;
 
     if(num >= NUM_SOUNDS || SoundToggle == 0) return 0;
-    if (FXDevice == NumSoundCards) return 0;
+    if (FXDevice == SC_Unknown) return 0;
 
     fp = TCkopen4load(sounds[num],0);
     if(fp == -1)
@@ -252,7 +252,7 @@
     int voice, sndang, ca, pitch;
 	
     if( num >= NUM_SOUNDS ||
-        FXDevice == NumSoundCards ||
+        FXDevice == SC_Unknown ||
         ( (soundm[num]&8) && ud.lockout ) ||
         SoundToggle == 0 ||
         Sound[num].num > 3 ||
@@ -393,7 +393,7 @@
     int voice;
     int32_t start;
 
-    if (FXDevice == NumSoundCards) return;
+    if (FXDevice == SC_Unknown) return;
     if(SoundToggle==0) return;
     if(VoiceToggle==0 && (soundm[num]&4) ) return;
     if( (soundm[num]&8) && ud.lockout ) return;