Ho Paul, i'm working on this project in the spare time.
the code is this
Code:
uint32_t GET_samples_in_file(uint8_t f)
{
return Wave.file_samples(name_file[f]);
}
void plotWave(uint8_t n){
int16_t numSamples = GET_samples_in_file(n);
File dataFile = SD.open("amen.raw");
int16_t buf[numSamples] = {0}; // buffer
int audio[numSamples] = dataFile.read();
for(int n=0; n<numSamples; n++){
??
}
}
in included file
Code:
int file_samples(const char *filename)
{
File rawfile = SD.open(filename);
if (!rawfile)
return 0;
return (rawfile.size() - (rawfile.size()%256)) >> 1; // return samples_available;
}