Skip to content

Commit a8a82af

Browse files
committed
removed conditional declare
1 parent b123512 commit a8a82af

1 file changed

Lines changed: 11 additions & 14 deletions

File tree

AudioAlignLR_F32.cpp

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#include "AudioAlignLR_F32.h"
3131

32-
void AudioAlignLR_F32::update(void) { static uint32_t nnn = 0;
32+
void AudioAlignLR_F32::update(void) {
3333
audio_block_f32_t *block_L,*block_R;
3434
audio_block_f32_t *block2_L,*block2_R;
3535
audio_block_f32_t *blockOutTestSignal;
@@ -64,18 +64,15 @@ void AudioAlignLR_F32::update(void) { static uint32_t nnn = 0;
6464
return;
6565
}
6666

67-
if(currentTPinfo.TPsignalHardware == TP_SIGNAL_CODEC)
68-
{
69-
blockOutTestSignal = AudioStream_F32::allocate_f32();
70-
if (!blockOutTestSignal)
71-
{
72-
AudioStream_F32::release(block_L);
73-
AudioStream_F32::release(block_R);
74-
AudioStream_F32::release(block2_L);
75-
AudioStream_F32::release(block2_R);
76-
return;
77-
}
78-
}
67+
blockOutTestSignal = AudioStream_F32::allocate_f32();
68+
if(currentTPinfo.TPsignalHardware==TP_SIGNAL_CODEC && !blockOutTestSignal)
69+
{
70+
AudioStream_F32::release(block_L);
71+
AudioStream_F32::release(block_R);
72+
AudioStream_F32::release(block2_L);
73+
AudioStream_F32::release(block2_R);
74+
return;
75+
}
7976

8077
// Input data is now in block_L and block_R. Filter from there to
8178
// block2_L and block2_R
@@ -211,8 +208,8 @@ void AudioAlignLR_F32::update(void) { static uint32_t nnn = 0;
211208
}
212209
}
213210
AudioStream_F32::transmit(blockOutTestSignal, 2); // NOTE: Goes to third output
214-
AudioStream_F32::release(blockOutTestSignal);
215211
}
212+
AudioStream_F32::release(blockOutTestSignal);
216213

217214
currentTPinfo.nMeas++;
218215
// Serial.println(micros() - t0); // for timing

0 commit comments

Comments
 (0)