[DEV] update algo

This commit is contained in:
Edouard DUPIN 2015-05-05 22:23:02 +02:00
parent 8a3689fa50
commit 955a551ac9
2 changed files with 4 additions and 3 deletions

View File

@ -66,6 +66,9 @@ void audio::algo::chunkware::Compressor::process(void* _output, const void* _inp
if (_nbChannel != 1) { if (_nbChannel != 1) {
AA_CHUNK_ERROR("Can not compress with Other than single channel: " << _nbChannel); AA_CHUNK_ERROR("Can not compress with Other than single channel: " << _nbChannel);
} }
if (m_isConfigured == false) {
AA_CHUNK_ERROR("Alogo not initialized ...");
}
switch (_format) { switch (_format) {
case audio::format_int16: case audio::format_int16:
{ {

View File

@ -105,7 +105,7 @@ void performanceCompressor() {
audio::algo::chunkware::Compressor algo; audio::algo::chunkware::Compressor algo;
algo.setThreshold(-10); algo.setThreshold(-10);
algo.setRatio(-5); algo.setRatio(-5);
int32_t lastPourcent = -1; algo.init();
for (int32_t iii=0; iii<4096; ++iii) { for (int32_t iii=0; iii<4096; ++iii) {
perfo.tic(); perfo.tic();
algo.process(&output[0], &input[0], input.size(), 1, audio::format_double); algo.process(&output[0], &input[0], input.size(), 1, audio::format_double);
@ -147,7 +147,6 @@ void performanceLimiter() {
algo.setAttack(0.1); algo.setAttack(0.1);
algo.setRelease(2); algo.setRelease(2);
algo.init(1); algo.init(1);
int32_t lastPourcent = -1;
for (int32_t iii=0; iii<4096; ++iii) { for (int32_t iii=0; iii<4096; ++iii) {
perfo.tic(); perfo.tic();
algo.process(&output[0], &input[0], input.size(), 1, audio::format_double); algo.process(&output[0], &input[0], input.size(), 1, audio::format_double);
@ -189,7 +188,6 @@ void performanceGate() {
algo.setAttack(0.1); algo.setAttack(0.1);
algo.setRelease(2); algo.setRelease(2);
algo.init(); algo.init();
int32_t lastPourcent = -1;
for (int32_t iii=0; iii<4096; ++iii) { for (int32_t iii=0; iii<4096; ++iii) {
perfo.tic(); perfo.tic();
algo.process(&output[0], &input[0], input.size(), 1, audio::format_double); algo.process(&output[0], &input[0], input.size(), 1, audio::format_double);