mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-11 13:11:47 +00:00
Merge branch 'master' into openal
This commit is contained in:
commit
b55d668c5c
5 changed files with 60 additions and 34 deletions
|
@ -665,7 +665,7 @@ void I_InitSoundChannel( int channel, int numOutputChannels_ ) {
|
|||
activeSound_t *soundchannel = &activeSounds[ channel ];
|
||||
|
||||
// RB: fixed non-aggregates cannot be initialized with initializer list
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#if defined(USE_WINRT) //(_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
X3DAUDIO_VECTOR ZeroVector( 0.0f, 0.0f, 0.0f );
|
||||
#else
|
||||
X3DAUDIO_VECTOR ZeroVector = { 0.0f, 0.0f, 0.0f };
|
||||
|
@ -735,7 +735,7 @@ void I_InitSound() {
|
|||
int i;
|
||||
|
||||
// RB: non-aggregates cannot be initialized with initializer list
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#if defined(USE_WINRT) // (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
X3DAUDIO_VECTOR ZeroVector( 0.0f, 0.0f, 0.0f );
|
||||
#else
|
||||
X3DAUDIO_VECTOR ZeroVector = { 0.0f, 0.0f, 0.0f };
|
||||
|
@ -836,7 +836,7 @@ void I_InitMusic(void)
|
|||
voiceFormat.cbSize = 0;
|
||||
|
||||
// RB: XAUDIO2_VOICE_MUSIC not available on Windows 8 SDK
|
||||
#if (_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#if !defined(USE_WINRT) //(_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
soundSystemLocal.hardware.GetIXAudio2()->CreateSourceVoice( &pMusicSourceVoice, (WAVEFORMATEX *)&voiceFormat, XAUDIO2_VOICE_MUSIC );
|
||||
#endif
|
||||
// RB end
|
||||
|
|
|
@ -13,7 +13,7 @@ option(SDL2
|
|||
"Use SDL2 instead of SDL1.2" OFF)
|
||||
|
||||
option(OPENAL
|
||||
"Use OpenAL soft instead of XAudio2" ON)
|
||||
"Use OpenAL soft instead of XAudio2" OFF)
|
||||
|
||||
if(MSVC)
|
||||
#message(STATUS CMAKE_ROOT: ${CMAKE_ROOT})
|
||||
|
@ -93,15 +93,41 @@ elseif(MSVC)
|
|||
# Omit Frame Pointers
|
||||
# "/Oy",
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /D _DEBUG /MP /MTd")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MP /Oi /Oy /MT")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MP /Oi /MTd")
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MP /Oi /Oy /MT")
|
||||
# if(MSVC_VERSION EQUAL 1700)
|
||||
# #message(STATUS "$ENV{LIBPATH}")
|
||||
|
||||
# find_path(Windows_winmd_DIR NAMES Windows.winmd
|
||||
# HINTS
|
||||
# C:/Program Files (x86)/Windows Kits/8.0/References/CommonConfiguration/Neutral
|
||||
# PATH_SUFFIXES "Neutral")
|
||||
|
||||
# message(STATUS "${Windows_winmd_DIR}")
|
||||
|
||||
# #set(WINRT_OPTIONS "/ZW /D USE_WINRT /AI \"C:\Program Files (x86)\Windows Kits\8.0\References\CommonConfiguration\Neutral\"")
|
||||
# #set(WINRT_OPTIONS "/ZW /D USE_WINRT /AI \"$ENV{LIBPATH}\" ")
|
||||
# set(WINRT_OPTIONS "/ZW /D USE_WINRT")
|
||||
|
||||
# set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /D _DEBUG /MP ${WINRT_OPTIONS}")
|
||||
# set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MP /Oi /Oy ${WINRT_OPTIONS}")
|
||||
# set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MP /Oi ${WINRT_OPTIONS}")
|
||||
# set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MP /Oi /Oy ${WINRT_OPTIONS}")
|
||||
|
||||
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MP ${WINRT_OPTIONS}")
|
||||
# set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MP /Oi /Oy ${WINRT_OPTIONS}")
|
||||
# set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MP ${WINRT_OPTIONS}")
|
||||
# set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MP /Oi /Oy ${WINRT_OPTIONS}")
|
||||
# else()
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /D _DEBUG /MP /MTd")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MP /Oi /Oy /MT")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MP /Oi /MTd")
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MP /Oi /Oy /MT")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MP /MTd")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MP /Oi /Oy /MT")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MP /MTd")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MP /Oi /Oy /MT")
|
||||
# endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MP /MTd")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MP /Oi /Oy /MT")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MP /MTd")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MP /Oi /Oy /MT")
|
||||
|
||||
add_definitions(-DWIN32
|
||||
-D_WINDOWS
|
||||
|
@ -1031,24 +1057,24 @@ include_directories(
|
|||
|
||||
if(MSVC)
|
||||
|
||||
if(MSVC_VERSION EQUAL 1700)
|
||||
set(DirectX_LIBRARIES
|
||||
dinput8
|
||||
dsound
|
||||
dxguid
|
||||
#dxerr
|
||||
Xinput
|
||||
xaudio2.lib
|
||||
)
|
||||
# if(MSVC_VERSION EQUAL 1700)
|
||||
# set(DirectX_LIBRARIES
|
||||
# dinput8
|
||||
# dsound
|
||||
# dxguid
|
||||
# #dxerr
|
||||
# Xinput
|
||||
# xaudio2.lib
|
||||
# )
|
||||
|
||||
if(NOT OPENAL)
|
||||
list(APPEND DirectX_LIBRARIES xaudio2.lib)
|
||||
endif()
|
||||
# if(NOT OPENAL)
|
||||
# list(APPEND DirectX_LIBRARIES xaudio2.lib)
|
||||
# endif()
|
||||
|
||||
else()
|
||||
# else()
|
||||
find_package(DirectX REQUIRED)
|
||||
include_directories(${DirectX_INCLUDE_DIR})
|
||||
endif()
|
||||
#endif()
|
||||
|
||||
if(OPENAL)
|
||||
add_definitions(-DUSE_OPENAL)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
Copyright (C) 2012 Robert Beckebans
|
||||
Copyright (C) 2013 Robert Beckebans
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
|
@ -74,7 +74,7 @@ void listDevices_f( const idCmdArgs& args )
|
|||
}
|
||||
|
||||
// RB: not available on Windows 8 SDK
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#if defined(USE_WINRT) //(_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
|
||||
// FIXME
|
||||
|
||||
|
@ -217,7 +217,7 @@ void idSoundHardware_XAudio2::Init()
|
|||
DWORD xAudioCreateFlags = 0;
|
||||
|
||||
// RB: not available on Windows 8 SDK
|
||||
#if (_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/) && defined(_DEBUG)
|
||||
#if !defined(USE_WINRT) && defined(_DEBUG) // (_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/) && defined(_DEBUG)
|
||||
xAudioCreateFlags |= XAUDIO2_DEBUG_ENGINE;
|
||||
#endif
|
||||
// RB end
|
||||
|
@ -227,7 +227,7 @@ void idSoundHardware_XAudio2::Init()
|
|||
// RB: not available on Windows 8 SDK
|
||||
if( FAILED( XAudio2Create( &pXAudio2, xAudioCreateFlags, xAudioProcessor ) ) )
|
||||
{
|
||||
#if (_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/) && defined(_DEBUG)
|
||||
#if !defined(USE_WINRT) && defined(_DEBUG) // (_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/) && defined(_DEBUG)
|
||||
if( xAudioCreateFlags & XAUDIO2_DEBUG_ENGINE )
|
||||
{
|
||||
// in case the debug engine isn't installed
|
||||
|
@ -258,7 +258,7 @@ void idSoundHardware_XAudio2::Init()
|
|||
soundEngineCallback.hardware = this;
|
||||
|
||||
// RB: not available on Windows 8 SDK
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#if defined(USE_WINRT) //(_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
|
||||
// FIXME
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ typedef enum
|
|||
#define OPERATION_SET 1
|
||||
|
||||
// RB: not available on Windows 8 SDK
|
||||
#if (_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#if !defined(USE_WINRT) // (_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#include <dxsdkver.h>
|
||||
#endif
|
||||
// RB end
|
||||
|
@ -118,7 +118,7 @@ typedef enum
|
|||
#include <X3DAudio.h>
|
||||
|
||||
// RB: not available on Windows 8 SDK
|
||||
#if (_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#if !defined(USE_WINRT) // (_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#include <xma2defs.h>
|
||||
#endif
|
||||
// RB end
|
||||
|
|
|
@ -31,7 +31,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
// RB: <DxErr.h> not available on Windows 8 SDK
|
||||
#if defined(__MINGW32__)
|
||||
#include <sal.h>
|
||||
#elif (_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#elif !defined(USE_WINRT) // (_WIN32_WINNT < 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#include <DxErr.h>
|
||||
#endif
|
||||
// RB end
|
||||
|
|
Loading…
Reference in a new issue