From 00ab3957d0f555582cc52d93b18792397b0cf236 Mon Sep 17 00:00:00 2001 From: Vincent GAUCHE Date: Thu, 27 Apr 2023 02:14:47 +0200 Subject: [PATCH] start MixingConsole fixing --- src/test/test_fx_mixing_console.cpp | 5 +++-- src/test/test_fx_mixing_console_unitary.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/test/test_fx_mixing_console.cpp b/src/test/test_fx_mixing_console.cpp index 347302b..56ceea7 100644 --- a/src/test/test_fx_mixing_console.cpp +++ b/src/test/test_fx_mixing_console.cpp @@ -224,7 +224,7 @@ TEST(MixingConsole, ZeroSamplesTest) float32_t samples[] = {0.0f, 0.0f, 0.0f, 0.0f}; mixer.setInputSampleBuffer(0, samples); - mixer.preProcessInputSampleBuffer(0); + mixer.preProcessInputSampleBuffer(0, 4); ASSERT_EQ(0, FULL_INSPECT((&mixer), true)); mixer.setSendLevel(0, MixerOutput::MainOutput, 1.0f); @@ -279,7 +279,7 @@ TEST(MixingConsole, DryProcessing) for(size_t i = 0; i < StereoChannels::kNumChannels; ++i) memset(out[i], 0, length * sizeof(float32_t)); mixer.setInputSampleBuffer(0, in); - mixer.preProcessInputSampleBuffer(0); + mixer.preProcessInputSampleBuffer(0, 2); ASSERT_EQ(0, INSPECT((&mixer), fullInspector)); mixer.process( @@ -396,6 +396,7 @@ TEST(MixingConsole, StandardUsageProcessing) mixer.setReturnLevel(MixerOutput::FX_Delay, MixerOutput::MainOutput, 0.3f); mixer.setInputSampleBuffer(0, inSamples[0], inSamples[1]); + mixer.preProcessInputSampleBuffer(0, size); mixer.process(outSamples[0], outSamples[1]); ASSERT_EQ(0, INSPECT((&mixer), fullInspector)); saveWaveFile(getResultFile(full_test_name + ".wav", true), outSamples[0], outSamples[1], size, static_cast(SAMPLING_FREQUENCY), 16); diff --git a/src/test/test_fx_mixing_console_unitary.cpp b/src/test/test_fx_mixing_console_unitary.cpp index 565d4bf..f43acc5 100644 --- a/src/test/test_fx_mixing_console_unitary.cpp +++ b/src/test/test_fx_mixing_console_unitary.cpp @@ -29,7 +29,7 @@ TEST(MixingConsole, ShortBuffer) memset(outSamples[1], 0, size * sizeof(float32_t)); mixer->setInputSampleBuffer(0, inSamples); - mixer->preProcessInputSampleBuffer(0); + mixer->preProcessInputSampleBuffer(0, size); ASSERT_EQ(0, FULL_INSPECT(mixer, true)) << full_test_name << " Mixer.setInputSampleBuffer"; mixer->process(outSamples[0], outSamples[1]); @@ -72,7 +72,7 @@ TEST(MixingConsole, ReverberatorShortBuffer) memset(outSamples[1], 0, size * sizeof(float32_t)); mixer->setInputSampleBuffer(0, inSamples); - mixer->preProcessInputSampleBuffer(0); + mixer->preProcessInputSampleBuffer(0, size); ASSERT_EQ(0, FULL_INSPECT(mixer, true)) << full_test_name << " Mixer.setInputSampleBuffer"; mixer->process(outSamples[0], outSamples[1]); @@ -100,7 +100,7 @@ TEST(MixingConsole, DrySamplesBoundariesTest) mixer->setSendLevel(0, MixerOutput::MainOutput, 1.0f); mixer->setInputSampleBuffer(0, inSamples[0]); - mixer->preProcessInputSampleBuffer(0); + mixer->preProcessInputSampleBuffer(0, size); float32_t** outSamples = new float32_t*[2]; outSamples[0] = new float32_t[size]; @@ -161,7 +161,7 @@ TEST(MixingConsole, ReverberatorSamplesBoundariesTest) mixer->getReverberator()->setLP(0.7f); mixer->setInputSampleBuffer(0, inSamples[0]); - mixer->preProcessInputSampleBuffer(0); + mixer->preProcessInputSampleBuffer(0, size); mixer->process(outSamples[0], outSamples[1]); ASSERT_EQ(0, FULL_INSPECT2(mixer, true, full_test_name + "Mixer.process")) << full_test_name << " Mixer.process";