Skip to content

Commit 266f217

Browse files
committed
build(fmod): update to 2.03.09
1 parent 19e491c commit 266f217

File tree

42 files changed

+378
-398
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+378
-398
lines changed

src/app/soundmanager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void SoundManager::Init(int device, QString outputfilename)
1717
result = FMOD_Debug_Initialize(FMOD_DEBUG_LEVEL_LOG, FMOD_DEBUG_MODE_FILE, 0, "fmodlog.txt");
1818
ERRCHECK(result);
1919
unsigned int version;
20-
result = FMOD_System_GetVersion(system, &version);
20+
result = FMOD_System_GetVersion(system, &version, nullptr);
2121
ERRCHECK(result);
2222

2323
if (version < FMOD_VERSION)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/external/fmod/fmod.cmake

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
cmake_minimum_required(VERSION 3.28)
22

33
set(NAME "fmod")
4-
set(VERSION "2.02.27")
4+
set(VERSION "2.03.09")
55
set(PLUGIN_${NAME}_NAME "FMOD")
66
set(PLUGIN_${NAME}_VERSION "${VERSION}")
77

88
set(NAME_VERSIONED "${NAME}-${VERSION}")
99

1010
if (WIN32)
11-
set(FILENAME "FMOD SoundSystem ${VERSION}.zip")
12-
unpack_and_patch(
13-
${CMAKE_CURRENT_LIST_DIR}/dist/${FILENAME} ${NAME_VERSIONED} true ""
14-
${CMAKE_CURRENT_LIST_DIR}/patches/win
15-
)
16-
17-
set(EXTERNAL_SOURCE_DIR_${NAME} "${EXTERNAL_SOURCE_DIR}/FMOD SoundSystem/FMOD Studio API Windows")
18-
set(FMOD_DIR "${EXTERNAL_SOURCE_DIR_${NAME}}/api/core/lib/x64")
11+
set(OS "win")
12+
set(ARCH "x64")
13+
else ()
14+
set(OS "linux")
15+
set(ARCH "x86_64")
16+
endif ()
17+
18+
string(REPLACE "." "" UNPACKED_DIR "fmodstudioapi${VERSION}${OS}")
19+
set(FILENAME "${UNPACKED_DIR}.tar.gz")
20+
unpack_and_patch(
21+
${CMAKE_CURRENT_LIST_DIR}/dist/${FILENAME} ${NAME_VERSIONED} true ${UNPACKED_DIR}
22+
${CMAKE_CURRENT_LIST_DIR}/patches
23+
)
24+
25+
set(EXTERNAL_SOURCE_DIR_${NAME} "${EXTERNAL_SOURCE_DIR}")
26+
set(FMOD_DIR "${EXTERNAL_SOURCE_DIR_${NAME}}/api/core/lib/${ARCH}")
27+
set(FMOD_API_DIR "${EXTERNAL_SOURCE_DIR_${NAME}}/api/core/inc")
28+
29+
if (WIN32)
1930
set(FMOD_LIB "fmod.dll")
2031

2132
add_custom_target(copy-lib-${NAME} ALL
2233
COMMAND ${CMAKE_COMMAND} -E copy_if_different
2334
${FMOD_DIR}/${FMOD_LIB} ${OUTPUT_DIR}
2435
VERBATIM)
2536
else ()
26-
string(REPLACE "." "" UNPACKED_DIR "fmodstudioapi${VERSION}linux")
27-
set(FILENAME "${UNPACKED_DIR}.tar.gz")
28-
unpack_and_patch(
29-
${CMAKE_CURRENT_LIST_DIR}/dist/${FILENAME} ${NAME_VERSIONED} true ${UNPACKED_DIR}
30-
${CMAKE_CURRENT_LIST_DIR}/patches/linux
31-
)
32-
33-
set(EXTERNAL_SOURCE_DIR_${NAME} "${EXTERNAL_SOURCE_DIR}")
34-
set(FMOD_DIR "${EXTERNAL_SOURCE_DIR_${NAME}}/api/core/lib/x86_64")
35-
set(FMOD_SONAME "libfmod.so.13")
36-
set(FMOD_REALNAME "${FMOD_SONAME}.27")
37+
set(FMOD_SONAME "libfmod.so.14")
38+
set(FMOD_REALNAME "${FMOD_SONAME}.9")
3739

3840
cmake_path(SET FMOD_LIB_DIR NORMALIZE ${OUTPUT_DIR}${LIB_DIR})
3941

4042
add_custom_target(copy-lib-${NAME} ALL
4143
COMMAND ${CMAKE_COMMAND} -E copy_if_different
4244
${FMOD_DIR}/${FMOD_REALNAME} ${FMOD_LIB_DIR}/${FMOD_SONAME}
4345
VERBATIM)
44-
endif ()
45-
46-
set(FMOD_API_DIR "${EXTERNAL_SOURCE_DIR_${NAME}}/api/core/inc")
46+
endif ()

