From 291f97c4bad57e18b02db4ce75c0cdcc512ee0ca Mon Sep 17 00:00:00 2001 From: boblark Date: Fri, 19 Jun 2020 10:04:12 -0700 Subject: [PATCH] Fix to include T4.x --- readme.md | 4 +++- synth_whitenoise_f32.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index c548617..2f63a83 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,11 @@ OpenAudio Library for Teensy =========================== -**Special Note** 17 June 2020 - This library is undergoing revision to make Teensy 4.x compatible and to add functionality. Changes are expected throughout the rest of June. See this readme for summaries during this period. +**Special Note** 17 June 2020 - This library is undergoing revision to make Teensy 4.x compatible and to add functionality. Changes are expected throughout the rest of June. See this readme for summaries during this period. Notes: + 1-synth_sine_f32.h & .cpp allowed both KINETISK and__IMXRT1062__ to support T4.x. Tested 3.6, 4.0 2-Hid synth_pinknoise_f32.h & .cpp with .xxx type. Allows T4 compile until these are fixed. +3-Fix synth_whitenoise_f32.cpp to include __IMXRT1062__ . **Purpose**: The purpose of this library is to build upon the [Teensy Audio Library](http://www.pjrc.com/teensy/td_libs_Audio.html) to enable new functionality for real-time audio processing. diff --git a/synth_whitenoise_f32.cpp b/synth_whitenoise_f32.cpp index 34b179d..401bd7e 100644 --- a/synth_whitenoise_f32.cpp +++ b/synth_whitenoise_f32.cpp @@ -1,6 +1,7 @@ /* Extended to F32 Created: Chip Audette, OpenAudio, Feb 2017 + Extended to Teensy 4.x Bob larkn June 2020 License: MIT License. Use at your own risk. */ @@ -63,7 +64,7 @@ void AudioSynthNoiseWhite_F32::update(void) lo = seed; do { -#if defined(KINETISK) +#if ( defined(KINETISK) || defined(__IMXRT1062__) ) hi = multiply_16bx16t(16807, lo); // 16807 * (lo >> 16) lo = 16807 * (lo & 0xFFFF); lo += (hi & 0x7FFF) << 16;