diff --git a/audio/algo/chunkware/Compressor.cpp b/audio/algo/chunkware/Compressor.cpp index 1ec8364..103c4bc 100644 --- a/audio/algo/chunkware/Compressor.cpp +++ b/audio/algo/chunkware/Compressor.cpp @@ -66,6 +66,9 @@ void audio::algo::chunkware::Compressor::process(void* _output, const void* _inp if (_nbChannel != 1) { AA_CHUNK_ERROR("Can not compress with Other than single channel: " << _nbChannel); } + if (m_isConfigured == false) { + AA_CHUNK_ERROR("Alogo not initialized ..."); + } switch (_format) { case audio::format_int16: { diff --git a/test/main.cpp b/test/main.cpp index 4ead6cc..dcec5f2 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -105,7 +105,7 @@ void performanceCompressor() { audio::algo::chunkware::Compressor algo; algo.setThreshold(-10); algo.setRatio(-5); - int32_t lastPourcent = -1; + algo.init(); for (int32_t iii=0; iii<4096; ++iii) { perfo.tic(); algo.process(&output[0], &input[0], input.size(), 1, audio::format_double); @@ -147,7 +147,6 @@ void performanceLimiter() { algo.setAttack(0.1); algo.setRelease(2); algo.init(1); - int32_t lastPourcent = -1; for (int32_t iii=0; iii<4096; ++iii) { perfo.tic(); algo.process(&output[0], &input[0], input.size(), 1, audio::format_double); @@ -189,7 +188,6 @@ void performanceGate() { algo.setAttack(0.1); algo.setRelease(2); algo.init(); - int32_t lastPourcent = -1; for (int32_t iii=0; iii<4096; ++iii) { perfo.tic(); algo.process(&output[0], &input[0], input.size(), 1, audio::format_double);