Removed not necessary code
This commit is contained in:
parent
03cadfc09b
commit
77ac6c1af9
|
@ -17,6 +17,6 @@ add_definitions(-DGABORATOR_USE_PFFFT)
|
|||
include_directories(lib/gaborator)
|
||||
include_directories(lib/pffft)
|
||||
|
||||
add_library(cgaborator SHARED cgaborator.cpp lib/pffft/pffft.c lib/pffft/fftpack.c)
|
||||
add_library(cgaborator STATIC cgaborator.cpp lib/pffft/pffft.c lib/pffft/fftpack.c)
|
||||
|
||||
target_link_options(cgaborator PRIVATE -static-libgcc -static-libstdc++)
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
pushd "${0%/*}"
|
||||
|
||||
pushd lib
|
||||
|
||||
pushd pffft
|
||||
if [[ -d "build" ]]; then
|
||||
rm -r build
|
||||
fi
|
||||
if [[ -d "install" ]]; then
|
||||
rm -r install
|
||||
fi
|
||||
mkdir build
|
||||
mkdir install
|
||||
pushd build
|
||||
cmake .. -DUSE_TYPE_FLOAT=OFF -DUSE_TYPE_DOUBLE=ON -DCMAKE_INSTALL_PREFIX="$(pwd)/../install"
|
||||
make -j$(nproc)
|
||||
make install
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
#include "cgaborator.h"
|
||||
#include "gaborator/gaborator.h"
|
||||
#include <unordered_map>
|
||||
#include <math.h>
|
||||
#include <mutex>
|
||||
#include <cmath>
|
||||
|
||||
const int C_ARRAY_SIZE = 300000 * 2;
|
||||
|
||||
|
@ -18,8 +16,6 @@ struct GaboratorState {
|
|||
int sample_rate;
|
||||
int64_t anal_support;
|
||||
|
||||
std::mutex stateMutex;
|
||||
|
||||
float cArray[C_ARRAY_SIZE];
|
||||
};
|
||||
|
||||
|
@ -27,8 +23,6 @@ void* gaborator_initialize(int blockSize, double sampleRate, int bandsPerOctave,
|
|||
|
||||
auto state = new GaboratorState();
|
||||
|
||||
std::unique_lock<std::mutex> lck (state->stateMutex);
|
||||
|
||||
state->paramsRef = new gaborator::parameters(bandsPerOctave, minimumFrequency / sampleRate, referenceFrequency / sampleRate, 1.0, 1e-5);
|
||||
state->analyzerRef = new gaborator::analyzer<float>(*(state->paramsRef));
|
||||
state->coefsRef = new gaborator::coefs<float>(*(state->analyzerRef));
|
||||
|
@ -123,8 +117,6 @@ void gaborator_bandcenters(void* ptr, float* band_centers) {
|
|||
void gaborator_release(void* ptr) {
|
||||
auto state = reinterpret_cast<GaboratorState*>(ptr);
|
||||
|
||||
std::unique_lock<std::mutex> lck (state->stateMutex);
|
||||
|
||||
//cleanup memory
|
||||
delete state->analyzerRef;
|
||||
delete state->coefsRef;
|
||||
|
|
Loading…
Reference in a new issue