src/external/fmod/patches/win/fmod_common.h.patch

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/plugins/plugin_adplug/src/main.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ FMOD_RESULT handle_error(const char* str)
2525
return FMOD_OK;
2626
}
2727

28-
FMOD_RESULT F_CALLBACK open(FMOD_CODEC_STATE* codec, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO* userexinfo);
29-
FMOD_RESULT F_CALLBACK close(FMOD_CODEC_STATE* codec);
30-
FMOD_RESULT F_CALLBACK read(FMOD_CODEC_STATE* codec, void* buffer, unsigned int size, unsigned int* read);
31-
FMOD_RESULT F_CALLBACK getlength(FMOD_CODEC_STATE* codec, unsigned int* length, FMOD_TIMEUNIT lengthtype);
32-
FMOD_RESULT F_CALLBACK setposition(FMOD_CODEC_STATE* codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype);
28+
FMOD_RESULT F_CALL open(FMOD_CODEC_STATE* codec, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO* userexinfo);
29+
FMOD_RESULT F_CALL close(FMOD_CODEC_STATE* codec);
30+
FMOD_RESULT F_CALL read(FMOD_CODEC_STATE* codec, void* buffer, unsigned int size, unsigned int* read);
31+
FMOD_RESULT F_CALL getlength(FMOD_CODEC_STATE* codec, unsigned int* length, FMOD_TIMEUNIT lengthtype);
32+
FMOD_RESULT F_CALL setposition(FMOD_CODEC_STATE* codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype);
3333

