I am trying to debug my sketch. I can distill it down to the minimum to provide the source code for context if necessary, but I am trying to find documentation on this Audio library. The document that I have found on the pjrc.com site seems to lack sufficient information to help me troubleshoot this.
Is there a restriction as to the size of the buffer passed to play()? Is there a restriction as to where this buffer is located? (DTCM/ITCM RAM vs. PROGMEM vs. EXTMEM)
I have 16MB of PSRAM on this Teensy. I am working on an amateur radio application that supports multiple digital modes. Right now, the sketch is capturing audio to a 30sec 44.1kHz 16-bit mono circular buffer in PSRAM. That part works.
The sketch also displays a waterfall graph generated from the contents of this circular buffer, and displays it via the ILI9341_t3n library. This also works, confirming that audio is making it to the circular buffer in PSRAM reliably.
The problem is that I need to generate an audio waveform periodically (passing a text input buffer to a modulation function). Right now, I'm just generating a sine wave and storing this in a buffer, including the single 32bit header (0x82 in my case, 22kHz, 16bit uncompressed). When attempting to pass this buffer to play(), i sometimes run into crashing of the Teensy depending upon size or location of the buffer. This is the driver for my documentation request.
Is play() the best way to pass a generated waveform back to the radio via the audio shield?
Is there a restriction as to the size of the buffer passed to play()? Is there a restriction as to where this buffer is located? (DTCM/ITCM RAM vs. PROGMEM vs. EXTMEM)
I have 16MB of PSRAM on this Teensy. I am working on an amateur radio application that supports multiple digital modes. Right now, the sketch is capturing audio to a 30sec 44.1kHz 16-bit mono circular buffer in PSRAM. That part works.
The sketch also displays a waterfall graph generated from the contents of this circular buffer, and displays it via the ILI9341_t3n library. This also works, confirming that audio is making it to the circular buffer in PSRAM reliably.
The problem is that I need to generate an audio waveform periodically (passing a text input buffer to a modulation function). Right now, I'm just generating a sine wave and storing this in a buffer, including the single 32bit header (0x82 in my case, 22kHz, 16bit uncompressed). When attempting to pass this buffer to play(), i sometimes run into crashing of the Teensy depending upon size or location of the buffer. This is the driver for my documentation request.
Is play() the best way to pass a generated waveform back to the radio via the audio shield?