Quellcode durchsuchen

Merge pull request #385 from FrankBoesing/MoreLCfixes

Fix more Teensy LC warnings
dds
Paul Stoffregen vor 3 Jahren
Ursprung
Commit
ccfc3e7d7b
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
5 geänderte Dateien mit 16 neuen und 1 gelöschten Zeilen
  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 Datei anzeigen





// 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 Datei anzeigen





// 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 Datei anzeigen

*/ */


#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 Datei anzeigen

*/ */


#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 Datei anzeigen

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;

Laden…
Abbrechen
Speichern