Corrected status of variable block size on I/O for F32

pull/11/head
boblark 4 years ago
parent e09cad6831
commit 0e6fb86f77
  1. 25
      examples/PassthroughF32/PassthroughF32.ino
  2. 2
      readme.md

@ -10,17 +10,18 @@
#include "Audio.h" // Teensy I16 Audio Library #include "Audio.h" // Teensy I16 Audio Library
#include "OpenAudio_ArduinoLibrary.h" // F32 library #include "OpenAudio_ArduinoLibrary.h" // F32 library
#include "AudioStream_F32.h" #include "AudioStream_F32.h"
/*
#include "Audio.h" // Teensy I16 Audio Library
#include "OpenAudio_ArduinoLibrary.h" // F32 library
#include "AudioStream_F32.h" */
// AudioInputI2S_OA_F32 i2sIn; // T3.x supported sample rates: 2000, 8000, 11025, 16000, 22050, 24000, 32000, 44100, 44117, 48000,
AudioInputI2S_F32 i2sIn; // 88200, 88235 (44117*2), 95680, 96000, 176400, 176470, 192000
AudioAnalyzePeak_F32 peakL; // T4.x supports any sample rate the codec will handle.
AudioAnalyzePeak_F32 peakR; const float sample_rate_Hz = 24000.0f ; // 24000, 44117, or other frequencies listed above
// AudioOutputI2S_OA_F32 i2sOut; const int audio_block_samples = 32;
AudioOutputI2S_F32 i2sOut; AudioSettings_F32 audio_settings(sample_rate_Hz, audio_block_samples);
AudioInputI2S_F32 i2sIn(audio_settings);
AudioAnalyzePeak_F32 peakL(audio_settings);
AudioAnalyzePeak_F32 peakR(audio_settings);
AudioOutputI2S_F32 i2sOut(audio_settings);
AudioConnection_F32 patchCord0(i2sIn, 0, peakL, 0); AudioConnection_F32 patchCord0(i2sIn, 0, peakL, 0);
AudioConnection_F32 patchCord1(i2sIn, 1, peakR, 0); AudioConnection_F32 patchCord1(i2sIn, 1, peakR, 0);
@ -33,9 +34,7 @@ void setup() {
delay(1000); delay(1000);
Serial.println("OpenAudio_ArduinoLibrary - Passthrough Stereo"); Serial.println("OpenAudio_ArduinoLibrary - Passthrough Stereo");
// Internally, I16 blocks are used Bob Fix sometime AudioMemory_F32(20, audio_settings);
// AudioMemory(4); // Needed or I/O
AudioMemory_F32(20);
codec1.enable(); // MUST be before inputSelect() codec1.enable(); // MUST be before inputSelect()
codec1.inputSelect(AUDIO_INPUT_LINEIN); codec1.inputSelect(AUDIO_INPUT_LINEIN);
} }

@ -3,7 +3,7 @@ OpenAudio Library for Teensy
*** Special Note *** 6 January 2021- This library is undergoing revision to make Teensy 4.x compatible and to add functionality. The Tympan Library *** Special Note *** 6 January 2021- This library is undergoing revision to make Teensy 4.x compatible and to add functionality. The Tympan Library
files and associated classes output_i2s_f32.h, output_i2s_f32.cpp, input_i2s_f32.h, input_i2s_f32.cpp are now files and associated classes output_i2s_f32.h, output_i2s_f32.cpp, input_i2s_f32.h, input_i2s_f32.cpp are now
ready to be used for T3.x and T4.x. There are some restrictions, particularly this should be used with 16-bit I2S codec data. Codec sample rates can be varied. Block size needsto be left at 128 for now. Work on the F32 i/o routines is continuing. Thanks to Chip and @jcj83429 . ready to be used for T3.x and T4.x. There are some restrictions, particularly this should be used with 16-bit I2S codec data. Codec sample rates can be varied. Variable block size is supported, but be sure the settings option is used. More on this to come. Work on the F32 i/o routines is continuing. Thanks to Chip and @jcj83429 .
**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. **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.

Loading…
Cancel
Save