From 820d006c4e5594f8e009aef46ca1e8f1fe0febcc Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sun, 17 Jun 2018 10:04:14 +0200 Subject: [PATCH] Add Appveyor script, fix 32bit Windows compilation --- .appveyor.yml | 22 ++++++++++++++++++++++ CMakeLists.txt | 2 +- include/AudioSdl.h | 4 ++-- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 000000000..d9cf55c2a --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,22 @@ +clone_depth: 1 +version: "{build}" +image: Visual Studio 2015 +platform: + - x86 + - x64 +environment: + matrix: + - compiler: msvc +install: + - vcpkg install --triplet %PLATFORM%-windows fftw3 libsamplerate libsndfile sdl2 +build_script: + - cd %APPVEYOR_BUILD_FOLDER% + - mkdir build + - cd build + - ps: $env:CMAKE_PLATFORM="$(if ($env:PLATFORM -eq 'x64') { 'x64' } else { '' })" + - ps: $env:QT_SUFFIX="$(if ($env:PLATFORM -eq 'x64') { '_64' } else { '' })" + - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=c:/Qt/5.9.5/msvc2015%QT_SUFFIX%;c:/tools/vcpkg/installed/%PLATFORM%-windows -DCMAKE_GENERATOR_PLATFORM="%CMAKE_PLATFORM%" .. + - cmake --build . -- /maxcpucount:4 + - cmake --build . --target tests +cache: + - c:/tools/vcpkg/installed diff --git a/CMakeLists.txt b/CMakeLists.txt index 467c7585a..b9c0c6885 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -474,7 +474,7 @@ ELSE() ENDIF(WANT_DEBUG_FPE) # check for libsamplerate -FIND_PACKAGE(Samplerate 0.1.8 REQUIRED) +FIND_PACKAGE(Samplerate 0.1.8 MODULE REQUIRED) # set compiler flags IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") diff --git a/include/AudioSdl.h b/include/AudioSdl.h index 19d9606eb..fd8c544c2 100644 --- a/include/AudioSdl.h +++ b/include/AudioSdl.h @@ -88,8 +88,8 @@ private: surroundSampleFrame * m_outBuf; #ifdef LMMS_HAVE_SDL2 - uint64_t m_currentBufferFramePos; - uint64_t m_currentBufferFramesCount; + size_t m_currentBufferFramePos; + size_t m_currentBufferFramesCount; #else Uint8 * m_convertedBuf; int m_convertedBufPos;