mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Revert "Fix system wavpack (fixes #1041)"
This reverts commit 295b8a663a
.
This commit is contained in:
parent
295b8a663a
commit
491ccc85e1
|
@ -881,12 +881,12 @@ if(CLIENT)
|
||||||
|
|
||||||
set(CMAKE_REQUIRED_INCLUDES ${ORIGINAL_CMAKE_REQUIRED_INCLUDES} ${WAVPACK_INCLUDE_DIRS})
|
set(CMAKE_REQUIRED_INCLUDES ${ORIGINAL_CMAKE_REQUIRED_INCLUDES} ${WAVPACK_INCLUDE_DIRS})
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${ORIGINAL_CMAKE_REQUIRED_LIBRARIES} ${WAVPACK_LIBRARIES})
|
set(CMAKE_REQUIRED_LIBRARIES ${ORIGINAL_CMAKE_REQUIRED_LIBRARIES} ${WAVPACK_LIBRARIES})
|
||||||
check_symbol_exists(WavpackOpenFileInputEx64 wavpack.h WAVPACK_OPEN_FILE_INPUT_EX64)
|
check_symbol_exists(WavpackOpenFileInputEx wavpack.h WAVPACK_OPEN_FILE_INPUT_EX)
|
||||||
set(CMAKE_REQUIRED_INCLUDES ${ORIGINAL_CMAKE_REQUIRED_INCLUDES})
|
set(CMAKE_REQUIRED_INCLUDES ${ORIGINAL_CMAKE_REQUIRED_INCLUDES})
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${ORIGINAL_CMAKE_REQUIRED_LIBRARIES})
|
set(CMAKE_REQUIRED_LIBRARIES ${ORIGINAL_CMAKE_REQUIRED_LIBRARIES})
|
||||||
|
|
||||||
if(WAVPACK_OPEN_FILE_INPUT_EX64)
|
if(WAVPACK_OPEN_FILE_INPUT_EX)
|
||||||
target_compile_definitions(${TARGET_CLIENT} PRIVATE CONF_WAVPACK_OPEN_FILE_INPUT_EX64)
|
target_compile_definitions(${TARGET_CLIENT} PRIVATE CONF_WAVPACK_OPEN_FILE_INPUT_EX)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND TARGETS_OWN ${TARGET_CLIENT})
|
list(APPEND TARGETS_OWN ${TARGET_CLIENT})
|
||||||
|
|
|
@ -469,7 +469,7 @@ static int ReadDataOld(void *pBuffer, int Size)
|
||||||
return ChunkSize;
|
return ChunkSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONF_WAVPACK_OPEN_FILE_INPUT_EX64)
|
#if defined(CONF_WAVPACK_OPEN_FILE_INPUT_EX)
|
||||||
static int ReadData(void *pId, void *pBuffer, int Size)
|
static int ReadData(void *pId, void *pBuffer, int Size)
|
||||||
{
|
{
|
||||||
(void)pId;
|
(void)pId;
|
||||||
|
@ -482,13 +482,13 @@ static int ReturnFalse(void *pId)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int64_t GetPos(void *pId)
|
static unsigned int GetPos(void *pId)
|
||||||
{
|
{
|
||||||
(void)pId;
|
(void)pId;
|
||||||
return s_WVBufferPosition;
|
return s_WVBufferPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int64_t GetLength(void *pId)
|
static unsigned int GetLength(void *pId)
|
||||||
{
|
{
|
||||||
(void)pId;
|
(void)pId;
|
||||||
return s_WVBufferSize;
|
return s_WVBufferSize;
|
||||||
|
@ -514,14 +514,14 @@ int CSound::DecodeWV(int SampleID, const void *pData, unsigned DataSize)
|
||||||
s_WVBufferSize = DataSize;
|
s_WVBufferSize = DataSize;
|
||||||
s_WVBufferPosition = 0;
|
s_WVBufferPosition = 0;
|
||||||
|
|
||||||
#if defined(CONF_WAVPACK_OPEN_FILE_INPUT_EX64)
|
#if defined(CONF_WAVPACK_OPEN_FILE_INPUT_EX)
|
||||||
WavpackStreamReader64 Callback = {0};
|
WavpackStreamReader Callback = {0};
|
||||||
Callback.can_seek = ReturnFalse;
|
Callback.can_seek = ReturnFalse;
|
||||||
Callback.get_length = GetLength;
|
Callback.get_length = GetLength;
|
||||||
Callback.get_pos = GetPos;
|
Callback.get_pos = GetPos;
|
||||||
Callback.push_back_byte = PushBackByte;
|
Callback.push_back_byte = PushBackByte;
|
||||||
Callback.read_bytes = ::ReadData;
|
Callback.read_bytes = ReadData;
|
||||||
pContext = WavpackOpenFileInputEx64(&Callback,0, 0, aError, 0, 0);
|
pContext = WavpackOpenFileInputEx(&Callback,0, 0, aError, 0, 0);
|
||||||
#else
|
#else
|
||||||
pContext = WavpackOpenFileInput(ReadDataOld, aError);
|
pContext = WavpackOpenFileInput(ReadDataOld, aError);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue