Question on saving Audio data to the SD Card on Teensy 4.1

Status
Not open for further replies.

Xingyu

New member
There is a conflict when I #include "SdFat-beta.h" and #include <Audio.h>.
How do I save the Audio data to the SD Card?

Here is the SD card code, and it works.

#include "SdFat-beta.h"

SdExFat sd;

void setup()
{
if (!sd.begin(SdioConfig(FIFO_SDIO))) { // SdFat.h Ver 2.0.0 Beta
Serial.println("m.SD initialization failed!");
} else {
Serial.println("m.SD initialization OK");
}

auto file = sd.open("data.txt", FILE_WRITE);
file.write("123");
file.close();
}

void loop()
{

}


But when I include <Audio.h>, there is a warning: "FILE_READ" redefined
#define FILE_READ O_READ

warning: "FILE_WRITE" redefined
#define FILE_WRITE (O_READ | O_WRITE | O_CREAT)

error: using typedef-name 'File' after 'class'
class File : public Stream {
 
Status
Not open for further replies.
Back
Top