Browse Source

Fix more Teensy LC warnings

dds
Frank Bösing 3 years ago
parent
commit
89eac23374
5 changed files with 16 additions and 1 deletions
  1. +2
    -0
      analyze_fft256.cpp
  2. +1
    -0
      effect_freeverb.cpp
  3. +4
    -0
      effect_midside.cpp
  4. +4
    -0
      output_tdm.cpp
  5. +5
    -1
      synth_whitenoise.cpp

+ 2
- 0
analyze_fft256.cpp View File





// 140312 - PAH - slightly faster copy // 140312 - PAH - slightly faster copy
__attribute__((unused))
static void copy_to_fft_buffer(void *destination, const void *source) static void copy_to_fft_buffer(void *destination, const void *source)
{ {
const uint16_t *src = (const uint16_t *)source; const uint16_t *src = (const uint16_t *)source;
} }
} }


__attribute__((unused))
static void apply_window_to_fft_buffer(void *buffer, const void *window) static void apply_window_to_fft_buffer(void *buffer, const void *window)
{ {
int16_t *buf = (int16_t *)buffer; int16_t *buf = (int16_t *)buffer;

+ 1
- 0
effect_freeverb.cpp View File





// cleaner sat16 by http://www.moseleyinstruments.com/ // cleaner sat16 by http://www.moseleyinstruments.com/
__attribute__((unused))
static int16_t sat16(int32_t n, int rshift) { static int16_t sat16(int32_t n, int rshift) {
// we should always round towards 0 // we should always round towards 0
// to avoid recirculating round-off noise // to avoid recirculating round-off noise

+ 4
- 0
effect_midside.cpp View File

*/ */


#include <Arduino.h> #include <Arduino.h>

#if !defined(KINETISL)

#include "effect_midside.h" #include "effect_midside.h"


void AudioEffectMidSide::update(void) void AudioEffectMidSide::update(void)
release(blocka); release(blocka);
release(blockb); release(blockb);
} }
#endif

+ 4
- 0
output_tdm.cpp View File

*/ */


#include <Arduino.h> #include <Arduino.h>

#if !defined(KINETISL)

#include "output_tdm.h" #include "output_tdm.h"
#include "memcpy_audio.h" #include "memcpy_audio.h"
#include "utility/imxrt_hw.h" #include "utility/imxrt_hw.h"
#endif #endif
} }


#endif

+ 5
- 1
synth_whitenoise.cpp View File

audio_block_t *block; audio_block_t *block;
uint32_t *p, *end; uint32_t *p, *end;
int32_t n1, n2, gain; int32_t n1, n2, gain;
uint32_t lo, hi, val1, val2;
uint32_t lo, hi;


gain = level; gain = level;
if (gain == 0) return; if (gain == 0) return;
lo = seed; lo = seed;
do { do {
#if defined(__ARM_ARCH_7EM__) #if defined(__ARM_ARCH_7EM__)
uint32_t val1, val2;
hi = multiply_16bx16t(16807, lo); // 16807 * (lo >> 16) hi = multiply_16bx16t(16807, lo); // 16807 * (lo >> 16)
lo = 16807 * (lo & 0xFFFF); lo = 16807 * (lo & 0xFFFF);
lo += (hi & 0x7FFF) << 16; lo += (hi & 0x7FFF) << 16;
*p++ = val1; *p++ = val1;
*p++ = val2; *p++ = val2;
#elif defined(KINETISL) #elif defined(KINETISL)
uint32_t val1;
hi = 16807 * (lo >> 16); hi = 16807 * (lo >> 16);
lo = 16807 * (lo & 0xFFFF); lo = 16807 * (lo & 0xFFFF);
lo += (hi & 0x7FFF) << 16; lo += (hi & 0x7FFF) << 16;

Loading…
Cancel
Save