All support for playing back CD-DA has been removed by leaving only the
SDL2 clients, and it is rather unlikely for CD-DA support to come back.
However while doing so, the CONFIG_CD macro was disabled in the makefile
but not the MSVC project, which broke faketracks (i.e. background music
via track003.ogg files) on Linux.
This change removes all #ifdefs for CONFIG_CD as well as its enablement
in the MSVC project, which is basically equivalent to having the feature
always being enabled.
Fixes background music in Quake with ripped music, Nexuiz, Xonotic, and
probably many other DP-based games. Also fixes Xonotic log spam about
gettime(GETTIME_CDTRACK).
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12466
d7cf8633-e32d-0410-b094-
e92efae38249
// cl_parse.c -- parse a message received from the server
#include "quakedef.h"
-#ifdef CONFIG_CD
#include "cdaudio.h"
-#endif
#include "cl_collision.h"
#include "csprogs.h"
#include "libcurl.h"
case qw_svc_cdtrack:
cl.cdtrack = cl.looptrack = MSG_ReadByte(&cl_message);
-#ifdef CONFIG_CD
if ( (cls.demoplayback || cls.demorecording) && (cls.forcetrack != -1) )
CDAudio_Play ((unsigned char)cls.forcetrack, true);
else
CDAudio_Play ((unsigned char)cl.cdtrack, true);
-#endif
break;
case qw_svc_intermission:
case qw_svc_setpause:
cl.paused = MSG_ReadByte(&cl_message) != 0;
-#ifdef CONFIG_CD
if (cl.paused)
CDAudio_Pause ();
else
CDAudio_Resume ();
-#endif
S_PauseGameSounds (cl.paused);
break;
}
case svc_setpause:
cl.paused = MSG_ReadByte(&cl_message) != 0;
-#ifdef CONFIG_CD
if (cl.paused)
CDAudio_Pause ();
else
CDAudio_Resume ();
-#endif
S_PauseGameSounds (cl.paused);
break;
case svc_cdtrack:
cl.cdtrack = MSG_ReadByte(&cl_message);
cl.looptrack = MSG_ReadByte(&cl_message);
-#ifdef CONFIG_CD
if ( (cls.demoplayback || cls.demorecording) && (cls.forcetrack != -1) )
CDAudio_Play ((unsigned char)cls.forcetrack, true);
else
CDAudio_Play ((unsigned char)cl.cdtrack, true);
-#endif
break;
case svc_intermission:
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
<ClCompile>\r
<Optimization>Disabled</Optimization>\r
- <PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;CONFIG_VIDEO_CAPTURE;WIN32;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>CONFIG_MENU;CONFIG_VIDEO_CAPTURE;WIN32;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<MinimalRebuild>true</MinimalRebuild>\r
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
</Midl>\r
<ClCompile>\r
<Optimization>Disabled</Optimization>\r
- <PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;CONFIG_VIDEO_CAPTURE;WIN32;WIN64;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>CONFIG_MENU;CONFIG_VIDEO_CAPTURE;WIN32;WIN64;_DEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<MinimalRebuild>true</MinimalRebuild>\r
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
<ClCompile>\r
<Optimization>MaxSpeed</Optimization>\r
<IntrinsicFunctions>true</IntrinsicFunctions>\r
- <PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;CONFIG_VIDEO_CAPTURE;WIN32;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>CONFIG_MENU;CONFIG_VIDEO_CAPTURE;WIN32;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
<FunctionLevelLinking>true</FunctionLevelLinking>\r
<PrecompiledHeader />\r
<ClCompile>\r
<Optimization>MaxSpeed</Optimization>\r
<IntrinsicFunctions>true</IntrinsicFunctions>\r
- <PreprocessorDefinitions>CONFIG_MENU;CONFIG_CD;CONFIG_VIDEO_CAPTURE;WIN32;WIN64;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>CONFIG_MENU;CONFIG_VIDEO_CAPTURE;WIN32;WIN64;NDEBUG;_WINDOWS;_FILE_OFFSET_BITS=64;__KERNEL_STRICT_NAMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
<FunctionLevelLinking>true</FunctionLevelLinking>\r
<PrecompiledHeader />\r
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
<ImportGroup Label="ExtensionTargets">\r
</ImportGroup>\r
-</Project>
\ No newline at end of file
+</Project>\r
#include <time.h>
#include "libcurl.h"
-#ifdef CONFIG_CD
#include "cdaudio.h"
-#endif
#include "cl_video.h"
#include "progsvm.h"
#include "csprogs.h"
else
S_Update(&r_refdef.view.matrix);
-#ifdef CONFIG_CD
CDAudio_Update();
R_TimeReport("audio");
-#endif
// reset gathering of mouse input
in_mouse_x = in_mouse_y = 0;
// make sure we open sockets before opening video because the Windows Firewall "unblock?" dialog can screw up the graphics context on some graphics drivers
NetConn_UpdateSockets();
VID_Start();
-#ifdef CONFIG_CD
CDAudio_Startup();
-#endif
}
}
VID_Init();
Render_Init();
S_Init();
-#ifdef CONFIG_CD
CDAudio_Init();
-#endif
Key_Init();
CL_Init();
}
Host_SaveConfig();
-#ifdef CONFIG_CD
CDAudio_Shutdown ();
-#endif
S_Terminate ();
Curl_Shutdown ();
NetConn_Shutdown ();
*/
#include "quakedef.h"
-#ifdef CONFIG_CD
#include "cdaudio.h"
-#endif
#include "image.h"
#include "progsvm.h"
else if (options_cursor == optnum++) Cvar_SetValueQuick(&v_contrast, bound(1, v_contrast.value + dir * 0.0625, 4));
else if (options_cursor == optnum++) Cvar_SetValueQuick(&v_gamma, bound(0.5, v_gamma.value + dir * 0.0625, 3));
else if (options_cursor == optnum++) Cvar_SetValueQuick(&volume, bound(0, volume.value + dir * 0.0625, 1));
-#ifdef CONFIG_CD
else if (options_cursor == optnum++) Cvar_SetValueQuick(&bgmvolume, bound(0, bgmvolume.value + dir * 0.0625, 1));
-#endif
}
static int m_optnum;
M_Options_PrintSlider( " Brightness", true, v_contrast.value, 1, 2);
M_Options_PrintSlider( " Gamma", true, v_gamma.value, 0.5, 3);
M_Options_PrintSlider( " Sound Volume", snd_initialized.integer, volume.value, 0, 1);
-#ifdef CONFIG_CD
M_Options_PrintSlider( " Music Volume", cdaudioinitialized.integer, bgmvolume.value, 0, 1);
-#endif
M_Options_PrintCommand( " Customize Effects", true);
M_Options_PrintCommand( " Effects: Quake", true);
M_Options_PrintCommand( " Effects: Normal", true);
float gettime(prvm_prog_t *prog)
=========
*/
-#ifdef CONFIG_CD
float CDAudio_GetPosition(void);
-#endif
void VM_gettime(prvm_prog_t *prog)
{
int timer_index;
case 3: // GETTIME_UPTIME
PRVM_G_FLOAT(OFS_RETURN) = realtime;
break;
-#ifdef CONFIG_CD
case 4: // GETTIME_CDTRACK
PRVM_G_FLOAT(OFS_RETURN) = CDAudio_GetPosition();
break;
-#endif
default:
VM_Warning(prog, "VM_gettime: %s: unsupported timer specified, returning realtime\n", prog->name);
PRVM_G_FLOAT(OFS_RETURN) = realtime;
#include "snd_ogg.h"
#include "csprogs.h"
#include "cl_collision.h"
-#ifdef CONFIG_CD
#include "cdaudio.h"
-#endif
#define SND_MIN_SPEED 8000
if (snd_renderbuffer == NULL)
return;
-#ifdef CONFIG_CD
// stop CD audio because it may be using a faketrack
CDAudio_Stop();
-#endif
if (simsound || SndSys_LockRenderBuffer ())
{
#include "quakedef.h"
-#ifdef CONFIG_CD
#include "cdaudio.h"
-#endif
#include "image.h"
#ifdef WIN32