emmanuel63
Well-known member
Hello,
I notice some pretty bad distortion from audio shield headphone output, when setting the volume at low level.
Please compare this to sketches and tell me if you notice the difference.
sketch 1 => distortion
sketch 2 = no audible distortion
Thank you
Emmanuel
I notice some pretty bad distortion from audio shield headphone output, when setting the volume at low level.
Please compare this to sketches and tell me if you notice the difference.
sketch 1 => distortion
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioSynthWaveform waveform1; //xy=303.3333333333333,256.6666666666667
AudioOutputI2S i2s1; //xy=553.8888702392578,258.3333511352539
AudioConnection patchCord1(waveform1, 0, i2s1, 0);
AudioConnection patchCord2(waveform1, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=80.0000114440918,35.555580139160156
// GUItool: end automatically generated code
void setup() {
AudioMemory(20);
sgtl5000_1.enable();
sgtl5000_1.volume(0.1);
waveform1.begin(1, 200, WAVEFORM_SINE);
}
void loop() {
}
sketch 2 = no audible distortion
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioSynthWaveform waveform1; //xy=303.3333333333333,256.6666666666667
AudioOutputI2S i2s1; //xy=553.8888702392578,258.3333511352539
AudioConnection patchCord1(waveform1, 0, i2s1, 0);
AudioConnection patchCord2(waveform1, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=80.0000114440918,35.555580139160156
// GUItool: end automatically generated code
void setup() {
AudioMemory(20);
sgtl5000_1.enable();
sgtl5000_1.volume(0.5);
waveform1.begin(0.1, 200, WAVEFORM_SINE);
}
void loop() {
}
Thank you
Emmanuel