Switch to lzokay library

This commit is contained in:
Jack Andersen 2018-12-19 17:45:26 -10:00
parent c1c47c51eb
commit 7719459ac7
5 changed files with 12 additions and 12 deletions

View File

@ -67,7 +67,7 @@ if (APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR CMAKE_OSX_DEPLOYMENT_TARGET VE
AmuseContainingApp.mm AudioGroupFilePresenter.mm AmuseContainingApp.mm AudioGroupFilePresenter.mm
PROPERTIES COMPILE_FLAGS -fobjc-arc) PROPERTIES COMPILE_FLAGS -fobjc-arc)
target_link_libraries(amuse-au-container amuse boo soxr ${AUDIOUNIT_LIBRARY} ${COREAUDIOKIT_LIBRARY} target_link_libraries(amuse-au-container amuse boo soxr ${AUDIOUNIT_LIBRARY} ${COREAUDIOKIT_LIBRARY}
${AVFOUNDATION_LIBRARY} ${ZLIB_LIBRARIES} ${LZO_LIB} ${BOO_SYS_LIBS} logvisor athena-core) ${AVFOUNDATION_LIBRARY} ${ZLIB_LIBRARIES} lzokay ${BOO_SYS_LIBS} logvisor athena-core)
set(APPLE_BUNDLE_ID "com.axiodl.Amuse") set(APPLE_BUNDLE_ID "com.axiodl.Amuse")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/AmuseContainer.entitlements.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/AmuseContainer.entitlements.in

View File

@ -89,7 +89,7 @@ endif()
unset(EXTRAS) unset(EXTRAS)
if(TARGET boo) if(TARGET boo)
include_directories(${BOO_INCLUDE_DIR} ${BOO_INCLUDE_DIR}/../lib ${BOO_INCLUDE_DIR}/../soxr/src include_directories(${BOO_INCLUDE_DIR} ${BOO_INCLUDE_DIR}/../lib ${BOO_INCLUDE_DIR}/../soxr/src
${LOGVISOR_INCLUDE_DIR} ${ATHENA_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${LZO_INCLUDE_DIR}) ${LOGVISOR_INCLUDE_DIR} ${ATHENA_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${LZOKAY_INCLUDE_DIR})
list(APPEND EXTRAS lib/BooBackend.cpp include/amuse/BooBackend.hpp) list(APPEND EXTRAS lib/BooBackend.cpp include/amuse/BooBackend.hpp)
endif() endif()
@ -119,15 +119,15 @@ if(TARGET boo AND NOT WINDOWS_STORE AND NOT NX)
# Player # Player
add_executable(amuseplay WIN32 driver/amuseplay.cpp) add_executable(amuseplay WIN32 driver/amuseplay.cpp)
target_link_libraries(amuseplay amuse boo ${BOO_SYS_LIBS} logvisor athena-core athena-libyaml ${ZLIB_LIBRARIES} ${LZO_LIB}) target_link_libraries(amuseplay amuse boo ${BOO_SYS_LIBS} logvisor athena-core athena-libyaml ${ZLIB_LIBRARIES} lzokay)
# Converter # Converter
add_executable(amuseconv driver/amuseconv.cpp) add_executable(amuseconv driver/amuseconv.cpp)
target_link_libraries(amuseconv amuse boo ${BOO_SYS_LIBS} logvisor athena-core athena-libyaml ${ZLIB_LIBRARIES} ${LZO_LIB}) target_link_libraries(amuseconv amuse boo ${BOO_SYS_LIBS} logvisor athena-core athena-libyaml ${ZLIB_LIBRARIES} lzokay)
# Renderer # Renderer
add_executable(amuserender driver/amuserender.cpp) add_executable(amuserender driver/amuserender.cpp)
target_link_libraries(amuserender amuse boo ${BOO_SYS_LIBS} logvisor athena-core athena-libyaml ${ZLIB_LIBRARIES} ${LZO_LIB}) target_link_libraries(amuserender amuse boo ${BOO_SYS_LIBS} logvisor athena-core athena-libyaml ${ZLIB_LIBRARIES} lzokay)
if(COMMAND add_sanitizers) if(COMMAND add_sanitizers)
add_sanitizers(amuseplay) add_sanitizers(amuseplay)

View File

@ -84,4 +84,4 @@ target_link_libraries(amuse-gui ${PLAT_LIBS}
${Qt5Xml_LIBRARIES} ${Qt5Xml_LIBRARIES}
${Qt5Svg_LIBRARIES} ${Qt5Svg_LIBRARIES}
${Qt5Qml_LIBRARIES} ${Qt5Qml_LIBRARIES}
amuse boo ${BOO_SYS_LIBS} logvisor athena-core athena-libyaml xxhash ${ZLIB_LIBRARIES} ${LZO_LIB}) amuse boo ${BOO_SYS_LIBS} logvisor athena-core athena-libyaml xxhash ${ZLIB_LIBRARIES} lzokay)

View File

@ -12,7 +12,7 @@ if (WIN32 AND (EXISTS ${VST3_SDK_ROOT}))
${VST2_DIR}/audioeffect.cpp ${VST2_DIR}/audioeffect.cpp
${VST2_DIR}/audioeffectx.cpp ${VST2_DIR}/audioeffectx.cpp
FileOpenDialog.hpp FileOpenDialog.cpp) FileOpenDialog.hpp FileOpenDialog.cpp)
target_link_libraries(amuse-vst amuse boo soxr ${ZLIB_LIBRARIES} ${LZO_LIB} Winmm soxr target_link_libraries(amuse-vst amuse boo soxr ${ZLIB_LIBRARIES} lzokay Winmm soxr
Msimg32 Shlwapi logvisor athena-core) Msimg32 Shlwapi logvisor athena-core)
set_target_properties(amuse-vst PROPERTIES LINK_FLAGS "/EXPORT:VSTPluginMain") set_target_properties(amuse-vst PROPERTIES LINK_FLAGS "/EXPORT:VSTPluginMain")
endif() endif()

