Hi forum!
For my next project, I am trying to play audio from my RPi3, transfer it to my Teensy 4.0 with I2S, and then from the Teensy to my PC via USB.
I have no problem with the audio USB part (I have modified the PlaySynthMusic example with a AudioOutputUSB object and I could perfectly capture the sound with Audacity on my PC.)
Now, I would like to do the same with the audio played on the RPi.
I have setup an I2S connection between the RPi and the Teensy, by connecting GPIO 18, 19, 21 on the RPi to pins BCLK1, LRCLK1, IN1 on the teensy.
I use the following program on teensy:
On the Raspberry, I have modified /boot/config.txt with
and
(I know teensy is not a dac, but what should I use then?)
Then I play some mp3 on the RPi with mpg123, and record on my PC with Audacity.
I get something but... the quality is really bad: the voice sounds like pitched-down + some buzz :lol:
Here is a sample of the sound I get:
http://quefaitesvous.fr/audio/audio-usb.wav
I looked at the wave form of the sound with Audacity, it looks like if the data was chopped and interleaved with blanks:
http://quefaitesvous.fr/audio/scr-audio.png
Any idea for fixing this problem?
Thanks
For my next project, I am trying to play audio from my RPi3, transfer it to my Teensy 4.0 with I2S, and then from the Teensy to my PC via USB.
I have no problem with the audio USB part (I have modified the PlaySynthMusic example with a AudioOutputUSB object and I could perfectly capture the sound with Audacity on my PC.)
Now, I would like to do the same with the audio played on the RPi.
I have setup an I2S connection between the RPi and the Teensy, by connecting GPIO 18, 19, 21 on the RPi to pins BCLK1, LRCLK1, IN1 on the teensy.
I use the following program on teensy:
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
AudioInputI2Sslave i2s1;
AudioOutputUSB usb1;
AudioConnection patchCord1(i2s1, 0, usb1, 0);
AudioConnection patchCord2(i2s1, 1, usb1, 1);
void setup() {
AudioMemory(40);
}
void loop() {
}
On the Raspberry, I have modified /boot/config.txt with
Code:
dtparam=i2s=on
Code:
dtoverlay=hifiberry-dac
Then I play some mp3 on the RPi with mpg123, and record on my PC with Audacity.
I get something but... the quality is really bad: the voice sounds like pitched-down + some buzz :lol:
Here is a sample of the sound I get:
http://quefaitesvous.fr/audio/audio-usb.wav
I looked at the wave form of the sound with Audacity, it looks like if the data was chopped and interleaved with blanks:
http://quefaitesvous.fr/audio/scr-audio.png
Any idea for fixing this problem?
Thanks