Index: source/lib/config2.h =================================================================== --- source/lib/config2.h +++ source/lib/config2.h @@ -89,7 +89,7 @@ // allow use of OpenAL/Ogg/Vorbis APIs #ifndef CONFIG2_AUDIO -# define CONFIG2_AUDIO 1 +# define CONFIG2_AUDIO 0 #endif // allow use of NVTT Index: source/ps/Util.cpp =================================================================== --- source/ps/Util.cpp +++ source/ps/Util.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Wildfire Games. +/* Copyright (C) 2020 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -81,9 +81,6 @@ { TIMER(L"write_sys_info"); - // get_cpu_info and gfx_detect already called during init - see call site - snd_detect(); - struct utsname un; uname(&un); @@ -137,9 +134,15 @@ fprintf(f, "OpenGL Drivers : %s; %ls\n", glGetString(GL_VERSION), driverInfo.c_str()); fprintf(f, "Video Mode : %dx%d:%d\n", g_VideoMode.GetXRes(), g_VideoMode.GetYRes(), g_VideoMode.GetBPP()); +#if CONFIG2_AUDIO // sound + // get_cpu_info and gfx_detect already called during init - see call site + snd_detect(); fprintf(f, "Sound Card : %s\n", snd_card.c_str()); fprintf(f, "Sound Drivers : %s\n", snd_drv_ver.c_str()); +#else + fprintf(f, "Sound : Game was compiled without audio\n"); +#endif // OpenGL extensions (write them last, since it's a lot of text) const char* exts = ogl_ExtensionString(); Index: source/soundmanager/scripting/JSInterface_Sound.cpp =================================================================== --- source/soundmanager/scripting/JSInterface_Sound.cpp +++ source/soundmanager/scripting/JSInterface_Sound.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 Wildfire Games. +/* Copyright (C) 2020 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -125,11 +125,11 @@ void ClearPlaylist(ScriptInterface::CxPrivate* UNUSED(pCxPrivate) ){} void StopMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate) ){} void StartMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate) ){} - void SetMasterGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){} - void SetMusicGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){} - void SetAmbientGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){} - void SetActionGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){} - void SetUIGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){} + void SetMasterGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float UNUSED(gain)){} + void SetMusicGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float UNUSED(gain)){} + void SetAmbientGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float UNUSED(gain)){} + void SetActionGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float UNUSED(gain)){} + void SetUIGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float UNUSED(gain)){} #endif Index: source/soundmanager/scripting/SoundGroup.h =================================================================== --- source/soundmanager/scripting/SoundGroup.h +++ source/soundmanager/scripting/SoundGroup.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Wildfire Games. +/* Copyright (C) 2020 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -83,11 +83,11 @@ #if CONFIG2_AUDIO inline u32 FastRand(); // Contains the current sound seed for the generator - u32 m_Seed; float RandFloat(float min, float max); // We store the handles so we can load now and play later std::vector m_SoundGroups; #endif + u32 m_Seed; // We need the filenames so we can reload when necessary. std::vector m_Filenames; // The file path for the list of sound file resources Index: source/soundmanager/scripting/SoundGroup.cpp =================================================================== --- source/soundmanager/scripting/SoundGroup.cpp +++ source/soundmanager/scripting/SoundGroup.cpp @@ -72,8 +72,8 @@ m_ConeInnerAngle = 360.f; m_ConeOuterAngle = 360.f; m_Decay = 3.f; - m_Seed = 0; m_IntensityThreshold = 3.f; + m_Seed = 0; } CSoundGroup::CSoundGroup()