Hi all, I'm studying simple Audio Player in order to output a wave table.
after I strip the unnecessary stuff, the sketch works once. not repeatedly.
can anybody spot the problem ?
when looking at the audio.cpp and daq.cpp, I noticed isrId. it seems it is
never given it's proper value (38 I believe ?).
But I'm a newbie on cpp, can anybody check and tell me where this
variable is set, or why the programming is OK without giving it a value ?
my stripped sketch, which hangs after one round :
#include <Audio.h>
void setup()
{
// 44100Khz stereo => 88200 sample rate
// 100 mSec of prebuffering.
Audio.begin(44100, 100);
}
void loop()
{
const int S=1024; // Number of samples to read in block
short buffer[S];
// no sine yet, just a ramp, within the 12 bits...
for (short i = 0; i<S ; i++) {buffer[i]=i;}
// Audio.prepare(buffer, S, volume); not needed as values are 12 bits unsigned already
// Feed samples to audio
Audio.write(buffer, S);
}