use of usdfs or sdFs in an audio object

Status
Not open for further replies.

tomatokotom

New member
Hi everybody,
i'm currently trying to create a granular object who would play sound from an Sd card but the sd.h library is too slow for my purpose( goal is to load large buffer from card like 4096 bits so i can play more than one grain simultaneously).
I have seen the benchmark and tried to use sdfs and usdfs lib it work, but i can't figure out how could i use one of these library in an audio object : Everytime i try to include , it does an error.
I think it maybe has to do with the spi interrupt or the way the audio library handle the SD.h library ?
Is there a way to make it work?

for exemple:

arduino code :
Code:
#include "usdfs_finder.h"
#include "Audio.h"
//#include "AudioStream.h"

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}


usdfs_finder.h :
Code:
#ifndef usdfs_finder_h
#define usdfs_finder_h

// #include "Arduino.h"
// #include "AudioStream.h"
// #include "SD.h"
// #include "SdFs.h"
// #include <SD.h>


  
  void function_1();
  void function_2();
#endif
Code:
usdfs_finder.cpp :


#include "usdfs_finder.h"
#include "Arduino.h"
// #include "SdFs.h"
#include "uSDFS.h"
// #include "spi_interrupt.h"
// #include <SD.h>

void function_1()
{
  Serial.println("Fonction #1");
}

void function_2()
{
  Serial.println("Fonction #2");
}

Thanks in advance
 
Last edited:
Status
Not open for further replies.
Back
Top