Teensy audio board I2S data extraction


New member

I am trying to use the Line in stereo object on the audio shield. My goal is to perform an FFT using the CMIS-DSP library used on the teensy, I understand that there are already examples however I am looking to write my own code to perform the FFT, as I am looking to use different FFT functions than implemented in the Audio library.
Currently what I want to do is only extract data from the i2s buffer on the teensy. I have searched an searched the code and used the audio GUI, but I can't seem to get the raw I2S audio data from the Shield into my source file or any other files.
So to be clear my question is: How can I obtain the raw audio data from the I2S buffer on the teesy. I have currently used the GUI to create a few objects, I only want to allocate the audio samples to a designated location so I can play with it. If i try to use the receiveReadOnly(channel); function but I dont know which channel the data is on.
This is my source file up until now largely generated by the GUI:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
AudioInputI2S i2s2;
AudioControlSGTL5000 sgtl5000_1;

void setup() {
// Audio connections require memory to work. For more
// detailed information, see the MemoryAndCpuUsage example
// Enable the audio shield and set the output volume.
void loop() {

audio_block_t *block;
block = receiveReadOnly();