richardsavage
Member
I am connecting the left channel from my microphone to the left input of my headphone.
I am also connecting the left channel from my microphone to the right channel of my headphone via a delay.
When I run the code I don't hear anything in the left and right channels of my headphones when I speak into the microphone.
Why don't I hear anything when I speak into the microphone?
The code is as follows:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
AudioInputI2S mic;
AudioEffectDelay delay1;
AudioOutputI2S headphone;
AudioConnection patchCord1(mic, 0, headphone, 0); // Left ear
AudioConnection patchCord2(mic, 0, delay1, 0);
AudioConnection patchCord3(delay1, 0, headphone, 1); // Right ear
AudioControlSGTL5000 sgtl5000_1;
void setup() {
Serial.begin(9600);
AudioMemory(160);
sgtl5000_1.enable();
sgtl5000_1.volume(0.5);
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC);
sgtl5000_1.micGain(50);
delay1.delay(0, 100);
delay(1000);
}
void loop() {
// do nothing
}
If I replace the delay with a mixer everything works as expected (see code below). So I know my hardware is setup/connected properly.
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
AudioInputI2S mic;
AudioMixer4 mixer1;
AudioOutputI2S headphone;
AudioConnection patchCord1(mic, 0, headphone, 0); // Left ear
AudioConnection patchCord2(mic, 0, mixer1, 0);
AudioConnection patchCord3(mixer1, 0, headphone, 1); // Right ear
AudioControlSGTL5000 sgtl5000_1;
void setup() {
Serial.begin(9600);
AudioMemory(160);
sgtl5000_1.enable();
sgtl5000_1.volume(0.5);
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC);
sgtl5000_1.micGain(50);
mixer1.gain(0, 0.9);
delay(1000);
}
void loop() {
// do nothing
}
I am also connecting the left channel from my microphone to the right channel of my headphone via a delay.
When I run the code I don't hear anything in the left and right channels of my headphones when I speak into the microphone.
Why don't I hear anything when I speak into the microphone?
The code is as follows:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
AudioInputI2S mic;
AudioEffectDelay delay1;
AudioOutputI2S headphone;
AudioConnection patchCord1(mic, 0, headphone, 0); // Left ear
AudioConnection patchCord2(mic, 0, delay1, 0);
AudioConnection patchCord3(delay1, 0, headphone, 1); // Right ear
AudioControlSGTL5000 sgtl5000_1;
void setup() {
Serial.begin(9600);
AudioMemory(160);
sgtl5000_1.enable();
sgtl5000_1.volume(0.5);
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC);
sgtl5000_1.micGain(50);
delay1.delay(0, 100);
delay(1000);
}
void loop() {
// do nothing
}
If I replace the delay with a mixer everything works as expected (see code below). So I know my hardware is setup/connected properly.
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
AudioInputI2S mic;
AudioMixer4 mixer1;
AudioOutputI2S headphone;
AudioConnection patchCord1(mic, 0, headphone, 0); // Left ear
AudioConnection patchCord2(mic, 0, mixer1, 0);
AudioConnection patchCord3(mixer1, 0, headphone, 1); // Right ear
AudioControlSGTL5000 sgtl5000_1;
void setup() {
Serial.begin(9600);
AudioMemory(160);
sgtl5000_1.enable();
sgtl5000_1.volume(0.5);
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC);
sgtl5000_1.micGain(50);
mixer1.gain(0, 0.9);
delay(1000);
}
void loop() {
// do nothing
}