3434
FMOD_CODEC_DESCRIPTION codecDescription =
3535
{
@@ -97,7 +97,7 @@ F_EXPORT FMOD_CODEC_DESCRIPTION* F_CALL FMODGetCodecDescription()
9797
#endif
9898

9999

100-
FMOD_RESULT F_CALLBACK open(FMOD_CODEC_STATE* codec, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO* userexinfo)
100+
FMOD_RESULT F_CALL open(FMOD_CODEC_STATE* codec, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO* userexinfo)
101101
{
102102
auto* plugin = new pluginAdplug(codec);
103103
auto *info = static_cast<Info *>(userexinfo->userdata);
@@ -276,13 +276,13 @@ FMOD_RESULT F_CALLBACK open(FMOD_CODEC_STATE* codec, FMOD_MODE usermode, FMOD_CR
276276
return FMOD_OK;
277277
}
278278

279-
FMOD_RESULT F_CALLBACK close(FMOD_CODEC_STATE* codec)
279+
FMOD_RESULT F_CALL close(FMOD_CODEC_STATE* codec)
280280
{
281281
delete static_cast<pluginAdplug*>(codec->plugindata);
282282
return FMOD_OK;
283283
}
284284

285-
FMOD_RESULT F_CALLBACK read(FMOD_CODEC_STATE* codec, void* buffer, unsigned int size, unsigned int* read)
285+
FMOD_RESULT F_CALL read(FMOD_CODEC_STATE* codec, void* buffer, unsigned int size, unsigned int* read)
286286
{
287287
auto* plugin = static_cast<pluginAdplug*>(codec->plugindata);
288288

@@ -310,7 +310,7 @@ FMOD_RESULT F_CALLBACK read(FMOD_CODEC_STATE* codec, void* buffer, unsigned int
310310
return FMOD_OK;
311311
}
312312

313-
FMOD_RESULT F_CALLBACK getlength(FMOD_CODEC_STATE* codec, unsigned int* length, FMOD_TIMEUNIT lengthtype)
313+
FMOD_RESULT F_CALL getlength(FMOD_CODEC_STATE* codec, unsigned int* length, FMOD_TIMEUNIT lengthtype)
314314
{
315315
auto* plugin = static_cast<pluginAdplug*>(codec->plugindata);
316316

@@ -326,7 +326,7 @@ FMOD_RESULT F_CALLBACK getlength(FMOD_CODEC_STATE* codec, unsigned int* length,
326326
return FMOD_OK;
327327
}
328328

329-
FMOD_RESULT F_CALLBACK setposition(FMOD_CODEC_STATE* codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype)
329+
FMOD_RESULT F_CALL setposition(FMOD_CODEC_STATE* codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype)
330330
{
331331
auto* plugin = static_cast<pluginAdplug*>(codec->plugindata);
332332
if (postype == FMOD_TIMEUNIT_MS)

src/plugins/plugin_asap/src/main.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
#include "asap.h"
66
#include "plugins.h"
77

8-
FMOD_RESULT F_CALLBACK open(FMOD_CODEC_STATE* codec, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO* userexinfo);
9-
FMOD_RESULT F_CALLBACK close(FMOD_CODEC_STATE* codec);
10-
FMOD_RESULT F_CALLBACK read(FMOD_CODEC_STATE* codec, void* buffer, unsigned int size, unsigned int* read);
11-
FMOD_RESULT F_CALLBACK setposition(FMOD_CODEC_STATE* codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype);
12-
FMOD_RESULT F_CALLBACK getlength(FMOD_CODEC_STATE* codec, unsigned int* length, FMOD_TIMEUNIT lengthtype);
13-
FMOD_RESULT F_CALLBACK getposition(FMOD_CODEC_STATE* codec, unsigned int* position, FMOD_TIMEUNIT postype);
8+
FMOD_RESULT F_CALL open(FMOD_CODEC_STATE* codec, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO* userexinfo);
9+
FMOD_RESULT F_CALL close(FMOD_CODEC_STATE* codec);
10+
FMOD_RESULT F_CALL read(FMOD_CODEC_STATE* codec, void* buffer, unsigned int size, unsigned int* read);
11+
FMOD_RESULT F_CALL setposition(FMOD_CODEC_STATE* codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype);
12+
FMOD_RESULT F_CALL getlength(FMOD_CODEC_STATE* codec, unsigned int* length, FMOD_TIMEUNIT lengthtype);
13+
FMOD_RESULT F_CALL getposition(FMOD_CODEC_STATE* codec, unsigned int* position, FMOD_TIMEUNIT postype);
1414
FMOD_CODEC_DESCRIPTION codec =
1515
{
1616
FMOD_CODEC_PLUGIN_VERSION,
@@ -70,7 +70,7 @@ F_EXPORT FMOD_CODEC_DESCRIPTION* F_CALL FMODGetCodecDescription()
7070
#endif
7171

7272

73-
FMOD_RESULT F_CALLBACK open(FMOD_CODEC_STATE* codec, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO* userexinfo)
73+
FMOD_RESULT F_CALL open(FMOD_CODEC_STATE* codec, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO* userexinfo)
7474
{
7575
auto *info = static_cast<Info *>(userexinfo->userdata);
7676
auto *plugin = new pluginAsap(codec);
@@ -177,14 +177,14 @@ FMOD_RESULT F_CALLBACK open(FMOD_CODEC_STATE* codec, FMOD_MODE usermode, FMOD_CR
177177
return FMOD_OK;
178178
}
179179

180-
FMOD_RESULT F_CALLBACK close(FMOD_CODEC_STATE* codec)
180+
FMOD_RESULT F_CALL close(FMOD_CODEC_STATE* codec)
181181
{
182182
auto* plugin = static_cast<pluginAsap*>(codec->plugindata);
183183
delete plugin;
184184
return FMOD_OK;
185185
}
186186

187-
FMOD_RESULT F_CALLBACK read(FMOD_CODEC_STATE* codec, void* buffer, unsigned int size, unsigned int* read)
187+
FMOD_RESULT F_CALL read(FMOD_CODEC_STATE* codec, void* buffer, unsigned int size, unsigned int* read)
188188
{
189189
auto *plugin = static_cast<pluginAsap *>(codec->plugindata);
190190

@@ -199,7 +199,7 @@ FMOD_RESULT F_CALLBACK read(FMOD_CODEC_STATE* codec, void* buffer, unsigned int
199199
return FMOD_OK;
200200
}
201201

202-
FMOD_RESULT F_CALLBACK getlength(FMOD_CODEC_STATE* codec, unsigned int* length, FMOD_TIMEUNIT lengthtype)
202+
FMOD_RESULT F_CALL getlength(FMOD_CODEC_STATE* codec, unsigned int* length, FMOD_TIMEUNIT lengthtype)
203203
{
204204
auto* plugin = static_cast<pluginAsap*>(codec->plugindata);
205205

@@ -216,7 +216,7 @@ FMOD_RESULT F_CALLBACK getlength(FMOD_CODEC_STATE* codec, unsigned int* length,
216216
}
217217

218218

219-
FMOD_RESULT F_CALLBACK setposition(FMOD_CODEC_STATE* codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype)
219+
FMOD_RESULT F_CALL setposition(FMOD_CODEC_STATE* codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype)
220220
{
221221
auto* plugin = static_cast<pluginAsap*>(codec->plugindata);
222222
if (postype == FMOD_TIMEUNIT_MS)
@@ -246,7 +246,7 @@ FMOD_RESULT F_CALLBACK setposition(FMOD_CODEC_STATE* codec, int subsound, unsign
246246
return FMOD_ERR_UNSUPPORTED;
247247
}
248248

249-
FMOD_RESULT F_CALLBACK getposition(FMOD_CODEC_STATE* codec, unsigned int* position, FMOD_TIMEUNIT postype)
249+
FMOD_RESULT F_CALL getposition(FMOD_CODEC_STATE* codec, unsigned int* position, FMOD_TIMEUNIT postype)
250250
{
251251
auto* plugin = static_cast<pluginAsap*>(codec->plugindata);
252252

0 commit comments

Comments
 (0)