Skip to content

Commit

Permalink
Fix compiler warnings on Teensy LC
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulStoffregen committed Dec 21, 2021
1 parent d107923 commit 51b8df1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 2 additions & 0 deletions analyze_fft1024.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@


// 140312 - PAH - slightly faster copy
#if defined(__ARM_ARCH_7EM__)
static void copy_to_fft_buffer(void *destination, const void *source)
{
const uint16_t *src = (const uint16_t *)source;
Expand All @@ -54,6 +55,7 @@ static void apply_window_to_fft_buffer(void *buffer, const void *window)
}

}
#endif

void AudioAnalyzeFFT1024::update(void)
{
Expand Down
17 changes: 6 additions & 11 deletions effect_midside.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,18 @@

void AudioEffectMidSide::update(void)
{
audio_block_t *blocka, *blockb;

uint32_t *pa, *pb, *end;
uint32_t a12, a34; //, a56, a78;
uint32_t b12, b34; //, b56, b78;

blocka = receiveWritable(0); // left (encoding) or mid (decoding)
blockb = receiveWritable(1); // right (encoding) or side (decoding)
audio_block_t *blocka = receiveWritable(0); // left (encoding) or mid (decoding)
audio_block_t *blockb = receiveWritable(1); // right (encoding) or side (decoding)
if (!blocka || !blockb) {
if (blocka) release(blocka); // maybe an extra if statement here but if one
if (blockb) release(blockb); // of the blocks is NULL then it's trouble anyway
return;
}
#if defined(__ARM_ARCH_7EM__)
pa = (uint32_t *)(blocka->data);
pb = (uint32_t *)(blockb->data);
end = pa + AUDIO_BLOCK_SAMPLES/2;
uint32_t a12, a34, b12, b34;
uint32_t *pa = (uint32_t *)(blocka->data);
uint32_t *pb = (uint32_t *)(blockb->data);
uint32_t *end = pa + AUDIO_BLOCK_SAMPLES/2;

if (encoding) {
while (pa < end) {
Expand Down

0 comments on commit 51b8df1

Please sign in to comment.