View File

@ -7,7 +7,7 @@
#include <memory> #include <memory>
#include <unordered_map> #include <unordered_map>
#include <zlib.h> #include <zlib.h>
#include <lzo/lzo1x.h> #include <lzokay.hpp>
#if __SWITCH__ #if __SWITCH__
/*- /*-
@ -486,8 +486,8 @@ static bool ValidateMP2(FILE* fp) {
uint8_t compBuf[0x8000]; uint8_t compBuf[0x8000];
uint8_t destBuf[0x8000 * 2]; uint8_t destBuf[0x8000 * 2];
fread(compBuf, 1, chunkSz, fp); fread(compBuf, 1, chunkSz, fp);
lzo_uint dsz = 0x8000 * 2; size_t dsz = 0x8000 * 2;
lzo1x_decompress(compBuf, chunkSz, destBuf, &dsz, nullptr); lzokay::decompress(compBuf, chunkSz, destBuf, dsz);
memcpy(testBuf, destBuf, 4); memcpy(testBuf, destBuf, 4);
} }
if (amuse::SBig(*reinterpret_cast<uint32_t*>(testBuf)) == 0x1) if (amuse::SBig(*reinterpret_cast<uint32_t*>(testBuf)) == 0x1)
@ -557,8 +557,8 @@ static std::vector<std::pair<SystemString, IntrusiveAudioGroupData>> LoadMP2(FIL
fread(&chunkSz, 1, 2, fp); fread(&chunkSz, 1, 2, fp);
chunkSz = SBig(chunkSz); chunkSz = SBig(chunkSz);
fread(compBuf, 1, chunkSz, fp); fread(compBuf, 1, chunkSz, fp);
lzo_uint dsz = rem; size_t dsz = rem;
lzo1x_decompress(compBuf, chunkSz, bufCur, &dsz, nullptr); lzokay::decompress(compBuf, chunkSz, bufCur, dsz);
bufCur += dsz; bufCur += dsz;
rem -= dsz; rem -= dsz;
} }