Sandro
Well-known member
Hi all, I already did some audio projects with my Teensy 3.2: an amazing drum set and one beautiful MIDI synth, and it was pretty easy to make them. Now I'm trying to do something a bit more challenging: playing a raw audio file from the flash memory chip 25Q128FVSG, mounted on the Audio Adaptor Board, plugged on Teensy 3.2. This is the code I wrote:
The audio file V3.RAW has been made with SoX, copied from my PC to an SD card, from the SD card copied to the flash memory.
When I upload this code, there is no error message; but then nothing comes from the audio jack... and nothing in printed out in the TeensyMonitor window..
I'd be gratefull if someone would give me some tips....
Thanks
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
#define FLASH_CHIP_SELECT 6
// GUItool: begin automatically generated code
AudioPlaySerialflashRaw playFlash; //xy=507,208
AudioOutputI2S audio_out; //xy=790,201
AudioConnection patchCord1(playFlash, 0, audio_out, 0);
AudioConnection patchCord2(playFlash, 0, audio_out, 1);
AudioControlSGTL5000 board; //xy=659,307
// GUItool: end automatically generated code
void setup() {
Serial.begin (9600);
board.enable();
board.volume(1.0);
AudioMemory(30);
}
void loop() {
playFlash.play("V3.RAW");
Serial.println (playFlash.isPlaying());
delay(5000);
}
The audio file V3.RAW has been made with SoX, copied from my PC to an SD card, from the SD card copied to the flash memory.
When I upload this code, there is no error message; but then nothing comes from the audio jack... and nothing in printed out in the TeensyMonitor window..
I'd be gratefull if someone would give me some tips....
Thanks