Fixed to not have compile error for Teensy before T3.5

pull/16/merge
boblark 2 years ago
parent 2add4b4840
commit 573b37812b
  1. 5
      AudioFilterConvolution_F32.cpp
  2. 6
      AudioFilterConvolution_F32.h
  3. 6
      examples/TestConvolutinalFilter/TestConvolutinalFilter.ino

@ -25,6 +25,9 @@
*******************************************************************/ *******************************************************************/
// Revised for OpenAudio_Arduino Teensy F32 library, 8 Feb 2022 // Revised for OpenAudio_Arduino Teensy F32 library, 8 Feb 2022
// Revised 18 January to work for Teensy 3.5 and T3.6. Bob L // Revised 18 January to work for Teensy 3.5 and T3.6. Bob L
// Revised to be sure it will compile (run T3.5, T3.6, T4.x) for any. BobL 19 Jan 2023
#if defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__)
#include "AudioFilterConvolution_F32.h" #include "AudioFilterConvolution_F32.h"
@ -278,3 +281,5 @@ void AudioFilterConvolution_F32::initFilter ( float32_t fc, float32_t Astop, int
impulse(FIR_Coef); // generates Filter Mask and enables the audio stream impulse(FIR_Coef); // generates Filter Mask and enables the audio stream
} }
// End Only T3.5, T3.6 or T4.x
#endif

@ -95,10 +95,13 @@
* See the example TestConvolutionFilter.ino for more inforation on the * See the example TestConvolutionFilter.ino for more inforation on the
* use of this class. * use of this class.
* *
* NOTE: This filter can be run under Teensy 3.5, 3.6, 4.0, 4.1 ONLY
*
* Removed #defines that were not needed. Thanks K7MDL. Bob 6 Mar 2022 * Removed #defines that were not needed. Thanks K7MDL. Bob 6 Mar 2022
* Separated Teensy 3 and 4 parts. Thanks Paul Bob 16 Jan 2023 * Separated Teensy 3 and 4 parts. Thanks Paul Bob 16 Jan 2023
* *
* ************************************************************ */ * ************************************************************ */
#if defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__)
#ifndef AudioFilterConvolution_F32_h_ #ifndef AudioFilterConvolution_F32_h_
#define AudioFilterConvolution_F32_h_ #define AudioFilterConvolution_F32_h_
@ -194,3 +197,6 @@ private:
// end of read only once // end of read only once
#endif #endif
// End T3.5, T3.6 or T4.x
#endif

@ -10,8 +10,11 @@
* commented out. * commented out.
* *
* Public Domain - Teensy * Public Domain - Teensy
* Revised to only allow T3.5, T3.6 or T4.x Bob L 19 Jan 2023
*/ */
#if defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__)
#include "Audio.h" #include "Audio.h"
#include "OpenAudio_ArduinoLibrary.h" #include "OpenAudio_ArduinoLibrary.h"
#include "AudioStream_F32.h" #include "AudioStream_F32.h"
@ -117,3 +120,6 @@ void setup(void) {
void loop() { void loop() {
} }
// End T3.5, T3.6 or T4.x
#endif

Loading…
Cancel
Save