build: simple build using CMake (manually add src/ext/libsndfile)
This commit is contained in:
61
CMakeLists.txt
Normal file
61
CMakeLists.txt
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
cmake_minimum_required(VERSION 4.1)
|
||||||
|
project(rubberband)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "-DUSE_BQRESAMPLER -DHAVE_KISSFFT")
|
||||||
|
|
||||||
|
#include_directories(mpg123/lib/x86_64/include)
|
||||||
|
include_directories(
|
||||||
|
./dotnet/rubberband-dll
|
||||||
|
./ladspa-lv2
|
||||||
|
./rubberband
|
||||||
|
./src/common
|
||||||
|
./src/ext/float_cast
|
||||||
|
./src/ext/getopt
|
||||||
|
./src/ext/kissfft
|
||||||
|
./src/ext/pommier
|
||||||
|
./src/ext/speex
|
||||||
|
./src/faster
|
||||||
|
./src/finer
|
||||||
|
./vamp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(rubberband
|
||||||
|
./src/ext/getopt/getopt.c
|
||||||
|
./src/ext/getopt/getopt_long.c
|
||||||
|
./src/ext/kissfft/kiss_fft.c
|
||||||
|
./src/ext/kissfft/kiss_fftr.c
|
||||||
|
./src/ext/speex/resample.c
|
||||||
|
./main/main.cpp
|
||||||
|
./src/common/Allocators.cpp
|
||||||
|
./src/common/BQResampler.cpp
|
||||||
|
./src/common/FFT.cpp
|
||||||
|
./src/common/Log.cpp
|
||||||
|
./src/common/mathmisc.cpp
|
||||||
|
./src/common/Profiler.cpp
|
||||||
|
./src/common/Resampler.cpp
|
||||||
|
./src/common/StretchCalculator.cpp
|
||||||
|
./src/common/sysutils.cpp
|
||||||
|
./src/common/Thread.cpp
|
||||||
|
./src/common/VectorOpsComplex.cpp
|
||||||
|
./src/faster/AudioCurveCalculator.cpp
|
||||||
|
./src/faster/CompoundAudioCurve.cpp
|
||||||
|
./src/faster/HighFrequencyAudioCurve.cpp
|
||||||
|
./src/faster/PercussiveAudioCurve.cpp
|
||||||
|
./src/faster/R2Stretcher.cpp
|
||||||
|
./src/faster/SilentAudioCurve.cpp
|
||||||
|
./src/faster/StretcherChannelData.cpp
|
||||||
|
./src/faster/StretcherProcess.cpp
|
||||||
|
./src/finer/R3LiveShifter.cpp
|
||||||
|
./src/finer/R3Stretcher.cpp
|
||||||
|
./src/rubberband-c.cpp
|
||||||
|
./src/RubberBandLiveShifter.cpp
|
||||||
|
./src/RubberBandStretcher.cpp
|
||||||
|
)
|
||||||
|
#target_link_directories(rubberband PRIVATE mpg123/lib/x86_64)
|
||||||
|
#target_link_libraries(test_lockstep mpg123-0)
|
||||||
|
#target_link_libraries(rubberband ${CMAKE_SOURCE_DIR}/mpg123/lib/x86_64/libmpg123.dll.a)
|
||||||
|
|
||||||
|
add_subdirectory(src/ext/libsndfile)
|
||||||
|
target_link_libraries(rubberband sndfile)
|
||||||
@@ -49,6 +49,7 @@ using RubberBand::gettimeofday;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
#define NOMINMAX
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
static void usleep(unsigned long usec) {
|
static void usleep(unsigned long usec) {
|
||||||
::Sleep(usec == 0 ? 0 : usec < 1000 ? 1 : usec / 1000);
|
::Sleep(usec == 0 ? 0 : usec < 1000 ? 1 : usec / 1000);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
||||||
|
#define NOMINMAX
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Rubber Band Library
|
Rubber Band Library
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
under terms other than those of the GNU General Public License,
|
under terms other than those of the GNU General Public License,
|
||||||
you must obtain a valid commercial licence before doing so.
|
you must obtain a valid commercial licence before doing so.
|
||||||
*/
|
*/
|
||||||
|
#define NOMINMAX
|
||||||
|
|
||||||
#include "BQResampler.h"
|
#include "BQResampler.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
||||||
|
#define NOMINMAX
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Rubber Band Library
|
Rubber Band Library
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "VectorOpsComplex.h"
|
#include "VectorOpsComplex.h"
|
||||||
|
|
||||||
#include "system/sysutils.h"
|
//#include "system/sysutils.h"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include "sysutils.h"
|
#include "sysutils.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#define NOMINMAX
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
||||||
|
|
||||||
|
#define NOMINMAX
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Rubber Band Library
|
Rubber Band Library
|
||||||
An audio time-stretching and pitch-shifting library.
|
An audio time-stretching and pitch-shifting library.
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
under terms other than those of the GNU General Public License,
|
under terms other than those of the GNU General Public License,
|
||||||
you must obtain a valid commercial licence before doing so.
|
you must obtain a valid commercial licence before doing so.
|
||||||
*/
|
*/
|
||||||
|
#define NOMINMAX
|
||||||
|
|
||||||
#include "StretcherChannelData.h"
|
#include "StretcherChannelData.h"
|
||||||
|
|
||||||
@@ -27,6 +28,9 @@
|
|||||||
#include "../common/Allocators.h"
|
#include "../common/Allocators.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
using std::max;
|
||||||
|
|
||||||
namespace RubberBand
|
namespace RubberBand
|
||||||
{
|
{
|
||||||
@@ -114,7 +118,7 @@ void
|
|||||||
R2Stretcher::ChannelData::setSizes(size_t windowSize,
|
R2Stretcher::ChannelData::setSizes(size_t windowSize,
|
||||||
size_t fftSize)
|
size_t fftSize)
|
||||||
{
|
{
|
||||||
size_t maxSize = 2 * std::max(windowSize, fftSize);
|
size_t maxSize = 2*std::max(windowSize, fftSize);
|
||||||
size_t realSize = maxSize / 2 + 1;
|
size_t realSize = maxSize / 2 + 1;
|
||||||
size_t oldMax = inbuf->getSize();
|
size_t oldMax = inbuf->getSize();
|
||||||
size_t oldReal = oldMax / 2 + 1;
|
size_t oldReal = oldMax / 2 + 1;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
||||||
|
#define NOMINMAX
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Rubber Band Library
|
Rubber Band Library
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
||||||
|
#define NOMINMAX
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Rubber Band Library
|
Rubber Band Library
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
||||||
|
#define NOMINMAX
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Rubber Band Library
|
Rubber Band Library
|
||||||
|
|||||||
Reference in New Issue
Block a user