diff --git a/doomsday/apps/client/libs/fmod/src/driver_fmod.cpp b/doomsday/apps/client/libs/fmod/src/driver_fmod.cpp index fa7a908407..45938ac4fe 100644 --- a/doomsday/apps/client/libs/fmod/src/driver_fmod.cpp +++ b/doomsday/apps/client/libs/fmod/src/driver_fmod.cpp @@ -191,6 +191,7 @@ static int DS_Init(void) return false; } +#if FMOD_VERSION < 0x20000 // Options. FMOD_ADVANCEDSETTINGS settings; de::zap(settings); @@ -199,6 +200,7 @@ static int DS_Init(void) settings.HRTFMinAngle = 180; settings.HRTFFreq = 11000; FMOD_System_SetAdvancedSettings(fmodSystem, &settings); +#endif #ifdef _DEBUG int numPlugins = 0; diff --git a/doomsday/apps/client/libs/fmod/src/fmod_sfx.cpp b/doomsday/apps/client/libs/fmod/src/fmod_sfx.cpp index 310b141fdf..84e19bb79d 100644 --- a/doomsday/apps/client/libs/fmod/src/fmod_sfx.cpp +++ b/doomsday/apps/client/libs/fmod/src/fmod_sfx.cpp @@ -429,7 +429,11 @@ void fmod_DS_SFX_Play(sfxbuffer_t* buf) FMOD_Channel_Set3DMinMaxDistance(info.channel, info.minDistanceMeters, info.maxDistanceMeters); +#if FMOD_VERSION < 0x20000 FMOD_Channel_Set3DAttributes(info.channel, &info.position, &info.velocity, 0); +#else + FMOD_Channel_Set3DAttributes(info.channel, &info.position, &info.velocity); +#endif FMOD_Channel_SetMode(info.channel, info.mode); } @@ -557,15 +561,23 @@ void fmod_DS_SFX_Setv(sfxbuffer_t* buf, int prop, float* values) case SFXBP_POSITION: info.position.set(values); if (info.channel) +#if FMOD_VERSION < 0x20000 FMOD_Channel_Set3DAttributes(info.channel, &info.position, &info.velocity, 0); +#else + FMOD_Channel_Set3DAttributes(info.channel, &info.position, &info.velocity); +#endif break; case SFXBP_VELOCITY: info.velocity.set(values); if (info.channel) +#if FMOD_VERSION < 0x20000 FMOD_Channel_Set3DAttributes(info.channel, &info.position, &info.velocity, 0); +#else + FMOD_Channel_Set3DAttributes(info.channel, &info.position, &info.velocity); +#endif break; default: diff --git a/doomsday/cmake/FindFMOD.cmake b/doomsday/cmake/FindFMOD.cmake index 067ff6178b..28b5daabb5 100644 --- a/doomsday/cmake/FindFMOD.cmake +++ b/doomsday/cmake/FindFMOD.cmake @@ -5,10 +5,16 @@ set (_oldPath ${FMOD_FMOD_H}) # We may need to clean up the provided path. deng_clean_path (fmodRoot ${FMOD_DIR}) -find_file (FMOD_FMOD_H api/lowlevel/inc/fmod.h +find_file (FMOD_FMOD_H + NAMES + api/lowlevel/inc/fmod.h + api/core/inc/fmod.h PATHS "${fmodRoot}" HINTS ENV DENG_DEPEND_PATH - PATH_SUFFIXES "FMOD" "FMOD Programmers API" "FMOD Studio API Windows" + PATH_SUFFIXES + "FMOD" + "FMOD Programmers API" + "FMOD Studio API Windows" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH ) @@ -16,9 +22,9 @@ mark_as_advanced (FMOD_FMOD_H) if (NOT _oldPath STREQUAL FMOD_FMOD_H) if (FMOD_FMOD_H) - message (STATUS "Looking for FMOD Low Level Programmer API - found") + message (STATUS "Looking for FMOD Programmer API - found") else () - message (STATUS "Looking for FMOD Low Level Programmer API - not found (set the FMOD_DIR variable)") + message (STATUS "Looking for FMOD Programmer API - not found (set the FMOD_DIR variable)") endif () endif () diff --git a/doomsday/libs/gloom/src/audio/audiosystem.cpp b/doomsday/libs/gloom/src/audio/audiosystem.cpp index ad38a5fa26..7b18a8682b 100644 --- a/doomsday/libs/gloom/src/audio/audiosystem.cpp +++ b/doomsday/libs/gloom/src/audio/audiosystem.cpp @@ -384,7 +384,11 @@ DE_PIMPL(AudioSystem) vel.y = velocity().y; vel.z = velocity().z; +#if FMOD_VERSION < 0x20000 FMOD_Channel_Set3DAttributes(channel, &pos, &vel, NULL); +#else + FMOD_Channel_Set3DAttributes(channel, &pos, &vel); +#endif FMOD_Channel_Set3DMinMaxDistance(channel, minDistance(), 10000); FMOD_Channel_Set3DSpread(channel, spatialSpread()); }