Hi! Thanks for this fun little project.
I was trying to adapt it for AtomS3R + Echo Base. I was running into memory access crashes and spent some time debugging; it seems like you did as well in your AtomS3RDebug branch.
I finally got it working and know what the issue is. It was accidentally introduced in 59c44a1 when the order of M5.Speaker.end() and M5.Mic.begin() were reversed.
It seems like at least for Echo Base, calling M5.Speaker.end() breaks an already completed mic initialization.
I.e. this will crash:
M5.Mic.begin();
M5.Speaker.end();
M5.Mic.record(rec_data, WAVE_SIZE, record_samplerate);
But this will work:
M5.Speaker.end();
M5.Mic.begin();
M5.Mic.record(rec_data, WAVE_SIZE, record_samplerate);
Hope this helps!
Hi! Thanks for this fun little project.
I was trying to adapt it for AtomS3R + Echo Base. I was running into memory access crashes and spent some time debugging; it seems like you did as well in your AtomS3RDebug branch.
I finally got it working and know what the issue is. It was accidentally introduced in 59c44a1 when the order of
M5.Speaker.end()andM5.Mic.begin()were reversed.It seems like at least for Echo Base, calling
M5.Speaker.end()breaks an already completed mic initialization.I.e. this will crash:
But this will work:
Hope this helps!