Thanks for your reply and I am using your effect_delay_ext.cpp ,effect_delay_ext.h, extmem.cpp and extmem.h and my code compiles but no sound out of the delayed channel. Please see below code. It works if I use it as is but if I uncomment AudioEffectDelayExternal
and comment out AudioEffectDelay it compiles fine but I get no sound out of the delayed channel.
/*
* A simple hardware test which receives audio from the audio shield
* Line-In pins and send it to the Line-Out pins and headphone jack.
*
* This example code is in the public domain.
*/
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=241.88888549804688,189
//AudioEffectDelayExternal delay1(AUDIO_MEMORY_PSRAM64,95108); //xy=505.75,458.75
AudioEffectDelay delay1; //xy=268.8888931274414,328.8888931274414
AudioAmplifier amp1; //xy=406.8888854980469,255.88888549804688
AudioOutputI2S i2s2; //xy=556.8888626098633,190.00000476837158
AudioConnection patchCord1(i2s1, 0, i2s2, 0);
AudioConnection patchCord2(i2s1, 1, delay1, 0);
AudioConnection patchCord3(delay1, 0, amp1, 0);
AudioConnection patchCord4(amp1, 0, i2s2, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=451.8888931274414,365.000036239624
// GUItool: end automatically generated code
const int myInput = AUDIO_INPUT_LINEIN;
//const int myInput = AUDIO_INPUT_MIC;
void setup() {
// Audio connections require memory to work. For more
// detailed information, see the MemoryAndCpuUsage example
AudioMemory(400);
// Enable the audio shield, select input, and enable output
sgtl5000_1.enable();
sgtl5000_1.inputSelect(myInput);
sgtl5000_1.volume(0.5);
delay1.delay(0,1100);
amp1.gain(1.0);
Serial.begin(9600);
}
void loop() {
Serial.print(AudioMemoryUsageMax());
Serial.println();
delay(10000);
}