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_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_LIBRARIES ${ORIGINAL_CMAKE_REQUIRED_LIBRARIES})
|
||||
|
||||
if(WAVPACK_OPEN_FILE_INPUT_EX64)
|
||||
target_compile_definitions(${TARGET_CLIENT} PRIVATE CONF_WAVPACK_OPEN_FILE_INPUT_EX64)
|
||||
if(WAVPACK_OPEN_FILE_INPUT_EX)
|
||||
target_compile_definitions(${TARGET_CLIENT} PRIVATE CONF_WAVPACK_OPEN_FILE_INPUT_EX)
|
||||
endif()
|
||||
|
||||
list(APPEND TARGETS_OWN ${TARGET_CLIENT})
|
||||
|
|
|
@ -469,7 +469,7 @@ static int ReadDataOld(void *pBuffer, int Size)
|
|||
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)
|
||||
{
|
||||
(void)pId;
|
||||
|
@ -482,13 +482,13 @@ static int ReturnFalse(void *pId)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int64_t GetPos(void *pId)
|
||||
static unsigned int GetPos(void *pId)
|
||||
{
|
||||
(void)pId;
|
||||
return s_WVBufferPosition;
|
||||
}
|
||||
|
||||
static int64_t GetLength(void *pId)
|
||||
static unsigned int GetLength(void *pId)
|
||||
{
|
||||
(void)pId;
|
||||
return s_WVBufferSize;
|
||||
|
@ -514,14 +514,14 @@ int CSound::DecodeWV(int SampleID, const void *pData, unsigned DataSize)
|
|||
s_WVBufferSize = DataSize;
|
||||
s_WVBufferPosition = 0;
|
||||
|
||||
#if defined(CONF_WAVPACK_OPEN_FILE_INPUT_EX64)
|
||||
WavpackStreamReader64 Callback = {0};
|
||||
#if defined(CONF_WAVPACK_OPEN_FILE_INPUT_EX)
|
||||
WavpackStreamReader Callback = {0};
|
||||
Callback.can_seek = ReturnFalse;
|
||||
Callback.get_length = GetLength;
|
||||
Callback.get_pos = GetPos;
|
||||
Callback.push_back_byte = PushBackByte;
|
||||
Callback.read_bytes = ::ReadData;
|
||||
pContext = WavpackOpenFileInputEx64(&Callback,0, 0, aError, 0, 0);
|
||||
Callback.read_bytes = ReadData;
|
||||
pContext = WavpackOpenFileInputEx(&Callback,0, 0, aError, 0, 0);
|
||||
#else
|
||||
pContext = WavpackOpenFileInput(ReadDataOld, aError);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue